Skip to content

OpenAPI 3.2: Support false boolean schemas #997

Open

Description

@CaliLuke

OpenAPI 3.2: Support false boolean schemas

Problem. Importer gap and no standalone exporter/DSL representation; exporter can synthesize equivalent not:{} for an impossible enum, but does not preserve authored false schema identity.

Reproduce. Run go test ./internal/openapiimport -run '^TestSchemaAdmissionRejectsLossyNormalization$' -count=1 from the repository root. The focused existing test exercises the current boundary. Minimal schema: OAS 3.2 component schema Never: false, referenced by a response property. Existing source probe: TestSchemaAdmissionRejectsLossyNormalization case false schema across component/property/items positions.

Expected behavior. Import any false schema as an equivalent schema rejecting every JSON instance (the regenerated spelling may use an equivalent form such as not: {}). Test all JSON values and nested occurrences; keep true schemas and object-closing additionalProperties:false distinct.

Evidence at revision 98131b0.

Specification. OAS 3.2 §4.24 (Schema Object boolean schema forms)

Activity

  1. added
    enhancement
    on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions