Skip to content

Validation fails for OAS3 headers that are $refs in encoding object #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alasdairhurst opened this issue Feb 25, 2020 · 1 comment
Closed

Comments

@alasdairhurst
Copy link

Given the following request body, this is disallowed:
image

      description: The URL body
      content:
        'text/plain':
          schema:
            $ref: '#/components/schemas/URL'
          examples:
            foo:
              $ref: '#/components/examples/foo'
            xml:
              $ref: '#/components/examples/xml'
          encoding:
            url:
              headers:
                id:
                  $ref: '#/components/headers/id'

image
image

The spec allows items in the headers map to be reference objects.
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#encoding-object

@alasdairhurst
Copy link
Author

This is actually an issue with the official OAS schema!
OAI/OpenAPI-Specification#2157

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant