How can we set parameter `description` and `example`?
See original GitHub issueIs it currently not possible to set the parameter description
and example
?
From what I can tell the parameter fields supported are:
in
name
required
schema
I’d be interested in contributing if you have an idea in mind how we can support setting a default description
and example
.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Describing Parameters - Swagger
In Swagger, API operation parameters are defined under the parameters section in the operation definition. Each parameter has name , value type (for...
Read more >Parameter - Overview, Examples, and Uses in Statistics
A parameter is used to describe the entire population being studied. For example, we want to know the average length of a butterfly....
Read more >Swashbuckle parameter descriptions - Stack Overflow
Parameters should be explicitly decorated with either [FromRoute] , [FromQuery] , [FromBody] etc. The same for the method type (get/post/put etc.), which should ......
Read more >Step 3: Parameters (API reference tutorial) | Documenting APIs
In this example, the parameters are grouped by type: path parameters, query parameters, and body parameters. The endpoint also sets off the ...
Read more >Create a parameter query (Power Query) - Microsoft Support
Use a parameter to change a data source · To set the folder name as a parameter, in Query Settings, under Query Steps,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The second example if very helpful and I think most users might need it. Wouldn’t it be great to add it to the package?
There’s no place to define
description
andexample
out of the box, that’s correct. Couple of ways around this come to mind:using QueryParams/Params etc instead of QueryParam/Param:
my ID query parameter
description then ends up in theparameters[0].schema
object. We’re missing handling for@Params
right now so that would need to be added.adding another decorator , something along the lines of:
Now description ends up in
parameters[0]
- not insideschema
like above.