Is your feature request related to a problem? Please describe.
It’s always frustrating to need to write documentation. AshJsonApi generates an OpenApi documentation based on the code which is so nice. It could be even nicer if it could serve the doc as a file.json / file.yaml because those files can be useful to integrate API on other platforms.
Describe the solution you'd like
A command to auto-generate the OpenApi documentation file would be so great, just as the open_api_spex library allows it:
Describe alternatives you've considered
An alternative is to copy/paste the to a file what is generated on the route /api/open_api because it’s already the OpenApi documentation written in JSON.
Ash Api Router:
defmodule MyAppWeb.Support.Router do
use AshJsonApi.Api.Router,
apis: [MyApp.Support],
open_api: "/open_api"
end
-> go to /api/open_api -> copy all code -> create a new file (for instance open_api.json) in your project (for instance in /priv/static) and paste all the code into that file.
Express the feature either with a change to resource syntax, or with a change to the resource interface
Is your feature request related to a problem? Please describe. It’s always frustrating to need to write documentation. AshJsonApi generates an OpenApi documentation based on the code which is so nice. It could be even nicer if it could serve the doc as a file.json / file.yaml because those files can be useful to integrate API on other platforms.
Describe the solution you'd like A command to auto-generate the OpenApi documentation file would be so great, just as the open_api_spex library allows it:
Source = https://hexdocs.pm/open_api_spex/readme.html#generating-the-spec
Describe alternatives you've considered An alternative is to copy/paste the to a file what is generated on the route /api/open_api because it’s already the OpenApi documentation written in JSON.
Ash Api Router:
-> go to
/api/open_api
-> copy all code -> create a new file (for instance open_api.json) in your project (for instance in /priv/static) and paste all the code into that file.Express the feature either with a change to resource syntax, or with a change to the resource interface
I don’t know.
Additional context
Nothing more to say.