ash-project / ash_json_api

The JSON:API extension for the Ash Framework
https://hexdocs.pm/ash_json_api
MIT License
56 stars 40 forks source link

Feat/open api spex helpers #68

Closed mohammedzeglam-pg closed 1 year ago

mohammedzeglam-pg commented 1 year ago

Contributor checklist

mohammedzeglam-pg commented 1 year ago

it still need tests for delete/update and give me a review and still need this https://github.com/ash-project/ash_json_api/pull/64#issuecomment-1399198801

zachdaniel commented 1 year ago

Hey there, so I like the idea of making a single open api module, but I don't think we should serve it from an individual route. If we make a single one, we should instead do something like this in the router:

open_api "/open_api", apis: [Api1, Api2, Api3]
mohammedzeglam-pg commented 1 year ago
open_api "/open_api", apis: [Api1, Api2, Api3]

so the idea it is not to serve them from same router the idea just make api know how generate open_api schema instead of write new module for every api

zachdaniel commented 1 year ago

Yeah, what I'm getting at is that if each api has its own open api setup, then end-users will need to go through multiple open api specifications. Whereas you should be able to set up one open api specification for a list of apis. So that you have one /open_api route with all of your apis combined (if you want).

mohammedzeglam-pg commented 1 year ago

Yeah, what I'm getting at is that if each api has its own open api setup, then end-users will need to go through multiple open api specifications. Whereas you should be able to set up one open api specification for a list of apis. So that you have one /open_api route with all of your apis combined (if you want).

Genius as usual

zachdaniel commented 1 year ago

Superseded by https://github.com/ash-project/ash_json_api/pull/72