View Source DSL: AshJsonApi.Api

The entrypoint for adding JSON:API behavior to an Ash API

json_api

Global configuration for JSON:API

Nested DSLs

Examples

json_api do
  prefix "/json_api"
  log_errors? true
end

Options

NameTypeDefaultDocs
routeratomThe router that you created for this Api. Use by test helpers to send requests
prefixString.tThe route prefix at which you are serving the JSON:API
serve_schema?booleanfalseWhether or not create a /schema route that serves the JSON schema of your API
authorize?booleantrueWhether or not to perform authorization for this API
log_errors?booleantrueWhether or not to log any errors produced
include_nil_values?booleantrueWhether or not to include properties for values that are nil in the JSON output

json_api.open_api

OpenAPI configurations

Examples

json_api do
  ...
  open_api do
    tag "Users"
    group_by :api
  end
end

Options

NameTypeDefaultDocs
tagString.tTag to be used when used by :group_by
group_by:api | :resource:resourceGroup by :api or :resource