Skip to content

Fix spec example: Plain text response with headers #1114

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

Merged
merged 1 commit into from
May 18, 2017

Conversation

tfesenko
Copy link
Contributor

We have two different representations of the Header Object is the specification:

description: The number of allowed requests in the current period
type: integer
description: The number of allowed requests in the current period
schema:
  type: integer

I believe only the latter is correct as 1) The Header Object follows the structure of the Parameter Object, 2) Parameter Object has schema property which defines the type.
=> This PR updates the "Plain text response with headers" example by moving the header's type into the schema object.

Headers Object example from [Response Object Examples](https://github.com/OAI/OpenAPI-Specification/blob/OpenAPI.next/versions/3.0.md#response-object-examples) defines the type directly in the header element, but it should be inside a schema object - see [Headers Object Example](https://github.com/OAI/OpenAPI-Specification/blob/OpenAPI.next/versions/3.0.md#headers-object-example).
@webron
Copy link
Member

webron commented May 18, 2017

Good catch! Thanks for the fix.

@webron webron merged commit e22fad8 into OAI:OpenAPI.next May 18, 2017
@tfesenko tfesenko deleted the OpenAPI.next_header_example branch May 18, 2017 22:24
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

Successfully merging this pull request may close these issues.

2 participants