There's the "router" argument
swagger_files: %{
"priv/static/swagger.json" => [
router: MyAppWeb.Router, # phoenix routes will be converted to swagger paths
endpoint: MyAppWeb.Endpoint # (optional) endpoint config used to set host, port and https schemes.
]
}
What if I needed to create Swagger docs for only a part of all the routes in my router.ex?
Or if I had multiple APIs in it? private one, public one, something else
In other words, how will phoenix_swagger know which scope it must generate API docs for? I might name my api route-scope /my_super_route rather than /api.
Or does it use priv/static/swagger.json only and doesn't care what's in router.ex?
There's the "router" argument
What if I needed to create Swagger docs for only a part of all the routes in my
router.ex?Or if I had multiple APIs in it? private one, public one, something else
In other words, how will
phoenix_swaggerknow which scope it must generate API docs for? I might name my api route-scope/my_super_routerather than/api.Or does it use
priv/static/swagger.jsononly and doesn't care what's in router.ex?