mix absinthe.gen.type (absinthe_generator v0.1.2) View Source
Generates an Absinthe Type
Options
:app_name
(String.t/0
) - Required. Application name you're generating the code under:type_name
(String.t/0
) - Required. name of the type:moduledoc
(String.t/0
) - Moduledoc message can be injected into the resulting output code:enums
(list ofkeyword/0
) - List of %AbsintheGenerator.Type.EnumValue
{}:objects
(list ofkeyword/0
) - List of %AbsintheGenerator.Type.Object
{}
Specifying Types
To specify types we can utilize the following syntax
type_name:enum:VALUE_1:VALUE_2:VALUE_3
type_name:object:name:string:birthday:date:names:list_of(string)
Example
mix absinthe.gen.type
animal:enum:CAT:DOG
user:object:name:string:birthday:date:id:id:animal:animal
--app-name MyApp
--type-name people
Link to this section Summary
Functions
Callback implementation for Mix.Task.run/1
.
Link to this section Functions
Callback implementation for Mix.Task.run/1
.