View Source Swagdox.Type (swagdox v0.3.0)

Describes a type in an OpenAPI specification.

Types may carry constraints, expressed as a keyword list. Scalar constraints (enum, format, nullable, min_length, max_length, minimum, maximum, pattern) attach to the schema itself - or, for array types, to the array items. min_items and max_items attach to the array. Nullability is rendered according to the target OpenAPI version: nullable: true for 3.0.x, a "null" type union for 3.1.x.

Summary

Types

@type variable() :: String.t() | [String.t()] | atom() | [atom()]

Functions

@spec reference(String.t() | atom()) :: map()
Link to this function

render(type, constraints \\ [], version \\ "3.0.0")

View Source
@spec render(variable(), keyword(), String.t()) :: map()