absinthe v1.3.0-beta.1 Mix.Tasks.Absinthe.Schema.Json
Generate a schema.json file
Usage
absinthe.schema.json [OPTIONS] [FILENAME]
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
Summary
Functions
A task needs to implement run
which receives
a list of command line args.
Callback implementation for Mix.Task.run/1
.