Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Phoenix Swagger validation in production
def start(_type, _args) do
if Application.fetch_env!(:your_app_name, :production) do
PhoenixSwagger.Validator.parse_swagger_schema(
Path.join(["#{:code.priv_dir(:your_app_name)}", "static", "swagger.json"])
)
else
PhoenixSwagger.Validator.parse_swagger_schema("priv/static/swagger.json")
end
// ... rest of your Phoenix Application start up code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.