Skip to content

Conversation

@alchzh
Copy link
Contributor

@alchzh alchzh commented Nov 19, 2025

Trying to create a schema that uses const with a non-string value crashes

Per the specification:

The value of this keyword MAY be of any type, including null.

https://json-schema.org/draft/2020-12/json-schema-validation#section-6.1.3

Checklist:

  • Run pytest tests and no failed.
  • Run ruff check flask_openapi3 tests examples and no failed.
  • Run ruff format flask_openapi3 tests examples and no failed.
  • Run mypy flask_openapi3 and no failed.
  • Run mkdocs serve and no failed.

Trying to create a schema that uses `const` with a non-string value crashes

Per the specification:
> The value of this keyword MAY be of any type, including null.

https://json-schema.org/draft/2020-12/json-schema-validation#section-6.1.3
@luolingchun luolingchun merged commit 21961b7 into luolingchun:master Nov 19, 2025
10 checks passed
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