starlight-openapi icon indicating copy to clipboard operation
starlight-openapi copied to clipboard

Generate example request body as well as schema

Open clarkm5 opened this issue 6 months ago • 1 comments

Is your feature request related to a problem?

The first thing I tend to look for when using a new API is an example of a request. I will then look at the schema for more information as necessary.

Unless I've missed it, we can't currently generate an example json request body from the OpenAPI doc.

Describe the solution you'd like

Tabs to select an example payload or schema view of request and response

Describe alternatives you've considered

I could embed the json manually in a description field but this is obviously less ideal than schema based generation

Additional Context

No response

clarkm5 avatar Aug 15 '24 11:08 clarkm5