View Source Swagdox.Schema (swagdox v0.3.0)

This module provides a way to extract the fields and types of an Ecto.Schema.

Summary

Types

@type property() :: {atom(), atom(), keyword()}
@type t() :: %Swagdox.Schema{
  description: String.t(),
  example: term(),
  module: module(),
  properties: [property()],
  required: [atom()],
  type: String.t()
}

Functions

@spec description(module()) :: String.t()
@spec example(module()) :: any()
@spec infer(module()) :: t()
@spec name(t()) :: String.t()
@spec properties(module()) :: [property()]
@spec reference(t() | String.t()) :: String.t()
Link to this function

render(schema, version \\ "3.0.0")

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