diff --git a/lib/open_api_spex/schema.ex b/lib/open_api_spex/schema.ex index f39518d9..44d70f9b 100644 --- a/lib/open_api_spex/schema.ex +++ b/lib/open_api_spex/schema.ex @@ -363,7 +363,8 @@ defmodule OpenApiSpex.Schema do assert ... end """ - @spec example(schema :: Schema.t() | module) :: map | String.t() | number | boolean + @spec example(schema :: Schema.t() | module | Reference.t()) :: + map | String.t() | number | boolean def example(%Schema{example: example} = schema) when not is_nil(example) do schema.example end