Closed AWegnerGitHub closed 4 years ago
Hi @AWegnerGitHub, I think you can add description by:
from sanic import Sanic
from sanic_openapi import doc, swagger_blueprint
app = Sanic("test")
app.blueprint(swagger_blueprint)
@app.get("/")
@doc.consumes({"X-API-VERSION": doc.String("The version of API")}, location="header")
async def test(request):
return {}
app.run()
And it will looks like:
Please have a try. 😃 And, I will close this issue first. If you have any questions, please feel free to reopen it.
Is your feature request related to a problem? Please describe your use case. Allow users a way to provide a description or prose for a parameter. Sometimes, a description is warranted for specific parameters and being able to add that would be helpful.
Describe the solution you'd like A way to add a description to a parameter.
Additional context
Using this image from the docs as an example, I'd like to be able to describe to the user what
X-API-VERSION
means and possible values in the description column. Maybe some details about trade-offs between specific versions or information about when an older version will be sunset.