You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OpenAPI 3.2: Support JSON Schema object property-count constraints #996
OpenAPI 3.2: Support JSON Schema object property-count constraints
Problem. Importer rejects minProperties and maxProperties even for map schemas whose count bounds the DSL already exports. Fixed-property records also lack a dedicated representation for object property-count assertions, so generation cannot express the full contract.
Reproduce. Run go test ./internal/openapiimport -run '^TestSchemaGrammarKeywordsAreNeverSilentlyIgnored/minProperties$' -count=1 from the repository root. The focused existing test exercises the current boundary. Minimal schema: OAS 3.2 schema: {type: object, additionalProperties: {type: string}, minProperties: 1, maxProperties: 4}. Existing rejection probes: TestSchemaGrammarKeywordsAreNeverSilentlyIgnored cases minProperties/maxProperties; exporter owner is applySchemaLengths for expr.Map.
Expected behavior. Preserve minProperties/maxProperties for both dynamic maps and fixed-property records through import, validation, and OpenAPI generation. Test empty objects, boundaries, and records whose optional properties vary the key count; retain map values and required-field behavior.
Activity