Skip to content

oas3-rs fails parsing OpenAPI 3.1 schemas with boolean properties generated by aide #278

@tarnishablec

Description

@tarnishablec

Bug
Parsing OpenAPI 3.1 schemas generated by aide, where some properties use boolean schemas (e.g. "data": true), fails with an error:

did not match any variant of untagged enum ObjectOrReference

Schema example

{
  "type": "object",
  "properties": {
    "data": true,
    "meta": true
  }
}

Spec reference
According to OpenAPI 3.1 and JSON Schema 2020-12, boolean schemas are valid (true means any instance is valid, false means none is valid).

Reference: https://json-schema.org/draft/2020-12/json-schema-core.html#section-4.3.2

Suggestion
Support boolean schemas in all schema positions (especially properties) for full OpenAPI 3.1 compatibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions