Skip to content
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

Response keys should be strings #1112

Closed
patrickkwang opened this issue Dec 20, 2019 · 1 comment · Fixed by #1990
Closed

Response keys should be strings #1112

patrickkwang opened this issue Dec 20, 2019 · 1 comment · Fixed by #1990

Comments

@patrickkwang
Copy link
Contributor

There are a handful of yaml schemas with something like:
https://github.com/zalando/connexion/blob/f31ac615bfc8a3c696c5ebe53f3c57e5234ff6f8/examples/openapi3/helloworld/openapi/helloworld-api.yaml#L15-L16
pyyaml interprets these keys as integers, while the OpenAPI specification requires that they be strings:
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#format

The above should be replaced with

      responses:
        '200':

openapi-spec-validator does not validate this, but instead coerces int keys to str.

@dtkav
Copy link
Collaborator

dtkav commented Dec 20, 2019

I think the support for coercing int to str is from swagger2.

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

Successfully merging a pull request may close this issue.

3 participants