ash_json_api_wrapper/lib/field.ex
Zach Daniel 4cf510fbd8 WIP
2021-10-29 22:40:27 -04:00

23 lines
527 B
Elixir

defmodule AshJsonApiWrapper.Field do
defstruct [:name, :path, :write_path]
@type t :: %__MODULE__{}
def schema do
[
name: [
type: :atom,
required: true,
doc: "The attribute this field is configuring"
],
path: [
type: :string,
doc: "The path of the value for this field, relative to the entity's path"
],
write_path: [
type: {:list, :string},
doc: "The list path of the value for this field when writing."
]
]
end
end