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 verification SchemaValidationException: Reason: Instance type number is invalid. Expected string #2709

Open
rzorzorzo opened this issue Jan 22, 2025 · 1 comment
Assignees
Labels
Milestone

Comments

@rzorzorzo
Copy link

rzorzorzo commented Jan 22, 2025

Version

5.0.0.CR3

Context

in openapi route /users/{id} define id as path parameter of type string
invoke /users/-1

this results in a validation exception:
SchemaValidationException: Reason: Instance type number is invalid. Expected string

according to openapi spec this should not throw an error but should set id="-1"

@rzorzorzo rzorzorzo added the bug label Jan 22, 2025
@rzorzorzo
Copy link
Author

PS:
/users/1 is ok, but /users/-1 throws an error instead of setting id="-1"

@tsegismont tsegismont added this to the 5.0.0 milestone Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants