swagger-ui: json-api does not appear to be supported
Using swagger-ui 3.0.10 (currently use dev HEAD) I’m not able to get json-api to work correctly.
The request and response content types are displayed as application/vnd.api+json which is what my server is set to, so that’s good.
However, the Example Value is structured as a JSON object instead of JSON-API. A simple fix for this would be to take the current example value and put it into a data object:
data: {
   attributes: {
      // what is currently showing up as the Example Value.
   }
}
A related issue is that “Try it out” does not work, because its not sending properly formatted json-api data.
There are several javascript json-api implementations, include one in redux. http://jsonapi.org/implementations/#client-libraries-javascript
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 22 (10 by maintainers)
I’m not sure whether my problem is included in your discussion. If I change
application/jsontoapplication/vnd.api+json(JSON API content type), the example is not rendered anymore. Could swagger-ui treatvnd.api+jsonexactly likejsonand render the example the same way?