Skip to content

Commit

Permalink
fix: add back in api level verifiers
Browse files Browse the repository at this point in the history
I have no idea how or why these were removed, but it shouldn't have happened
  • Loading branch information
zachdaniel committed Dec 10, 2023
1 parent e8da3bf commit 22ba69d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/ash/api/dsl.ex
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ defmodule Ash.Api.Dsl do

@sections [@api, @resources, @execution, @authorization]

@verifiers [
Ash.Api.Verifiers.EnsureNoEmbeds,
Ash.Api.Verifiers.EnsureResourcesCompiled,
Ash.Api.Verifiers.ValidateRelatedResourceInclusion
]

@moduledoc """
Apis are the entrypoints for working with your resources.
Expand All @@ -148,5 +154,5 @@ defmodule Ash.Api.Dsl do
environment variables called `:ash_apis` and `:ash_registries` to find any potential registries
"""

use Spark.Dsl.Extension, sections: @sections
use Spark.Dsl.Extension, sections: @sections, verifiers: @verifiers
end
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ defmodule Ash.Api.Verifiers.ValidateRelatedResourceInclusion do
dsl
|> Verifier.get_entities([:resources])
|> Enum.map(& &1.resource)
|> IO.inspect()

for resource <- resources do
for relationship <- Ash.Resource.Info.relationships(resource) do
Expand Down

0 comments on commit 22ba69d

Please sign in to comment.