Closed col closed 3 days ago
This is a great idea!
I think what we could do perhaps for the configuration is instead is something like
formats: [
json: "/json",
yaml: "/yaml"
]
Then, for each format, we serve the schema at that format at that route. The default would be
[json: "/"]
This avoids having to choose between one or the other.
Then, we'll make the yaml one error if Ymlr
is not defined (if Code.ensure_loaded?(Ymlr)
, and explain in the docs that you need to add that dependency for it to work.
Happy to update the PR. Will find some time within the next week.
Add an option to specify the format for the open api spec.
Usage:
Would require an additional dependency
{:ymlr, "~> 2.0"}
Contributor checklist