absinthe v1.4.13 mix absinthe.schema.json View Source
Generate a schema.json file
Usage
absinthe.schema.json [FILENAME] [OPTIONS]
Options
--schema The schema. Default: As configured for `:absinthe` `:schema`
--json-codec Sets JSON Codec. Default: Poison
--pretty Whether to pretty-print. Default: false
Examples
Write to default path ./schema.json using the :schema configured for
the :absinthe application and the default Poison JSON codec:
$ mix absinthe.schema.json
Write to default path ./schema.json using the MySchema schema and
the default Poison JSON codec.
$ mix absinthe.schema.json --schema MySchema
Write to path /path/to/schema.json using the MySchema schema, using the
default Poison JSON codec, and pretty-printing:
$ mix absinthe.schema.json --schema MySchema --pretty /path/to/schema.json
Write to default path ./schema.json using the MySchema schema and
a custom JSON codec, MyCodec:
$ mix absinthe.schema.json --schema MySchema --json-codec MyCodec
Link to this section Summary
Link to this section Functions
A task needs to implement run which receives
a list of command line args.
Callback implementation for Mix.Task.run/1.