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

Add model examples #191

Open
ehmicky opened this issue Sep 10, 2019 · 0 comments
Open

Add model examples #191

ehmicky opened this issue Sep 10, 2019 · 0 comments
Labels
enhancement specification OpenAPI specification

Comments

@ehmicky
Copy link
Contributor

ehmicky commented Sep 10, 2019

It is very useful for developers to be able to visualize how a specific model, request body or response body might look instead of just seeing the attribute type.

There are several ways to do this, which might look differently depending on which HTML template we are using (see #182):

  • setting schema.example for each model attribute. This approach is probably the best. I think some HTML template might require this to be called x-example instead.
  • setting response.examples for each endpoint response.
@ehmicky ehmicky added enhancement specification OpenAPI specification labels Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement specification OpenAPI specification
Projects
None yet
Development

No branches or pull requests

1 participant