-
Notifications
You must be signed in to change notification settings - Fork 120
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
Invalid OAS file generation for Page #1110
Labels
question
Further information is requested
Comments
Hi @rolikoff, Could you please show how you generate OpenAPI schema? Here is what component definition looks like in my case: from fastapi import FastAPI
from fastapi_pagination import Page, add_pagination, paginate
app = FastAPI()
add_pagination(app)
@app.get("/")
async def get_items() -> Page[int]:
return paginate([]) {
"Page_int_": {
"properties": {
"items": {
"items": {
"type": "integer"
},
"type": "array",
"title": "Items"
},
"total": {
"type": "integer",
"minimum": 0.0,
"title": "Total"
},
"page": {
"type": "integer",
"minimum": 1.0,
"title": "Page"
},
"size": {
"type": "integer",
"minimum": 1.0,
"title": "Size"
},
"pages": {
"type": "integer",
"minimum": 0.0,
"title": "Pages"
}
},
"type": "object",
"required": [
"items"
],
"title": "Page[int]"
}
} But it use |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm currently integrating a library with my FastAPI project and utilizing the following library versions:
I've established a test route within my project as follows:
However, I've encountered an issue with the OpenAPI Specification (OAS) YAML file generated, as it includes incorrect schema types:
I understand that OAS version 3.0.2 does not support
null
types, which may not be a direct issue withfastapi-pagination
. Minimum values are not ints, which is odd as well. Could you provide any insights into the underlying problem or suggest a possible solution?The text was updated successfully, but these errors were encountered: