Json-server: Which JSON API conventions does json-server use?

Created on 30 Jun 2016  路  4Comments  路  Source: typicode/json-server

So let me start out by saying that json-server has been a godsend. So thank you for that.

I've been using json-server to stub out the front-end, and now we're writing the actual API with .NET. When talking to the back-end devs about features of json-server like _embed and _expand, their question is "Is that just a json-server thing of does it follow a convention?" And I don't know how to answer their questions.

Most helpful comment

Wtf?

All 4 comments

Happy that you find it useful, thank you :)
It's just a JSON Server thing but you can find some equivalent param in JSON API (include).

I would suggest that until the back-end is ready use _embed and _expand in your front. And when the real back-end is available, just replace _embed/_expand with your convention.

Awesome. Thanks!

Wtf?

In case others also still finding this on a search.

For the JSON:API, I found Thomas-X/jsonapi-mock (which is inspired by json-server) and holidayextras/jsonapi-server useful, where the latter can be a whole server, but if you look at the example, you'll find that it can also serve static data, where you can also quite easily implement Faker.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Isanderthul picture Isanderthul  路  3Comments

fishenal picture fishenal  路  3Comments

TXRRNT picture TXRRNT  路  4Comments

sboudouk picture sboudouk  路  3Comments

casvil picture casvil  路  4Comments