View Source API Reference Parameter v0.14.1

Modules

Parameter helps you shape data from external sources into Elixir internal types. Use it to deal with any external data in general, such as API integrations, parsing user input, or validating data that comes into your system.

Enum type represents a group of constants that have a value with an associated key.

The field inside a Parameter Schema have the following structure

Custom types for fields can be done by implementing the Parameter.Parametrizable behaviour. This is useful when the basic types provided by Parameter.Types are not enough for loading, validating and dumping data.

The first step for building a schema for your data is to create a schema definition to model the external data. This can be achieved by using the Parameter.Schema macro.

Parameter supports different types to be used in the field inside a schema. The available types are

Any parameter type. It will accept any input value without validations. The same value loaded will be the same dumped.

Array parameter type

Atom parameter type

Boolean parameter type

Date parameter type

DateTime parameter type

Decimal parameter type. Include the Decimal library on your application to use this type

Float parameter type

Integer parameter type

Map parameter type

NaiveDateTime parameter type

String parameter type

Time parameter type

Common validators to use within fields of the Parameter.Schema