python-openapi / openapi-spec-validator

OpenAPI Spec Validator is a CLI, pre-commit hook and python package that validates OpenAPI Specs against the OpenAPI 2.0 (aka Swagger), OpenAPI 3.0 and OpenAPI 3.1 specification.
Apache License 2.0
329 stars 61 forks source link

validator fails on any 3.1 spec #247

Closed paulch42 closed 1 year ago

paulch42 commented 1 year ago

Running the validator against a 3.1 spec immediately results in the error

'float' object has no attribute 'startswith'

Looks like a Python type error. Tried on Python 3.8 and 3.11 and both throw the error. No issues with a 3.0 spec.

paulch42 commented 1 year ago

Incorrectly raised. The first line was

openapi: 3.1

but it should be

openapi: "3.1.0"