How do i add `allowed options`/ choices to a query parameter in sanic-openapi

265 Views Asked by At

So for an endpoint as shown below, how do i specify that the allowed values are :- day, week, month ?

Python Version: 3.8, Sanic-Openapi version: 0.7.1

@app.get("/test")
@openapi.tag("Test")
@openapi.summary('Get Data')
@openapi.description('Just a demo')
@openapi.parameter("timeframe", str, location="query")

Please let me know if i need to add any other information/context. Thanks

0

There are 0 best solutions below