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

Allow JSON-like examples to be shown #225

Closed

Conversation

brendo
Copy link
Contributor

@brendo brendo commented Mar 6, 2017

The API my company is trying to describe with Open API implements JSON API which dictates that the Content Type be set to application/vnd.api+json.

We are encouraging developers to make use of the examples functionality for their endpoints and noticed that the current codebase only shows examples if they matched application/json. This essentially meant our examples were not being displayed by ReDoc.

This change does a fuzzy match to see if the content type contains anything like json. It's working well for us so-far, so thought we'd share back!

@brendo
Copy link
Contributor Author

brendo commented Mar 6, 2017

I also noticed #171, so I realise there might be other ways you'd prefer to support this, and that's fine too 👍

@RomanHotsiy
Copy link
Member

Hey @brendo, thanks for PR. Sorry for long reply, a bit busy with other projects.
I will review and merge it ASAP.

@brendo
Copy link
Contributor Author

brendo commented Mar 11, 2017

Closing in favour of #227

@brendo brendo closed this Mar 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants