Valspec.Schema (valspec v0.2.0)
View SourceA module dedicated to generating Swagger schemas.
See valspec_schema/1 for more information.
Summary
Functions
Generates both an embedded_schema and a Swagger schema.
Functions
Generates both an embedded_schema and a Swagger schema.
Example:
valspec_schema do
field :id, :uuid, example: "82b557d1-0000-0000-0000-55df16add1b5"
field :name, :string, example: "opts world"
field :type, :enum, values: [:msp, :idn, :facility, :custom]
field :account_id, :uuid
field :location_id, :uuid
field :updated_at, :utc_datetime
end