You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a response does not define an explicit example section, there is no Response Example panel shown. I'd like to see the panel with default example values displayed, much like how the request body shows the example values in Elements, and similar to the behavior of swagger UI.
Essentially what's asked here is to always display Example Response panel, using the data type and example value of each individual field in the response schema.
Current Behavior
No "Response Example" panel displayed unless that response content defines an explicit example block.
Expected Behavior
API spec author does not need to create an example block for each response type, Elements always display the Response Example panel using the schema fields definitions.
Possible Solution(s)
Today if one clicks a schema on the left column, Elements already displays an Example panel using the individual schema field definition. We just need to have the same contents displayed when showing the API endpoints.
One reason that we prefer not to create an explicit example section is such definition is separate from the schema fields, and has the inherited risk of not matching the actual schema when the schema changes.
The text was updated successfully, but these errors were encountered:
snowbug
changed the title
Display a default response example from schema fields when no explicit example block provided
Always display the Response Example panel even no explicit example block provided
Dec 29, 2022
Context
If a response does not define an explicit
example
section, there is no Response Example panel shown. I'd like to see the panel with default example values displayed, much like how the request body shows the example values in Elements, and similar to the behavior of swagger UI.Essentially what's asked here is to always display Example Response panel, using the data type and
example
value of each individual field in the response schema.Current Behavior
No "Response Example" panel displayed unless that response content defines an explicit
example
block.Expected Behavior
API spec author does not need to create an
example
block for each response type, Elements always display the Response Example panel using the schema fields definitions.Possible Solution(s)
Today if one clicks a schema on the left column, Elements already displays an Example panel using the individual schema field definition. We just need to have the same contents displayed when showing the API endpoints.
One reason that we prefer not to create an explicit example section is such definition is separate from the schema fields, and has the inherited risk of not matching the actual schema when the schema changes.
The text was updated successfully, but these errors were encountered: