PhoenixSwagger.Schema.properties
You're seeing just the macro
properties
, go back to PhoenixSwagger.Schema module for more information.
Defines multiple properties for a schema with a custom DSL syntax.
Examples
iex> alias PhoenixSwagger.Schema
...> %Schema{type: :object}
...> |> Schema.properties do
...> name :string, "Full Name", required: true
...> dateOfBirth :string, "Date of birth", format: :datetime
...> end
%PhoenixSwagger.Schema{
type: :object,
properties: %{
name: %PhoenixSwagger.Schema{
type: :string,
description: "Full Name",
},
dateOfBirth: %PhoenixSwagger.Schema{
type: :string,
description: "Date of birth",
format: :datetime
}
},
required: [:name]
}