fastapi-crudrouter icon indicating copy to clipboard operation
fastapi-crudrouter copied to clipboard

JSON:API compliant API

Open ghilesmeddour opened this issue 3 years ago • 2 comments
trafficstars

Hi @awtkns 👋

Thank you for this great library, really convenient and handy ❤️

For a couple of days I've been looking for a simple and clean way to build a JSON:API compliant API with FastAPI, but I did not find anything suitable.

This has already been discussed here and here. @tiangolo says that the support should be done by an external library, and it wouldn't really make sense to have built-in support in FastAPI for automatically generating JSON-API as FastAPI doesn't have any compromise about which DB or ORM (or similar) to use.

When I came across fastapi-crudrouter, I thought it might be the right place to support this (the lib already offers pagination, it would be a matter of offering also filtering, sorting, limiting and a compliant output format). What do you think?

ghilesmeddour avatar Mar 05 '22 10:03 ghilesmeddour

has anyone already seen/mentioned this https://github.com/Zenor27/fastapi-rest-jsonapi ?

I believe above repo is using "marshmallow_jsonapi" under the hood to define the relationships in response schemas. Although, I'm not too sure how does this affect the serialization/de-serialization in terms of speed and performance. Might be an option to explore and possibly merge/cherry-pick the crudrouter into the repo or vice-versa.

harshalchaudhari35 avatar Apr 03 '22 13:04 harshalchaudhari35

has anyone already seen/mentioned this https://github.com/Zenor27/fastapi-rest-jsonapi ?

I believe above repo is using "marshmallow_jsonapi" under the hood to define the relationships in response schemas. Although, I'm not too sure how does this affect the serialization/de-serialization in terms of speed and performance. Might be an option to explore and possibly merge/cherry-pick the crudrouter into the repo or vice-versa.

that would br super cool! will check it out

auvipy avatar Apr 12 '22 09:04 auvipy