Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate example request body as well as schema #43

Open
clarkm5 opened this issue Aug 15, 2024 · 2 comments
Open

Generate example request body as well as schema #43

clarkm5 opened this issue Aug 15, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@clarkm5
Copy link

clarkm5 commented Aug 15, 2024

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

@HiDeoo
Copy link
Owner

HiDeoo commented Aug 15, 2024

Thanks for your feedback 🙌

By quickly taking a look at the Swagger Editor, the current view is close to their Schema view:

image

I'm assuming you're referring to the Example Value they also provide?

image

If yes, I could imagine that being a possible enhancement, may need to think about how it could work and how to best integrate it with the current design but it's definitely something we could consider.

@HiDeoo HiDeoo added the enhancement New feature or request label Aug 15, 2024
@mshadbolt
Copy link

It would also be useful to create an example curl request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants