Skip to content

Replace subset schema validator with jsonschema/v6#313

Merged
AndreyVMarkelov merged 1 commit into
masterfrom
feat/real-schema-validator
Jun 30, 2026
Merged

Replace subset schema validator with jsonschema/v6#313
AndreyVMarkelov merged 1 commit into
masterfrom
feat/real-schema-validator

Conversation

@AndreyVMarkelov

@AndreyVMarkelov AndreyVMarkelov commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace the hand-rolled ~210-line subsetJSONSchemaValidator with github.com/santhosh-tekuri/jsonschema/v6 for full JSON Schema 2020-12 validation
  • Add TestJSONErrorExamplesValidateAgainstPublicErrorSchema and validate error responses in decodeJSONErrorResponse
  • Widen CI drift detection from commands.schema.json to the entire docs/json-schema/v1/ directory
  • Add "Schema-first automation" documentation section to docs/automation.md

Test plan

  • go test ./... passes
  • golangci-lint run clean
  • CI drift check covers all schema files
  • New error schema validation tests pass

The hand-rolled subsetJSONSchemaValidator covered only a subset of JSON
Schema 2020-12 keywords. Replace it with a proper library for full-spec
validation, add error schema validation tests, and widen CI drift
detection to the entire docs/json-schema/v1 directory.
@AndreyVMarkelov AndreyVMarkelov merged commit 27491a7 into master Jun 30, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant