openapi-spec-validator
openapi-spec-validator copied to clipboard
openapi-spec-validator fails for integer response codes
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...
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.