Skip to content

frontend: schema-aware pre-pass for legacy drafts and libopenapi blind spots #1

Description

@tdakkota

libopenapi (our parser) drops draft-04/07 spellings and mishandles a few valid 2020-12 constructs in its index-free build path. A schema-structure-aware YAML pre-pass (run in frontend.Load before handing the tree to libopenapi, like the existing $ref-strip) should normalize:

  • definitions$defs, draft-04 id$id, array-form itemsprefixItems (and additionalItemsitems)
  • boolean unevaluatedItems (true/false) → equivalent schema object ({} / {"not":{}}). libopenapi types UnevaluatedItems as a plain *SchemaProxy (not DynamicValue[…,bool]) and errors on a boolean — 35 JSON-Schema-Test-Suite schemas fail to load because of this.

The pass must be applicator-aware: id/items/definitions are also valid property names and data, so a blind rename would corrupt schemas. This unblocks ogen parity on OpenAPI 3.0 meta-schemas / Swagger and the boolean-unevaluatedItems suite failures (currently logged as review items by the sanity-not-strict suite walk).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions