Alternera.Resource.Verifiers.Expose (alternera_resource_sdk v0.9.0)

Copy Markdown View Source

Rule 5: every route in expose api: has a primary action of its type (:index and :get a read, :post a create, :patch an update, :delete a destroy), every other name in it and every name in read_only_actions is a generic action of the resource (action :name, type), and every action in expose mcp: exists.

Summary

Functions

The primary action of type, or the only one of that type; nil when there is none.

The action type a JSON:API route kind runs.

Functions

primary_action(dsl, type)

@spec primary_action(module() | map(), atom()) :: Ash.Resource.Actions.action() | nil

The primary action of type, or the only one of that type; nil when there is none.

route_type(route)

@spec route_type(atom()) :: atom()

The action type a JSON:API route kind runs.