absinthe v1.2.0-beta.0 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

Callback implementation for Mix.Task.run/1

Functions

run(argv)

Callback implementation for Mix.Task.run/1.