chore: use an auto generated identifier

This commit is contained in:
Zach Daniel 2023-10-21 22:39:21 -04:00
parent 517a90dd4e
commit 98e4e3eadb
3 changed files with 4 additions and 3 deletions

View file

@ -21,6 +21,7 @@ defmodule AshJsonApiWrapper.DataLayer do
name: :endpoint,
target: AshJsonApiWrapper.Endpoint,
schema: AshJsonApiWrapper.Endpoint.schema(),
identifier: {:auto, :unique_integer},
docs: """
Configure the endpoint that a given action will use.

View file

@ -24,8 +24,7 @@ defmodule AshJsonApiWrapper.DataLayer.Transformers.SetEndpointDefaults do
paginator: endpoint.paginator || base_paginator,
fields:
Enum.reject(base_fields, &(&1.name in endpoint_field_names)) ++ endpoint.fields
},
&(&1.action == endpoint.action)
}
)}
end)
end

View file

@ -9,7 +9,8 @@ defmodule AshJsonApiWrapper.Endpoint do
:get_for,
:runtime_sort?,
:limit_with,
:paginator
:paginator,
:__identifier__
]
@type t :: %__MODULE__{}