Skip to content

OpenAPI 3.1 JSON Schema incorrect for Paths Item in Paths #3298

@speakeasybot

Description

@speakeasybot

I believe this line https://github.com/OAI/OpenAPI-Specification/blob/main/schemas/v3.1/schema.json#L294

ie:

"$ref": "#/$defs/path-item"

should actually be

"$ref": "#/$defs/path-item-or-reference"

according to the docs https://spec.openapis.org/oas/v3.1.0#pathItemObject

as when I am trying to use a json schema validator on my OpenAPI document I am getting an error like:

OpenAPI document invalid: not allowed - https://spec.openapis.org/oas/3.1/schema/2022-10-07#/$defs/path-item/unevaluatedProperties

for the below snippet

paths:
  /vehicles/{id}/pedals/accelerator:
    $ref: "./paths/acceleratorv3.yaml"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Schemachanges related to the schema(s)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions