[FEATURE] Let us boost our OpenAPI capabilities!!
See original GitHub issueIs your feature request related to a problem? Please describe. I want to control the “Example value” of my “Request body”. RIght now, we only get something like this:
{
"string_field": "string"
}
I should be able to control this behaviour, like
{
"string_field": "Default value for string_field"
}
Describe alternatives you’ve considered I thought that declaring default values might change the values in the swagger, but even that does not work. It would even be a bad behaviour, as we would tightly couple Swagger documentation with API behaviour.
Additional context Add any other context or screenshots about the feature request here.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Big thoughts for 4.0 · Issue #2925 · OAI/OpenAPI-Specification
We would like to take an opportunity to discuss what might be some big, radical changes that could be done in a 4.0...
Read more >OpenAPI 3.0, And What it Means for the Future of Swagger
This webinar: OpenAPI 3.0, And What it Means for the Future of Swagger, provides an in-depth look at the new OpenAPI 3.0 (OAS3.0) ......
Read more >How I use an OpenAPI spec in my Angular projects
Let me show you how I use OpenAPI to boost up my productivity! Here is a brief introduction if you're not familiar with...
Read more >Generate a new function app from an OpenAPI specification
This new capability automatically generates all the necessary functions for your API, preconfigured based on the OpenAPI specification.
Read more >Configure API docs functionality - Redocly
Configuration options for API docs. To control the functionality of your API documentation, specify the configuration options depending on ...
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
Hi,
The documentation does not contain the “example” field. Can you get this info added, as it helps a lot with OpenAPI configuration.
Thanks for the help!! Closing this ticket 😄
Best, Gautam
Hello! At the moment you already can set the example value of field. For example:
More about it: https://fastapi.tiangolo.com/tutorial/query-params-str-validations/