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

Can't handle duplicate path #239

Closed
koug44 opened this issue Jul 8, 2021 · 1 comment · Fixed by #244
Closed

Can't handle duplicate path #239

koug44 opened this issue Jul 8, 2021 · 1 comment · Fixed by #244
Assignees

Comments

@koug44
Copy link

koug44 commented Jul 8, 2021

Here is the simple bug to show the bug. Sanic server has two handlers having the same path:

from sanic import Sanic
from sanic.response import json
from sanic_openapi import openapi2_blueprint

app = Sanic(name="AwesomeApi")
app.blueprint(openapi2_blueprint)


@app.get("/path")
async def test(request):
    return json({"hello": "world"})


@app.post("/path")
async def post_test(request):
    return json({"hello": "world"})


if __name__ == "__main__":
    app.run(host="0.0.0.0", port=8000)

Swagger doc only includes one handler

image

@artcg artcg self-assigned this Jul 19, 2021
@artcg
Copy link
Contributor

artcg commented Jul 19, 2021

Thanks for the report, will check that out over next couple days

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 a pull request may close this issue.

2 participants