Add schema DELETE/update API with gRPC parity, frontend controls, and full test coverage - #37
Merged
Merged
Conversation
Co-authored-by: DeltaRule <83079740+DeltaRule@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update API to enable delete and update of schema
Add schema DELETE/update API with gRPC parity, frontend controls, and full test coverage
Mar 15, 2026
DeltaRule
marked this pull request as ready for review
March 15, 2026 15:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Schema templates were read/write-only — there was no way to delete a schema or update it through a documented, tested path. This adds
DELETE /schema/{id}alongsidePUTupdate semantics, gRPC equivalents, frontend controls, and complete documentation.Backend
pkg/schema—DeleteTemplate(schemaID): removes file from disk, evicts cache entry. IntroducesErrSchemaNotFoundsentinel so callers useerrors.Is()instead of string matching.DELETE /schema/{schemaID}— requireswritepermission; returns404for missing schemas,400for invalid IDs (path-traversal safe).gRPC
Processhandler — three new operation strings routed before entity ops:operationSCHEMA_GETGET /schema/{id}SCHEMA_PUTPUT /schema/{id}SCHEMA_DELETEDELETE /schema/{id}Frontend
.schema-list-row/.schema-list-btnCSS classes.API Spec & Docs
api/openapi.yaml: fullDELETE /schema/{schemaID}path with200/401/403/404.docs/usage/api-reference.md: delete endpoint docs + gRPC schema operations table with Go examples.docs/usage/schemas.md: new Updating and Deleting sections covering REST, Web UI, and gRPC.README.md:DELETE /schema/{schemaID}reference with curl example.Tests
TestDeleteTemplate(6 sub-tests): disk/cache removal, not-found, empty ID, path traversal, list exclusion, validate-after-delete.TestHandleSchemaDelete(7 sub-tests): auth, success, 404-after-delete, not-found, read-only forbidden, path traversal, list exclusion.TestProcessSchemaOperations(6 sub-tests): full gRPC round-trip for all three schema ops.💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.