Add the JSON API exntension for BookId and AuthorRoles.

dev
KKlochko 3 months ago
parent 68169cc78b
commit 877bc63f9b

@ -2,10 +2,15 @@ defmodule DecentralisedBookIndex.Metadata.AuthorRole do
use Ash.Resource,
otp_app: :decentralised_book_index,
domain: DecentralisedBookIndex.Metadata,
data_layer: AshPostgres.DataLayer
data_layer: AshPostgres.DataLayer,
extensions: [AshJsonApi.Resource]
alias DecentralisedBookIndex.Metadata
json_api do
type "author_role"
end
postgres do
table "author_role"
repo DecentralisedBookIndex.Repo

@ -2,10 +2,15 @@ defmodule DecentralisedBookIndex.Metadata.BookId do
use Ash.Resource,
otp_app: :decentralised_book_index,
domain: DecentralisedBookIndex.Metadata,
data_layer: AshPostgres.DataLayer
data_layer: AshPostgres.DataLayer,
extensions: [AshJsonApi.Resource]
alias DecentralisedBookIndex.Metadata
json_api do
type "book_id"
end
postgres do
table "book_ids"
repo DecentralisedBookIndex.Repo

Loading…
Cancel
Save