Skip to content

OAS 3 JSON schema is invalid. Encoding object only allows headers to be Header objects and not Reference objects. #2157

@alasdairhurst

Description

@alasdairhurst

"$ref": "#/definitions/Header"

This causes OAS 3 documents that are valid against the spec to fail. (and breaks tooling that relies on the schema for validation)

Here's an example encoding object which fails validation:

          encoding:
            url:
              headers:
                id:
                  $ref: '#/components/headers/id'

The schema should be

          "additionalProperties": {
                "oneOf": [
                    {  "$ref": "#/definitions/Header" },
                    {  "$ref": "#/definitions/Reference" },
                ]
               
          }

I'll submit a PR with this change for you.

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