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

openapi-spec-validator fails for integer response codes #79

Open
vmalloc opened this issue Jul 21, 2019 · 1 comment
Open

openapi-spec-validator fails for integer response codes #79

vmalloc opened this issue Jul 21, 2019 · 1 comment

Comments

@vmalloc
Copy link

vmalloc commented Jul 21, 2019

Current SwaggerHub implementation exports YAMLs with responses looking like:

responses:
    200:
        description: success

This leads openapi-spec-validator to fail trying to apply a regex to the 200 status code. Assuming what SwaggerHub exports is correct, openapi-spec-validator should not fail on such an input...

@remram44
Copy link

remram44 commented Jan 12, 2021

I ran into this, trying to use openapi-core. It first runs the spec through openapi-spec-validator, which fails on some cryptic jsonschema TypeError (doing re.search() on an int instead of str).

Converting the YAML to JSON first and validating the JSON works, however validating the YAML should also be supported.

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

2 participants