Skip to content

Path params:value is not a valid integer why i get this? #11572

Discussion options

You must be logged in to vote

There is a bug in current version of Swagger UI (swagger-api/swagger-ui#9928).
Latest version of FastAPI pins Swagger UI version to 5.9.0. But FastAPI 0.99.1 (which you use) uses latest version of Swagger UI, which contains mentioned bug.

To solve your problem you can pin Swagger UI version to 5.9.0 adding the following code to your project:

app = FastAPI(docs_url=None)  # Disable default docs

from fastapi.openapi.docs import (get_swagger_ui_html,
                                  get_swagger_ui_oauth2_redirect_html)

@app.get("/docs", include_in_schema=False)
async def custom_swagger_ui_html():
    return get_swagger_ui_html(
        openapi_url=app.openapi_url,
        title=app.title …

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@dongruixiao
Comment options

Comment options

You must be logged in to vote
1 reply
@dongruixiao
Comment options

Answer selected by dongruixiao
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question or problem
2 participants