Skip to content

Commit 42a1fd5

Browse files
authored
fix: Add with_all_related_resources to resource schemas (#406)
This will make it possible to generate a valid schema containing related resources without adding the whole domain when generating specs
1 parent 30da8be commit 42a1fd5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/ash_json_api/json_schema/open_api.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ if Code.ensure_loaded?(OpenApiSpex) do
168168
{resource_schemas, acc} =
169169
domain
170170
|> resources()
171+
|> with_all_related_resources()
171172
|> Enum.reduce({[], acc}, fn resource, {schemas, acc} ->
172173
{schema, acc} = resource_object_schema(resource, nil, acc)
173174
schema_entry = {AshJsonApi.Resource.Info.type(resource), schema}

0 commit comments

Comments
 (0)