Skip to content

Commit

Permalink
Document CLI flags of mix openapi.spec.json
Browse files Browse the repository at this point in the history
  • Loading branch information
zorbash committed Mar 24, 2022
1 parent 95c0e96 commit 6b9f6d3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/mix/tasks/openapi.spec.json.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
defmodule Mix.Tasks.Openapi.Spec.Json do
@moduledoc """
Serialize the given OpenApi spec module to a JSON file.
## 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 --vendor-extensions=false
## 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)
* `--vendor-extensions` - Whether to include open_api_spex OpenAPI vendor extensions
(defaults to true)
"""
use Mix.Task
require Mix.Generator
Expand Down

0 comments on commit 6b9f6d3

Please sign in to comment.