question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

json-api does not appear to be supported

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:22 (10 by maintainers)

github_iconTop GitHub Comments

6reactions
cemsbrcommented, Oct 20, 2017

I’m not sure whether my problem is included in your discussion. If I change application/json to application/vnd.api+json (JSON API content type), the example is not rendered anymore. Could swagger-ui treat vnd.api+json exactly like json and render the example the same way?

0reactions
adhamhfcommented, May 18, 2017

Thanks all. I appreciate your time. I don’t think I’ve been able to convey the advantages of my proposal correctly, or maybe even the proposal itself. The downsides of text based communication.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JSON:API — Frequently Asked Questions
Now that JSON:API has reached a stable version 1.0, it will always be backwards compatible using a never remove, only add strategy. A...
Read more >
Computed field properties do not appear in JSON:API ... - Drupal
Problem/Motivation I am using the Serial module (https://drupal.org/project/serial) which provides an auto-increment field type.
Read more >
Json API - elide.io
JSON-API has no standardized schema introspection. ... Elide supports three mechanisms by which a newly created entity is assigned an ID:.
Read more >
How I use JSON API - Tobias Davis
Smart engineers will look for pre-existing design work, so they don't have to ... Our goal was to modify the JSON-API spec to...
Read more >
JSON API Cheatsheet - Key Shift in Cmd
When data is not present. Array of resource objects that are either: Related to the primary data and/or; Related to each other. jsonapi....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found