cowboy_swagger
cowboy_swagger copied to clipboard
generate swagger.json on build
is there any way to generate swagger.json on build time?
Not at this moment, I don't think. It shouldn't be complex to implement, as a hook on cowboy_swagger:to_json/1
, but I'm not sure we'll want that. @elbrujohalcon?
Yeah… I would say it should not be the default app behaviour. But, if it's clearly optional, we can accept a PR with such changes.
👍 then I propose a behaviour with a single function cowboy_swagger_json_exporter:export/1
where the input is the generated swagger.json
. Then with an application config. key like e.g. json_exporter_mod
, you can add a module name that'll be called when the JSON is done.
Sounds good to me