-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Specification OpenAPI - Field (exclusiveMinimum, exclusiveMaximum) #3541
Comments
I found this is a Pydantic issue. It seems it depends on the version of JSONSchema the OpenAPI is targeting. |
@JuanBenitezDev I understand, but I found that Spec OpenAPI V2 is also Boolean. https://github.com/OAI/OpenAPI-Specification/blob/main/schemas/v2.0/schema.json |
@carlos-rian Yeah I know, but Pydantic is generating schemas that are compliant with the last versions of the specifications. You can see that here The last version of OpenAPI at the time I'm writing this is 3.1. This new version is based on the JSON Schema Draft 2020-12, here the exclusiveMinimum and exclusiveMaximum are numbers, you can see them here You can even check what are the things changing from OpenAPI v3 to v3.1 here My guess is that Azure API Management is expecting a specific OpenAPI version. |
See #240 for more discussion. As workaround you could use Query(..., ge=11) instead of Query(..., gt=10) |
exclusiveMinimum causes problems with openapi spec validation: tiangolo/fastapi#240 tiangolo/fastapi#3541
@JuanBenitezDev I understand, it´s makes sense. Thanks you! Hi @Alexander-N. Yes. I've seen some discussions about this. I solved the problem using |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Spec Bug
I'm creating my documentation using "FastAPI". I'm having trouble importing the generated schema into Azure API Management. Because when I use the "gt" argument in the "Query" object, it defines the exclusiveMinimum field, in the OpenAPI documentation, this field is a boolean, but in FastAPI it is defined with Integer!
Spec OpenAPI:
Schema OpenAPI FastAPI
FastAPI Query
FastAPI Docs
The text was updated successfully, but these errors were encountered: