Skip to content

Add primitive types and required fields to commands.schema.json#312

Merged
AndreyVMarkelov merged 1 commit into
masterfrom
feat/command-schema-types
Jun 30, 2026
Merged

Add primitive types and required fields to commands.schema.json#312
AndreyVMarkelov merged 1 commit into
masterfrom
feat/command-schema-types

Conversation

@AndreyVMarkelov

@AndreyVMarkelov AndreyVMarkelov commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Enriches the generated commands.schema.json with per-field primitive types, required arrays, nested object $ref links, enum constraints, and format: "date-time" on timestamps
  • Adds internal/jsonschema/definition_schemas.go — a registry mapping definitions to their type metadata, with defaultPropertySchema inferring types from field name patterns
  • Tests validate all golden outputs against the typed schema and verify rejection of incorrect primitive types
  • Tests validate all command manifests against manifest.schema.json

Test plan

  • go test ./... passes
  • golangci-lint run ./... clean
  • gofmt -s -l . clean
  • TestGoldenSuccessOutputsValidateAgainstPublicCommandSuccessSchema — all golden outputs pass typed validation
  • TestPublicCommandSuccessSchemaRejectsInvalidPrimitiveType — catches "false" where false (bool) expected
  • TestJSONHelpManifestsValidateAgainstPublicManifestSchema — all manifests validate against manifest.schema.json
  • Generated schema rebuilt and in sync

…ema.json

Enriches the generated command schema with per-field types, required
arrays, nested object refs, enum constraints, and date-time formats.
Adds a definition schema registry that maps field names to types and
validates manifests against manifest.schema.json in tests.
@AndreyVMarkelov AndreyVMarkelov force-pushed the feat/command-schema-types branch from a90a0c4 to 38a9e3b Compare June 30, 2026 00:05
@AndreyVMarkelov AndreyVMarkelov merged commit 0fad8f5 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