Current section
Files
Jump to
Current section
Files
lib/schemas/response/json_schema.ex
defmodule OpenAi.Response.JSONSchema do
@moduledoc """
Provides struct and type for a Response.JSONSchema
"""
@type t :: %__MODULE__{
description: String.t() | nil,
name: String.t(),
schema: map | nil,
strict: boolean | nil
}
defstruct [:description, :name, :schema, :strict]
@doc false
@spec __fields__(atom) :: keyword
def __fields__(type \\ :t)
def __fields__(:t) do
[description: {:string, :generic}, name: {:string, :generic}, schema: :map, strict: :boolean]
end
end