View Source mix openapi.spec.json (open_api_spex v3.18.3)

Serialize the given OpenApi spec module to a JSON file.

examples

Examples

$ mix openapi.spec.json --spec PhoenixAppWeb.ApiSpec apispec.json
$ mix openapi.spec.json --spec PhoenixAppWeb.ApiSpec --pretty=true
$ mix openapi.spec.json --spec PhoenixAppWeb.ApiSpec --start-app=false
$ mix openapi.spec.json --spec PhoenixAppWeb.ApiSpec --vendor-extensions=false

command-line-options

Command line options

  • --spec - The ApiSpec module from which to generate the OpenAPI JSON file

  • --pretty - Whether to prettify the generated JSON (defaults to false)

  • --start-app - Whether need to start application before generate schema (defaults to true)

  • --vendor-extensions - Whether to include open_api_spex OpenAPI vendor extensions (defaults to true)

  • --quiet - Whether to disable output printing (defaults to false)

  • --filename - The output filename (defaults to "openapi.json")