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

[Bug] Can't apply openapi decorators to blueprintss' routes #237

Closed
EverettDunamu opened this issue Jan 24, 2024 · 0 comments
Closed

[Bug] Can't apply openapi decorators to blueprintss' routes #237

EverettDunamu opened this issue Jan 24, 2024 · 0 comments

Comments

@EverettDunamu
Copy link

Describe the bug
A clear and concise description of what the bug is. It there is error log, please provide it.

  • I have an Sanic app and I registered some blueprints to it with openapi decorators
  • I cannot make any change from openapi decorators in this case.

Screenshots
The screenshots of Swagger UI if this bug is related to it.

To Reproduce
Your code snippet or steps to reproduce the bug.

my_blueprint = Blueprint("MyBlueprint")

@my_blueprint.get("/my-route")
@openapi.summary("I want to apply this summary!") # it is not working
async def get_my_route(request):
    return response.json({})
app = Sanic("MyApp")
app.blueprint(my_blueprint)

app.run()

Expected behavior
A clear and concise description of what you expected to happen.

I want to show the result of applied summary written in the above example.

Environment (please complete the following information):

  • OS: macOS
  • Browser: Chrome
  • Version: 120.0.6099.234

Additional context
Add any other context about the problem here. This might be how to fix this bug or some hint to fix it.

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

No branches or pull requests

1 participant