ApiCommons.Parameter.Check (ApiCommons v0.1.0) View Source
Similar to Ecto.Changeset. Collects and holds information on valid and invalid parameters passed to the endpoint. Collect information on validity of endpoint parameter check ups.
Struct Keys
- valid? (boolean) Are the provided parameters are valid?
- schema (Ecto.Schema|nil) A schema to check parameter against
- parsed (Map) The parsed values
- opts (List) Additional options passed down
- errors - The errors accumulated while checking the parameters
Link to this section Summary
Functions
Save checks on parametersUpdate check with single parameter checks.
## Parameter
- check (Check)
- param (Parameter)
## Returns
- (Check)Perform an update on the check struct.
## Parameters
- field (atom) The field for which to perform an update
- value (any) The value which resulted from performing checks
- check (Check) The old check struct
## Returns
- Updated check struct.Update the parameter checks struct.Link to this section Types
Specs
Link to this section Functions
Save checks on parameters Update check with single parameter checks.
## Parameter
- check (Check)
- param (Parameter)
## Returns
- (Check) Perform an update on the check struct.
## Parameters
- field (atom) The field for which to perform an update
- value (any) The value which resulted from performing checks
- check (Check) The old check struct
## Returns
- Updated check struct. Update the parameter checks struct.