Skip to content

Commit

Permalink
Document the spec export task --filename option
Browse files Browse the repository at this point in the history
  • Loading branch information
zorbash committed Sep 4, 2023
1 parent c1dbca1 commit f90bc11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/mix/tasks/openapi.spec.json.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
defmodule Mix.Tasks.Openapi.Spec.Json do
@default_filename "openapi.json"
@moduledoc """
Serialize the given OpenApi spec module to a JSON file.
Expand All @@ -21,12 +22,12 @@ defmodule Mix.Tasks.Openapi.Spec.Json do
(defaults to true)
* `--quiet` - Whether to disable output printing (defaults to false)
* `--filename` - The output filename (defaults to "#{@default_filename}")
"""
use Mix.Task
require Mix.Generator

@default_filename "openapi.json"

@impl true
def run(argv) do
{opts, _, _} = OptionParser.parse(argv, strict: [start_app: :boolean])
Expand Down
4 changes: 3 additions & 1 deletion lib/mix/tasks/openapi.spec.yaml.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
defmodule Mix.Tasks.Openapi.Spec.Yaml do
@default_filename "openapi.yaml"
@moduledoc """
Serialize the given OpenApi spec module to a YAML file.
Expand All @@ -18,11 +19,12 @@ defmodule Mix.Tasks.Openapi.Spec.Yaml do
(defaults to true)
* `--quiet` - Whether to disable output printing (defaults to false)
* `--filename` - The output filename (defaults to "#{@default_filename}")
"""
use Mix.Task
require Mix.Generator

@default_filename "openapi.yaml"
@dialyzer {:nowarn_function, encoder: 0}

@impl Mix.Task
Expand Down

0 comments on commit f90bc11

Please sign in to comment.