reactiveadmin 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +88 -0
- data/LICENSE +21 -0
- data/README.md +81 -0
- data/app/assets/reactive_admin/bridge.js +89 -0
- data/app/controllers/reactive_admin/api_controller.rb +30 -0
- data/app/controllers/reactive_admin/client_errors_controller.rb +38 -0
- data/app/controllers/reactive_admin/manifest_controller.rb +10 -0
- data/app/controllers/reactive_admin/mcp_controller.rb +48 -0
- data/app/controllers/reactive_admin/openapi_controller.rb +13 -0
- data/app/controllers/reactive_admin/session_controller.rb +11 -0
- data/app/views/layouts/reactive_admin/embed.html.erb +30 -0
- data/lib/generators/reactiveadmin/install/install_generator.rb +341 -0
- data/lib/generators/reactiveadmin/install/templates/menu.rb.tt +25 -0
- data/lib/generators/reactiveadmin/install/templates/reactive_admin.rb.tt +53 -0
- data/lib/generators/reactiveadmin/install/templates/reactive_admin_annotated.rb.tt +110 -0
- data/lib/reactive_admin/aa/v3/controller.rb +76 -0
- data/lib/reactive_admin/aa/v3/forms.rb +29 -0
- data/lib/reactive_admin/aa/v3/inputs/filters/typeahead_input.rb +51 -0
- data/lib/reactive_admin/aa/v3/inputs/typeahead_input.rb +8 -0
- data/lib/reactive_admin/aa/v3/install.rb +36 -0
- data/lib/reactive_admin/aa/v3/menu.rb +67 -0
- data/lib/reactive_admin/aa/v3/presenters.rb +102 -0
- data/lib/reactive_admin/aa/v3/registry.rb +78 -0
- data/lib/reactive_admin/aa/v3/views.rb +63 -0
- data/lib/reactive_admin/aa/v3.rb +23 -0
- data/lib/reactive_admin/aa/v4.rb +59 -0
- data/lib/reactive_admin/aa.rb +46 -0
- data/lib/reactive_admin/action_items.rb +39 -0
- data/lib/reactive_admin/action_links.rb +197 -0
- data/lib/reactive_admin/action_safety.rb +19 -0
- data/lib/reactive_admin/actions.rb +95 -0
- data/lib/reactive_admin/api_errors.rb +116 -0
- data/lib/reactive_admin/api_fallback.rb +15 -0
- data/lib/reactive_admin/api_guards.rb +445 -0
- data/lib/reactive_admin/audit.rb +72 -0
- data/lib/reactive_admin/auth/guard.rb +68 -0
- data/lib/reactive_admin/auth/token_requests.rb +15 -0
- data/lib/reactive_admin/auth.rb +135 -0
- data/lib/reactive_admin/authorizer.rb +47 -0
- data/lib/reactive_admin/background_requests.rb +33 -0
- data/lib/reactive_admin/batch_actions.rb +57 -0
- data/lib/reactive_admin/choices.rb +289 -0
- data/lib/reactive_admin/client_error.rb +70 -0
- data/lib/reactive_admin/composite_keys.rb +12 -0
- data/lib/reactive_admin/configuration.rb +221 -0
- data/lib/reactive_admin/controller_extension.rb +229 -0
- data/lib/reactive_admin/csv_injection.rb +26 -0
- data/lib/reactive_admin/date_bound.rb +31 -0
- data/lib/reactive_admin/degradation.rb +72 -0
- data/lib/reactive_admin/diagnostics.rb +16 -0
- data/lib/reactive_admin/doctor.rb +466 -0
- data/lib/reactive_admin/dry_run.rb +147 -0
- data/lib/reactive_admin/dry_run_flag.rb +18 -0
- data/lib/reactive_admin/embed.rb +73 -0
- data/lib/reactive_admin/engine.rb +47 -0
- data/lib/reactive_admin/error_keys.rb +23 -0
- data/lib/reactive_admin/exposure.rb +86 -0
- data/lib/reactive_admin/filters.rb +165 -0
- data/lib/reactive_admin/fixtures/scrubber.rb +1075 -0
- data/lib/reactive_admin/fixtures.rb +161 -0
- data/lib/reactive_admin/form_content.rb +78 -0
- data/lib/reactive_admin/form_field.rb +279 -0
- data/lib/reactive_admin/form_has_many.rb +116 -0
- data/lib/reactive_admin/form_lock.rb +71 -0
- data/lib/reactive_admin/form_payload.rb +57 -0
- data/lib/reactive_admin/form_recorder.rb +192 -0
- data/lib/reactive_admin/form_schema.rb +160 -0
- data/lib/reactive_admin/frame.rb +97 -0
- data/lib/reactive_admin/html_nodes.rb +390 -0
- data/lib/reactive_admin/html_policy.rb +338 -0
- data/lib/reactive_admin/html_rich.rb +186 -0
- data/lib/reactive_admin/implicit_defaults.rb +102 -0
- data/lib/reactive_admin/index_options.rb +41 -0
- data/lib/reactive_admin/index_payload.rb +259 -0
- data/lib/reactive_admin/index_recorder.rb +115 -0
- data/lib/reactive_admin/index_views.rb +85 -0
- data/lib/reactive_admin/inline_style.rb +125 -0
- data/lib/reactive_admin/labels_payload.rb +34 -0
- data/lib/reactive_admin/ladder.rb +268 -0
- data/lib/reactive_admin/layout_classes.rb +167 -0
- data/lib/reactive_admin/legacy_inventory.rb +547 -0
- data/lib/reactive_admin/location.rb +22 -0
- data/lib/reactive_admin/lookup_audit.rb +30 -0
- data/lib/reactive_admin/lookup_payload.rb +41 -0
- data/lib/reactive_admin/manifest.rb +36 -0
- data/lib/reactive_admin/masked_json.rb +62 -0
- data/lib/reactive_admin/masking.rb +100 -0
- data/lib/reactive_admin/mcp/access.rb +111 -0
- data/lib/reactive_admin/mcp/api.rb +123 -0
- data/lib/reactive_admin/mcp/count_tool.rb +22 -0
- data/lib/reactive_admin/mcp/layout.rb +175 -0
- data/lib/reactive_admin/mcp/output.rb +46 -0
- data/lib/reactive_admin/mcp/prompts.rb +111 -0
- data/lib/reactive_admin/mcp/server.rb +134 -0
- data/lib/reactive_admin/mcp/shapes.rb +164 -0
- data/lib/reactive_admin/mcp/tools.rb +386 -0
- data/lib/reactive_admin/mcp.rb +53 -0
- data/lib/reactive_admin/media_nodes.rb +34 -0
- data/lib/reactive_admin/menu.rb +90 -0
- data/lib/reactive_admin/menu_overlay.rb +291 -0
- data/lib/reactive_admin/node_registry.rb +47 -0
- data/lib/reactive_admin/open_api/builder.rb +156 -0
- data/lib/reactive_admin/open_api/context.rb +46 -0
- data/lib/reactive_admin/open_api/core.rb +51 -0
- data/lib/reactive_admin/open_api/operation_ids.rb +18 -0
- data/lib/reactive_admin/open_api/page_doc.rb +75 -0
- data/lib/reactive_admin/open_api/parts.rb +86 -0
- data/lib/reactive_admin/open_api/resource_doc.rb +423 -0
- data/lib/reactive_admin/open_api/security.rb +55 -0
- data/lib/reactive_admin/open_api/write_schema.rb +104 -0
- data/lib/reactive_admin/open_api.rb +41 -0
- data/lib/reactive_admin/option_source.rb +36 -0
- data/lib/reactive_admin/option_sources.rb +14 -0
- data/lib/reactive_admin/options_payload.rb +61 -0
- data/lib/reactive_admin/page_controller_extension.rb +112 -0
- data/lib/reactive_admin/page_forms.rb +181 -0
- data/lib/reactive_admin/page_payload.rb +120 -0
- data/lib/reactive_admin/param_normalizer.rb +89 -0
- data/lib/reactive_admin/paths.rb +63 -0
- data/lib/reactive_admin/permissions.rb +31 -0
- data/lib/reactive_admin/provenance.rb +57 -0
- data/lib/reactive_admin/query_guard.rb +108 -0
- data/lib/reactive_admin/ransack_guard.rb +107 -0
- data/lib/reactive_admin/rate_limit.rb +59 -0
- data/lib/reactive_admin/reactive_dsl.rb +99 -0
- data/lib/reactive_admin/readiness.rb +189 -0
- data/lib/reactive_admin/registry.rb +69 -0
- data/lib/reactive_admin/resource_meta.rb +120 -0
- data/lib/reactive_admin/resource_summary.rb +41 -0
- data/lib/reactive_admin/routes.rb +60 -0
- data/lib/reactive_admin/row_errors.rb +29 -0
- data/lib/reactive_admin/rspec.rb +116 -0
- data/lib/reactive_admin/scrubbed_error.rb +22 -0
- data/lib/reactive_admin/search.rb +79 -0
- data/lib/reactive_admin/server_timing.rb +31 -0
- data/lib/reactive_admin/show_payload.rb +88 -0
- data/lib/reactive_admin/sidebars.rb +34 -0
- data/lib/reactive_admin/site.rb +55 -0
- data/lib/reactive_admin/style_report.rb +129 -0
- data/lib/reactive_admin/style_sources.rb +83 -0
- data/lib/reactive_admin/template_actions.rb +126 -0
- data/lib/reactive_admin/template_content.rb +49 -0
- data/lib/reactive_admin/template_form.rb +442 -0
- data/lib/reactive_admin/test_support.rb +31 -0
- data/lib/reactive_admin/typeahead.rb +33 -0
- data/lib/reactive_admin/ui/assets.rb +91 -0
- data/lib/reactive_admin/ui/client_build.rb +47 -0
- data/lib/reactive_admin/ui/helper.rb +24 -0
- data/lib/reactive_admin/ui/packaged_client.rb +67 -0
- data/lib/reactive_admin/ui/shell.rb +81 -0
- data/lib/reactive_admin/ui/switch.rb +38 -0
- data/lib/reactive_admin/ui.rb +43 -0
- data/lib/reactive_admin/value_payload.rb +147 -0
- data/lib/reactive_admin/value_token.rb +36 -0
- data/lib/reactive_admin/values.rb +43 -0
- data/lib/reactive_admin/version.rb +3 -0
- data/lib/reactive_admin/write_audit.rb +60 -0
- data/lib/reactive_admin/write_guards.rb +142 -0
- data/lib/reactive_admin.rb +153 -0
- data/lib/reactiveadmin.rb +1 -0
- data/lib/tasks/reactiveadmin.rake +36 -0
- data/lib/tasks/reactiveadmin_client.rake +11 -0
- data/lib/tasks/reactiveadmin_legacy.rake +7 -0
- data/lib/tasks/reactiveadmin_styles.rake +6 -0
- data/openapi/core.yaml +1643 -0
- data/vendor/client/assets/ActionPage-XUYorI8E.js +1 -0
- data/vendor/client/assets/ActionView-BsZFcsgp.js +1 -0
- data/vendor/client/assets/CommandPalette-C59HT1ip.js +1 -0
- data/vendor/client/assets/DatePicker-DuaK0iMg.js +1 -0
- data/vendor/client/assets/DateRangeCalendar-B2BDsG-X.js +1 -0
- data/vendor/client/assets/DegradedNotice-DiH5n2DO.js +1 -0
- data/vendor/client/assets/FormDialog-pmYl8Eov.js +1 -0
- data/vendor/client/assets/FormSkeleton-DuSBZO3C.js +1 -0
- data/vendor/client/assets/FrameView-2X8cFvUt.css +1 -0
- data/vendor/client/assets/FrameView-zmUeDO8d.js +1 -0
- data/vendor/client/assets/GroupOverview-DI5T3k5K.js +1 -0
- data/vendor/client/assets/InlineForm-CMEIMgeh.js +1 -0
- data/vendor/client/assets/JsonDiff-o7JWr7CH.js +3 -0
- data/vendor/client/assets/JsonEditor-D4VXdlEx.js +1 -0
- data/vendor/client/assets/JsonView-BrJLDmSN.js +1 -0
- data/vendor/client/assets/MobileMenu-GAeFOeEb.js +1 -0
- data/vendor/client/assets/Node-SQl61V4K.js +2 -0
- data/vendor/client/assets/PageView-C-laNEPZ.js +1 -0
- data/vendor/client/assets/ResourceForm-BPjsoCY6.js +1 -0
- data/vendor/client/assets/ResourceIndex-COezAw5t.js +3 -0
- data/vendor/client/assets/ResourceOrPage-CRZGCY84.js +1 -0
- data/vendor/client/assets/ResourceShow-DweRXn18.js +1 -0
- data/vendor/client/assets/Segmented-BE9TCbph.js +1 -0
- data/vendor/client/assets/Sidebars-CsB9rFqX.js +1 -0
- data/vendor/client/assets/breadcrumb-DSA3Tlyd.js +1 -0
- data/vendor/client/assets/button-CvZ4_DFC.js +1 -0
- data/vendor/client/assets/calendar-BoyMpJIf.js +1 -0
- data/vendor/client/assets/check-C5A3J16N.js +1 -0
- data/vendor/client/assets/command-CMuk0oAt.js +1 -0
- data/vendor/client/assets/dist-CqEI82S_.js +1 -0
- data/vendor/client/assets/dist-IW4yX942.js +1 -0
- data/vendor/client/assets/editor-yqRLzgsJ.js +2 -0
- data/vendor/client/assets/external-link-C2aR4slL.js +1 -0
- data/vendor/client/assets/frames-C9gPCc3N.js +1 -0
- data/vendor/client/assets/humanize-DtU_Kpr4.js +1 -0
- data/vendor/client/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
- data/vendor/client/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
- data/vendor/client/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
- data/vendor/client/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
- data/vendor/client/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
- data/vendor/client/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
- data/vendor/client/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
- data/vendor/client/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
- data/vendor/client/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
- data/vendor/client/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
- data/vendor/client/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
- data/vendor/client/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
- data/vendor/client/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
- data/vendor/client/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
- data/vendor/client/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
- data/vendor/client/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
- data/vendor/client/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
- data/vendor/client/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
- data/vendor/client/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
- data/vendor/client/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
- data/vendor/client/assets/ibm-plex-sans-cyrillic-ext-wght-normal-d45eAU9y.woff2 +0 -0
- data/vendor/client/assets/ibm-plex-sans-cyrillic-wght-normal-BAAhND-U.woff2 +0 -0
- data/vendor/client/assets/ibm-plex-sans-greek-wght-normal-CmyJS8uq.woff2 +0 -0
- data/vendor/client/assets/ibm-plex-sans-latin-ext-wght-normal-CIII54If.woff2 +0 -0
- data/vendor/client/assets/ibm-plex-sans-latin-wght-normal-IvpUvPa2.woff2 +0 -0
- data/vendor/client/assets/ibm-plex-sans-vietnamese-wght-normal-Dg1JeJN0.woff2 +0 -0
- data/vendor/client/assets/index-B51aUaAY.js +43 -0
- data/vendor/client/assets/index-Cs9rCoWM.css +2 -0
- data/vendor/client/assets/input-DByFmQPa.js +1 -0
- data/vendor/client/assets/json-De3PN-R6.css +1 -0
- data/vendor/client/assets/json-oTp7Q-d-.js +5 -0
- data/vendor/client/assets/media-D4a_En8R.js +1 -0
- data/vendor/client/assets/plus-CfJ9vo8X.js +1 -0
- data/vendor/client/assets/popover-CDtI9R8Q.js +1 -0
- data/vendor/client/assets/purify-G7QKJyJq.js +1 -0
- data/vendor/client/assets/query-CCsZN2fa.js +1 -0
- data/vendor/client/assets/recent-BrzLwL0D.js +1 -0
- data/vendor/client/assets/rich-BQc_q5T7.js +1 -0
- data/vendor/client/assets/rolldown-runtime-XKyaHtl9.js +1 -0
- data/vendor/client/assets/select-C43qDA3k.js +1 -0
- data/vendor/client/assets/sheet-BPl2n-4n.js +1 -0
- data/vendor/client/assets/textarea-BnOphXry.js +1 -0
- data/vendor/client/assets/uiMode-z0ZbRV49.js +1 -0
- data/vendor/client/assets/uiToggle-DwnRQTH1.js +1 -0
- data/vendor/client/assets/useRecordForm-X_DExEP2.js +1 -0
- data/vendor/client/assets/useRecordVisit-BRtfMi-q.js +1 -0
- data/vendor/client/assets/utils-DwBGbDkG.js +1 -0
- data/vendor/client/assets/vendor-calendar-nTZiq9oY.js +1 -0
- data/vendor/client/assets/vendor-datefns-BoC6MCnl.js +1 -0
- data/vendor/client/assets/vendor-forms-D0h8hG_S.js +55 -0
- data/vendor/client/assets/vendor-purify-BXoPR7WT.js +3 -0
- data/vendor/client/assets/vendor-query-DZ6APRNI.js +1 -0
- data/vendor/client/assets/vendor-react-C1iE8mnY.js +9 -0
- data/vendor/client/assets/vendor-router-CI6Vh4k_.js +1 -0
- data/vendor/client/assets/vendor-table-DuQ835by.js +4 -0
- data/vendor/client/index.html +24 -0
- data/vendor/client/manifest.json +867 -0
- data/vendor/client/reactiveadmin-client.json +4 -0
- metadata +350 -0
data/openapi/core.yaml
ADDED
|
@@ -0,0 +1,1643 @@
|
|
|
1
|
+
openapi: 3.0.1
|
|
2
|
+
info:
|
|
3
|
+
title: ReactiveAdmin core contract
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
description: |
|
|
6
|
+
Generic contract served by the ReactiveAdmin gem. Paths are relative to the mount (default /api). Keys are snake_case.
|
|
7
|
+
|
|
8
|
+
Resources whose `ResourceMeta.belongs_to.optional` is false exist only under their parent: every
|
|
9
|
+
`/admin/{resource}...` path below is then served at `/admin/{parent}/{parent_id}/{resource}...`.
|
|
10
|
+
Do not build those URLs; use `ResourceMeta.api_index_path_template`, `RecordPaths`, `Ref.api_path`
|
|
11
|
+
and `FormResponse.action.path`. Unexpected server errors are always JSON (`Error` with code `error`). Every API response carries a `Server-Timing` header (`db` and `app` durations in ms).
|
|
12
|
+
servers:
|
|
13
|
+
- url: /api
|
|
14
|
+
paths:
|
|
15
|
+
/admin/_manifest:
|
|
16
|
+
get:
|
|
17
|
+
operationId: getManifest
|
|
18
|
+
tags: [core]
|
|
19
|
+
responses:
|
|
20
|
+
"200":
|
|
21
|
+
description: Manifest of all registered resources
|
|
22
|
+
content:
|
|
23
|
+
application/json:
|
|
24
|
+
schema: { $ref: "#/components/schemas/Manifest" }
|
|
25
|
+
"401": { $ref: "#/components/responses/Error" }
|
|
26
|
+
/admin/_openapi:
|
|
27
|
+
get:
|
|
28
|
+
operationId: getOpenApi
|
|
29
|
+
tags: [core]
|
|
30
|
+
description: "An OpenAPI 3.1 document of this host's admin API, limited to the resources, pages and actions the signed-in user may use. Answers plain application/json (the vnd format is accepted too) so docs viewers can fetch it. It is typed from declarations only: never record data, option values, or anything masked or not exposed. Cached per code version and permission fingerprint."
|
|
31
|
+
responses:
|
|
32
|
+
"200":
|
|
33
|
+
description: The OpenAPI document
|
|
34
|
+
content:
|
|
35
|
+
application/json:
|
|
36
|
+
schema: { type: object, additionalProperties: true }
|
|
37
|
+
"401": { $ref: "#/components/responses/Error" }
|
|
38
|
+
"403": { $ref: "#/components/responses/Error" }
|
|
39
|
+
"429": { $ref: "#/components/responses/RateLimited" }
|
|
40
|
+
/admin/{resource}/_meta:
|
|
41
|
+
get:
|
|
42
|
+
operationId: getResourceMeta
|
|
43
|
+
tags: [core]
|
|
44
|
+
description: Full metadata for one resource (filters, scopes, batch actions, action items). Cached server-side per resource and permission set; clients fetch on first visit and prefetch on menu hover.
|
|
45
|
+
parameters:
|
|
46
|
+
- { name: resource, in: path, required: true, schema: { type: string } }
|
|
47
|
+
responses:
|
|
48
|
+
"200":
|
|
49
|
+
description: Resource metadata
|
|
50
|
+
content:
|
|
51
|
+
application/json:
|
|
52
|
+
schema: { $ref: "#/components/schemas/ResourceMeta" }
|
|
53
|
+
"401": { $ref: "#/components/responses/Error" }
|
|
54
|
+
"403": { $ref: "#/components/responses/Error" }
|
|
55
|
+
/admin/_pages/{page}:
|
|
56
|
+
get:
|
|
57
|
+
operationId: getPage
|
|
58
|
+
tags: [core]
|
|
59
|
+
description: "An AA register_page rendered through the fallback ladder (content walked into nodes; forms native when Formtastic, otherwise frame/iframe nodes). A page whose content has a GET form (a `form` node with `action.method` get) reads that form's fields from the query string, named as the form's field `params`; the response is the page with those results."
|
|
60
|
+
parameters:
|
|
61
|
+
- { name: page, in: path, required: true, schema: { type: string, description: "Page key, e.g. batch_operations" } }
|
|
62
|
+
- { name: context, in: query, description: "page_form asks for a page form field's options (its `options_path` carries context, form and field)", schema: { type: string, enum: [page_form] } }
|
|
63
|
+
- { name: form, in: query, description: "With context=page_form: the form's position on the page", schema: { type: string } }
|
|
64
|
+
- { name: field, in: query, description: "With context=page_form", schema: { type: string } }
|
|
65
|
+
- { name: term, in: query, description: "With context=page_form", schema: { type: string } }
|
|
66
|
+
responses:
|
|
67
|
+
"200":
|
|
68
|
+
headers: { X-Reactiveadmin-Degraded: { $ref: "#/components/headers/Degraded" } }
|
|
69
|
+
description: The page, or with context=page_form the field's options
|
|
70
|
+
content:
|
|
71
|
+
application/json:
|
|
72
|
+
schema:
|
|
73
|
+
oneOf:
|
|
74
|
+
- $ref: "#/components/schemas/PageResponse"
|
|
75
|
+
- $ref: "#/components/schemas/OptionsResponse"
|
|
76
|
+
"401": { $ref: "#/components/responses/Error" }
|
|
77
|
+
"403": { $ref: "#/components/responses/Error" }
|
|
78
|
+
/admin/{resource}/{id}/_value:
|
|
79
|
+
get:
|
|
80
|
+
operationId: getRecordValue
|
|
81
|
+
tags: [core]
|
|
82
|
+
description: "Full value of a summarized json node or truncated text node (Node.expand_path). Audited server-side as a sensitive-data view; never cached. Call the expand_path exactly as given: it carries the signed token. A missing, forged, expired or other-user token answers 403 forbidden."
|
|
83
|
+
parameters:
|
|
84
|
+
- { name: resource, in: path, required: true, schema: { type: string } }
|
|
85
|
+
- { name: id, in: path, required: true, schema: { type: string } }
|
|
86
|
+
- { name: field, in: query, required: true, schema: { type: string } }
|
|
87
|
+
- { name: path, in: query, required: false, schema: { type: string, description: "Dot path inside the value, e.g. insurance.member_id" } }
|
|
88
|
+
- { name: token, in: query, required: false, schema: { type: string, description: "Short-lived signed proof from the expand_path that the page rendered this field for this user. Opaque: pass it back unchanged. Required unless the server runs with value_token disabled." } }
|
|
89
|
+
responses:
|
|
90
|
+
"200":
|
|
91
|
+
description: Value
|
|
92
|
+
content:
|
|
93
|
+
application/json:
|
|
94
|
+
schema: { $ref: "#/components/schemas/ValueResponse" }
|
|
95
|
+
"401": { $ref: "#/components/responses/Error" }
|
|
96
|
+
"403": { $ref: "#/components/responses/Error" }
|
|
97
|
+
"404": { $ref: "#/components/responses/Error" }
|
|
98
|
+
"429": { $ref: "#/components/responses/RateLimited" }
|
|
99
|
+
/admin/_session:
|
|
100
|
+
get:
|
|
101
|
+
operationId: getSession
|
|
102
|
+
tags: [core]
|
|
103
|
+
description: Current user plus the CSRF token to send as `X-CSRF-Token` on every write (CSRF stays enforced; a missing/stale token yields 422 `invalid_csrf`).
|
|
104
|
+
responses:
|
|
105
|
+
"200":
|
|
106
|
+
description: Session
|
|
107
|
+
content:
|
|
108
|
+
application/json:
|
|
109
|
+
schema: { $ref: "#/components/schemas/Session" }
|
|
110
|
+
"401": { $ref: "#/components/responses/Error" }
|
|
111
|
+
/admin/_client_errors:
|
|
112
|
+
post:
|
|
113
|
+
operationId: postClientError
|
|
114
|
+
tags: [core]
|
|
115
|
+
description: |
|
|
116
|
+
The client reports a crash its error boundary caught, in production. Names only: the error's class name, the component names it unwound through, the route pattern (`/:resource/:id/edit`, never the URL), the resource key, the client build's version and the id of the last API request the client saw. The server keeps only fields shaped like those, passes them to `config.error_reporter` and publishes `client_error.reactiveadmin`. Session only (a bearer token answers 403), and rate limited per user in the `client_error` bucket. Answers 204.
|
|
117
|
+
requestBody:
|
|
118
|
+
required: true
|
|
119
|
+
content:
|
|
120
|
+
application/json:
|
|
121
|
+
schema: { $ref: "#/components/schemas/ClientErrorReport" }
|
|
122
|
+
responses:
|
|
123
|
+
"204": { description: Reported }
|
|
124
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
125
|
+
"401": { $ref: "#/components/responses/Error" }
|
|
126
|
+
"403": { $ref: "#/components/responses/Error" }
|
|
127
|
+
"429": { $ref: "#/components/responses/RateLimited" }
|
|
128
|
+
/admin/_mcp:
|
|
129
|
+
post:
|
|
130
|
+
operationId: postMcp
|
|
131
|
+
tags: [mcp]
|
|
132
|
+
security: [{ bearerAuth: [] }]
|
|
133
|
+
description: |
|
|
134
|
+
Model Context Protocol endpoint (Streamable HTTP transport, revision 2025-06-18, JSON responses only, no sessions or SSE).
|
|
135
|
+
One JSON-RPC 2.0 message per POST: `initialize`, `ping`, `tools/list` and `tools/call`. Notifications answer 202 with no body.
|
|
136
|
+
Bearer tokens only: a session cookie is refused with 401. A 401 carries `WWW-Authenticate: Bearer resource_metadata="..."` when
|
|
137
|
+
`config.mcp.resource_metadata_url` is set. Answers 404 when MCP is disabled (for the user), and 403 for a foreign `Origin`.
|
|
138
|
+
Every tool dispatches to the API routes in this document as the caller, so their authorization, audit and limits apply.
|
|
139
|
+
requestBody:
|
|
140
|
+
required: true
|
|
141
|
+
content:
|
|
142
|
+
application/json:
|
|
143
|
+
schema: { $ref: "#/components/schemas/McpRequest" }
|
|
144
|
+
responses:
|
|
145
|
+
"200":
|
|
146
|
+
description: "A JSON-RPC response; a tool failure is a result with `isError: true`, a protocol failure an `error` member."
|
|
147
|
+
content:
|
|
148
|
+
application/json:
|
|
149
|
+
schema: { $ref: "#/components/schemas/McpResponse" }
|
|
150
|
+
"202": { description: Notification or client response accepted }
|
|
151
|
+
"400":
|
|
152
|
+
description: Malformed JSON-RPC (parse error, batch) or unsupported `MCP-Protocol-Version`.
|
|
153
|
+
content:
|
|
154
|
+
application/json:
|
|
155
|
+
schema: { $ref: "#/components/schemas/McpResponse" }
|
|
156
|
+
"401":
|
|
157
|
+
description: Missing or invalid bearer token.
|
|
158
|
+
headers:
|
|
159
|
+
WWW-Authenticate: { description: "Bearer challenge, with resource_metadata (RFC 9728) when configured", schema: { type: string } }
|
|
160
|
+
content:
|
|
161
|
+
application/json:
|
|
162
|
+
schema: { $ref: "#/components/schemas/Error" }
|
|
163
|
+
"403":
|
|
164
|
+
description: Token lacks a scope, or Origin is not allowed.
|
|
165
|
+
content:
|
|
166
|
+
application/json:
|
|
167
|
+
schema: { $ref: "#/components/schemas/Error" }
|
|
168
|
+
"404": { $ref: "#/components/responses/Error" }
|
|
169
|
+
/admin/{resource}/batch_action:
|
|
170
|
+
post:
|
|
171
|
+
operationId: runBatchAction
|
|
172
|
+
tags: [core]
|
|
173
|
+
description: AA batch action over the selected ids. Outcome is the action's redirect + flash converted to an ActionResult.
|
|
174
|
+
parameters:
|
|
175
|
+
- { name: resource, in: path, required: true, schema: { type: string } }
|
|
176
|
+
requestBody:
|
|
177
|
+
required: true
|
|
178
|
+
content:
|
|
179
|
+
application/json:
|
|
180
|
+
schema: { $ref: "#/components/schemas/BatchActionRequest" }
|
|
181
|
+
responses:
|
|
182
|
+
"200": { $ref: "#/components/responses/ActionResult" }
|
|
183
|
+
"401": { $ref: "#/components/responses/Error" }
|
|
184
|
+
"403": { $ref: "#/components/responses/Error" }
|
|
185
|
+
"422": { $ref: "#/components/responses/Invalid" }
|
|
186
|
+
/admin/{resource}/_options:
|
|
187
|
+
get:
|
|
188
|
+
operationId: getOptions
|
|
189
|
+
tags: [core]
|
|
190
|
+
description: |
|
|
191
|
+
Typeahead source for a filter or form control whose collection is too large to inline
|
|
192
|
+
(`Filter.options_path` / `FormField.options_path` already carry field, context and id).
|
|
193
|
+
Every whitespace-separated token of `term` must start a word of the option (label, name or email
|
|
194
|
+
columns, as the source declares); exact matches rank first, then prefix matches. A pasted id also
|
|
195
|
+
finds its record. Page through large result sets with `next_cursor`. Requires READ on the resource.
|
|
196
|
+
Form options of a nested resource are served at `/admin/{parent}/{parent_id}/{resource}/_options`
|
|
197
|
+
(carried by `FormField.options_path`); a has_many field is addressed as `<assoc>.<name>`, and
|
|
198
|
+
collections that depend on the parent record are evaluated for the record in `id`.
|
|
199
|
+
parameters:
|
|
200
|
+
- { name: resource, in: path, required: true, schema: { type: string } }
|
|
201
|
+
- { name: field, in: query, required: true, description: "Filter name, or FormField name (`<assoc>.<name>` inside has_many)", schema: { type: string } }
|
|
202
|
+
- { name: context, in: query, required: true, schema: { type: string, enum: [filter, form] } }
|
|
203
|
+
- { name: id, in: query, description: "Record id when context=form for an edit form", schema: { type: string } }
|
|
204
|
+
- { name: term, in: query, schema: { type: string } }
|
|
205
|
+
- { name: limit, in: query, description: "Max 100, default inline_options_limit", schema: { type: integer, minimum: 1 } }
|
|
206
|
+
- { name: cursor, in: query, description: "OptionsResponse.next_cursor of the previous page (opaque)", schema: { type: string } }
|
|
207
|
+
- name: value
|
|
208
|
+
in: query
|
|
209
|
+
description: "Comma-separated values to resolve labels for instead of searching (to display a selected typeahead value). At most 25, more is a 400."
|
|
210
|
+
style: form
|
|
211
|
+
explode: false
|
|
212
|
+
schema: { type: array, items: { type: string } }
|
|
213
|
+
responses:
|
|
214
|
+
"200":
|
|
215
|
+
description: Matching options
|
|
216
|
+
content:
|
|
217
|
+
application/json:
|
|
218
|
+
schema: { $ref: "#/components/schemas/OptionsResponse" }
|
|
219
|
+
"401": { $ref: "#/components/responses/Error" }
|
|
220
|
+
"403": { $ref: "#/components/responses/Error" }
|
|
221
|
+
"404": { $ref: "#/components/responses/Error" }
|
|
222
|
+
"429": { $ref: "#/components/responses/RateLimited" }
|
|
223
|
+
/admin/{resource}/_labels:
|
|
224
|
+
get:
|
|
225
|
+
operationId: getLabels
|
|
226
|
+
tags: [core]
|
|
227
|
+
description: "Display names of records by id, for the command palette's recents. Returns only resource, id and display_name. Each record needs READ (the same finder and authorization as show); missing or refused ids are omitted. At most 20 ids are looked up. Top-level resources only: a resource nested under a required parent has no _labels route. Metadata, so it may be sent as a background request; it is not a view of the record."
|
|
228
|
+
parameters:
|
|
229
|
+
- { name: resource, in: path, required: true, schema: { type: string } }
|
|
230
|
+
- name: ids
|
|
231
|
+
in: query
|
|
232
|
+
required: true
|
|
233
|
+
description: Comma-separated record ids (more than 20 are ignored).
|
|
234
|
+
style: form
|
|
235
|
+
explode: false
|
|
236
|
+
schema: { type: array, items: { type: string }, maxItems: 20 }
|
|
237
|
+
responses:
|
|
238
|
+
"200":
|
|
239
|
+
description: Labels of the readable records
|
|
240
|
+
content:
|
|
241
|
+
application/json:
|
|
242
|
+
schema: { $ref: "#/components/schemas/LabelsResponse" }
|
|
243
|
+
"400": { $ref: "#/components/responses/Error" }
|
|
244
|
+
"401": { $ref: "#/components/responses/Error" }
|
|
245
|
+
"404": { $ref: "#/components/responses/Error" }
|
|
246
|
+
/admin/{resource}/_options/lookup:
|
|
247
|
+
get:
|
|
248
|
+
operationId: lookupOptions
|
|
249
|
+
tags: [core]
|
|
250
|
+
description: |
|
|
251
|
+
Labels for the selected values of several typeahead fields in one request, so a form with many
|
|
252
|
+
typeaheads costs one call. Same sources, authorization (READ) and policy scoping as `_options`; a
|
|
253
|
+
value the user may not read is simply absent from its list. Served at the same nested paths as
|
|
254
|
+
`_options`. It has its own `lookup` rate bucket, separate from `options` (search).
|
|
255
|
+
At most 25 values per field and 100 in total; more is a 400.
|
|
256
|
+
parameters:
|
|
257
|
+
- { name: resource, in: path, required: true, schema: { type: string } }
|
|
258
|
+
- name: fields
|
|
259
|
+
in: query
|
|
260
|
+
required: true
|
|
261
|
+
description: "Comma-separated values per field name, as `fields[<field>]=v1,v2`. Field names are those of `_options` (`<assoc>.<name>` inside has_many)."
|
|
262
|
+
style: deepObject
|
|
263
|
+
explode: true
|
|
264
|
+
schema: { type: object, additionalProperties: { type: string } }
|
|
265
|
+
- { name: context, in: query, required: true, schema: { type: string, enum: [filter, form] } }
|
|
266
|
+
- { name: id, in: query, description: "Record id when context=form for an edit form", schema: { type: string } }
|
|
267
|
+
responses:
|
|
268
|
+
"200":
|
|
269
|
+
description: Options per requested field
|
|
270
|
+
content:
|
|
271
|
+
application/json:
|
|
272
|
+
schema: { $ref: "#/components/schemas/LookupResponse" }
|
|
273
|
+
"400": { $ref: "#/components/responses/Error" }
|
|
274
|
+
"401": { $ref: "#/components/responses/Error" }
|
|
275
|
+
"403": { $ref: "#/components/responses/Error" }
|
|
276
|
+
"404": { $ref: "#/components/responses/Error" }
|
|
277
|
+
"429": { $ref: "#/components/responses/RateLimited" }
|
|
278
|
+
/admin/{resource}/new:
|
|
279
|
+
get:
|
|
280
|
+
operationId: getNewForm
|
|
281
|
+
tags: [core]
|
|
282
|
+
parameters:
|
|
283
|
+
- { name: resource, in: path, required: true, schema: { type: string } }
|
|
284
|
+
responses:
|
|
285
|
+
"200":
|
|
286
|
+
headers: { X-Reactiveadmin-Degraded: { $ref: "#/components/headers/Degraded" } }
|
|
287
|
+
description: Form schema for a new record
|
|
288
|
+
content:
|
|
289
|
+
application/json:
|
|
290
|
+
schema: { $ref: "#/components/schemas/FormResponse" }
|
|
291
|
+
"401": { $ref: "#/components/responses/Error" }
|
|
292
|
+
"403": { $ref: "#/components/responses/Error" }
|
|
293
|
+
/admin/{resource}/{id}/edit:
|
|
294
|
+
get:
|
|
295
|
+
operationId: getEditForm
|
|
296
|
+
tags: [core]
|
|
297
|
+
parameters:
|
|
298
|
+
- { name: resource, in: path, required: true, schema: { type: string } }
|
|
299
|
+
- { name: id, in: path, required: true, schema: { type: string } }
|
|
300
|
+
responses:
|
|
301
|
+
"200":
|
|
302
|
+
headers: { X-Reactiveadmin-Degraded: { $ref: "#/components/headers/Degraded" } }
|
|
303
|
+
description: Form schema prefilled with the record
|
|
304
|
+
content:
|
|
305
|
+
application/json:
|
|
306
|
+
schema: { $ref: "#/components/schemas/FormResponse" }
|
|
307
|
+
"401": { $ref: "#/components/responses/Error" }
|
|
308
|
+
"403": { $ref: "#/components/responses/Error" }
|
|
309
|
+
"404": { $ref: "#/components/responses/Error" }
|
|
310
|
+
/admin/{resource}/{id}/{action}:
|
|
311
|
+
post:
|
|
312
|
+
operationId: runMemberActionPost
|
|
313
|
+
tags: [core]
|
|
314
|
+
description: |
|
|
315
|
+
A member action declared with `member_action` (HTTP verb per `Action.method`). The action's
|
|
316
|
+
redirect + flash become an ActionResult; an alert/error flash becomes a 422. Authorized with
|
|
317
|
+
the same permission that gates `Action.enabled`. Collection actions are served the same way at
|
|
318
|
+
`/admin/{resource}/{action}` (no id).
|
|
319
|
+
parameters:
|
|
320
|
+
- { $ref: "#/components/parameters/Resource" }
|
|
321
|
+
- { $ref: "#/components/parameters/Id" }
|
|
322
|
+
- { $ref: "#/components/parameters/Action" }
|
|
323
|
+
requestBody: { $ref: "#/components/requestBodies/ActionParams" }
|
|
324
|
+
responses:
|
|
325
|
+
"200": { $ref: "#/components/responses/ActionResult" }
|
|
326
|
+
"401": { $ref: "#/components/responses/Error" }
|
|
327
|
+
"403": { $ref: "#/components/responses/Error" }
|
|
328
|
+
"404": { $ref: "#/components/responses/Error" }
|
|
329
|
+
"422": { $ref: "#/components/responses/Invalid" }
|
|
330
|
+
put:
|
|
331
|
+
operationId: runMemberActionPut
|
|
332
|
+
tags: [core]
|
|
333
|
+
description: See runMemberActionPost.
|
|
334
|
+
parameters:
|
|
335
|
+
- { $ref: "#/components/parameters/Resource" }
|
|
336
|
+
- { $ref: "#/components/parameters/Id" }
|
|
337
|
+
- { $ref: "#/components/parameters/Action" }
|
|
338
|
+
requestBody: { $ref: "#/components/requestBodies/ActionParams" }
|
|
339
|
+
responses:
|
|
340
|
+
"200": { $ref: "#/components/responses/ActionResult" }
|
|
341
|
+
"401": { $ref: "#/components/responses/Error" }
|
|
342
|
+
"403": { $ref: "#/components/responses/Error" }
|
|
343
|
+
"404": { $ref: "#/components/responses/Error" }
|
|
344
|
+
"422": { $ref: "#/components/responses/Invalid" }
|
|
345
|
+
"409": { $ref: "#/components/responses/Conflict" }
|
|
346
|
+
patch:
|
|
347
|
+
operationId: runMemberActionPatch
|
|
348
|
+
tags: [core]
|
|
349
|
+
description: See runMemberActionPost.
|
|
350
|
+
parameters:
|
|
351
|
+
- { $ref: "#/components/parameters/Resource" }
|
|
352
|
+
- { $ref: "#/components/parameters/Id" }
|
|
353
|
+
- { $ref: "#/components/parameters/Action" }
|
|
354
|
+
requestBody: { $ref: "#/components/requestBodies/ActionParams" }
|
|
355
|
+
responses:
|
|
356
|
+
"200": { $ref: "#/components/responses/ActionResult" }
|
|
357
|
+
"401": { $ref: "#/components/responses/Error" }
|
|
358
|
+
"403": { $ref: "#/components/responses/Error" }
|
|
359
|
+
"404": { $ref: "#/components/responses/Error" }
|
|
360
|
+
"422": { $ref: "#/components/responses/Invalid" }
|
|
361
|
+
"409": { $ref: "#/components/responses/Conflict" }
|
|
362
|
+
delete:
|
|
363
|
+
operationId: runMemberActionDelete
|
|
364
|
+
tags: [core]
|
|
365
|
+
description: See runMemberActionPost.
|
|
366
|
+
parameters:
|
|
367
|
+
- { $ref: "#/components/parameters/Resource" }
|
|
368
|
+
- { $ref: "#/components/parameters/Id" }
|
|
369
|
+
- { $ref: "#/components/parameters/Action" }
|
|
370
|
+
requestBody: { $ref: "#/components/requestBodies/ActionParams" }
|
|
371
|
+
responses:
|
|
372
|
+
"200": { $ref: "#/components/responses/ActionResult" }
|
|
373
|
+
"401": { $ref: "#/components/responses/Error" }
|
|
374
|
+
"403": { $ref: "#/components/responses/Error" }
|
|
375
|
+
"404": { $ref: "#/components/responses/Error" }
|
|
376
|
+
"422": { $ref: "#/components/responses/Invalid" }
|
|
377
|
+
/admin/{resource}:
|
|
378
|
+
post:
|
|
379
|
+
operationId: createRecord
|
|
380
|
+
tags: [core]
|
|
381
|
+
description: |
|
|
382
|
+
Body is AA's own param key wrapping the permitted attributes (`FormResponse.form` params show the
|
|
383
|
+
names, e.g. `{"post": {"published_on": "2026-01-01"}}`). Nested has_many rows use
|
|
384
|
+
`<assoc>_attributes` keyed by index with `_destroy`. `json` controls take structured JSON values.
|
|
385
|
+
parameters:
|
|
386
|
+
- { name: resource, in: path, required: true, schema: { type: string } }
|
|
387
|
+
requestBody:
|
|
388
|
+
required: true
|
|
389
|
+
content:
|
|
390
|
+
application/json:
|
|
391
|
+
schema: { $ref: "#/components/schemas/RecordParams" }
|
|
392
|
+
responses:
|
|
393
|
+
"201":
|
|
394
|
+
description: Created
|
|
395
|
+
content:
|
|
396
|
+
application/json:
|
|
397
|
+
schema: { $ref: "#/components/schemas/WriteResult" }
|
|
398
|
+
"401": { $ref: "#/components/responses/Error" }
|
|
399
|
+
"403": { $ref: "#/components/responses/Error" }
|
|
400
|
+
"422": { $ref: "#/components/responses/Invalid" }
|
|
401
|
+
get:
|
|
402
|
+
operationId: listRecords
|
|
403
|
+
tags: [core]
|
|
404
|
+
parameters:
|
|
405
|
+
- { name: resource, in: path, required: true, schema: { type: string } }
|
|
406
|
+
- name: q
|
|
407
|
+
in: query
|
|
408
|
+
style: deepObject
|
|
409
|
+
explode: true
|
|
410
|
+
description: Ransack predicates, e.g. q[published_on_gteq]=2026-01-01
|
|
411
|
+
schema: { type: object, additionalProperties: { type: string } }
|
|
412
|
+
- { name: scope, in: query, schema: { type: string } }
|
|
413
|
+
- { name: order, in: query, description: "<sort_key>_asc|_desc", schema: { type: string } }
|
|
414
|
+
- { name: page, in: query, schema: { type: integer, minimum: 1 } }
|
|
415
|
+
- { name: per_page, in: query, schema: { type: integer } }
|
|
416
|
+
responses:
|
|
417
|
+
"200":
|
|
418
|
+
headers: { X-Reactiveadmin-Degraded: { $ref: "#/components/headers/Degraded" } }
|
|
419
|
+
description: Filtered, scoped, sorted, paginated records
|
|
420
|
+
content:
|
|
421
|
+
application/json:
|
|
422
|
+
schema: { $ref: "#/components/schemas/IndexResponse" }
|
|
423
|
+
"401": { $ref: "#/components/responses/Error" }
|
|
424
|
+
"403": { $ref: "#/components/responses/Error" }
|
|
425
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
426
|
+
/admin/{resource}.csv:
|
|
427
|
+
get:
|
|
428
|
+
operationId: exportRecordsCsv
|
|
429
|
+
tags: [core]
|
|
430
|
+
description: "AA's streamed CSV export (`csv do` block, current q/scope/order, all pages). Without a `csv` block it takes the index block's attribute columns, else the secure default columns. Only when `ResourceMeta.download_formats` includes csv; otherwise 403. 422 when the export is refused: more rows than `max_export_rows`, or, under strict defaults, no `csv` block and no table index block to take columns from. Errors are JSON as elsewhere."
|
|
431
|
+
parameters:
|
|
432
|
+
- { name: resource, in: path, required: true, schema: { type: string } }
|
|
433
|
+
- name: q
|
|
434
|
+
in: query
|
|
435
|
+
style: deepObject
|
|
436
|
+
explode: true
|
|
437
|
+
schema: { type: object, additionalProperties: { type: string } }
|
|
438
|
+
- { name: scope, in: query, schema: { type: string } }
|
|
439
|
+
- { name: order, in: query, schema: { type: string } }
|
|
440
|
+
responses:
|
|
441
|
+
"200":
|
|
442
|
+
description: "text/csv with Content-Disposition: attachment"
|
|
443
|
+
content:
|
|
444
|
+
text/csv:
|
|
445
|
+
schema: { type: string, format: binary }
|
|
446
|
+
"401": { $ref: "#/components/responses/Error" }
|
|
447
|
+
"403": { $ref: "#/components/responses/Error" }
|
|
448
|
+
"422": { $ref: "#/components/responses/Error" }
|
|
449
|
+
"429": { $ref: "#/components/responses/RateLimited" }
|
|
450
|
+
"400": { $ref: "#/components/responses/BadRequest" }
|
|
451
|
+
/admin/{resource}/{id}:
|
|
452
|
+
get:
|
|
453
|
+
operationId: getRecord
|
|
454
|
+
tags: [core]
|
|
455
|
+
parameters:
|
|
456
|
+
- { name: resource, in: path, required: true, schema: { type: string } }
|
|
457
|
+
- { name: id, in: path, required: true, schema: { type: string } }
|
|
458
|
+
responses:
|
|
459
|
+
"200":
|
|
460
|
+
headers: { X-Reactiveadmin-Degraded: { $ref: "#/components/headers/Degraded" } }
|
|
461
|
+
description: Show page layout
|
|
462
|
+
content:
|
|
463
|
+
application/json:
|
|
464
|
+
schema: { $ref: "#/components/schemas/ShowResponse" }
|
|
465
|
+
"401": { $ref: "#/components/responses/Error" }
|
|
466
|
+
"403": { $ref: "#/components/responses/Error" }
|
|
467
|
+
"404": { $ref: "#/components/responses/Error" }
|
|
468
|
+
patch:
|
|
469
|
+
operationId: updateRecord
|
|
470
|
+
tags: [core]
|
|
471
|
+
description: Same body shape as createRecord. Validation failures (including a host override re-rendering the form) are 422 `invalid`.
|
|
472
|
+
parameters:
|
|
473
|
+
- { $ref: "#/components/parameters/Resource" }
|
|
474
|
+
- { $ref: "#/components/parameters/Id" }
|
|
475
|
+
requestBody:
|
|
476
|
+
required: true
|
|
477
|
+
content:
|
|
478
|
+
application/json:
|
|
479
|
+
schema: { $ref: "#/components/schemas/RecordParams" }
|
|
480
|
+
responses:
|
|
481
|
+
"200":
|
|
482
|
+
description: Updated, or with `dry_run` the preview of the update
|
|
483
|
+
content:
|
|
484
|
+
application/json:
|
|
485
|
+
schema:
|
|
486
|
+
oneOf:
|
|
487
|
+
- { $ref: "#/components/schemas/WriteResult" }
|
|
488
|
+
- { $ref: "#/components/schemas/DryRunResult" }
|
|
489
|
+
"401": { $ref: "#/components/responses/Error" }
|
|
490
|
+
"403": { $ref: "#/components/responses/Error" }
|
|
491
|
+
"404": { $ref: "#/components/responses/Error" }
|
|
492
|
+
"422": { $ref: "#/components/responses/Invalid" }
|
|
493
|
+
"409": { $ref: "#/components/responses/Conflict" }
|
|
494
|
+
delete:
|
|
495
|
+
operationId: destroyRecord
|
|
496
|
+
tags: [core]
|
|
497
|
+
parameters:
|
|
498
|
+
- { $ref: "#/components/parameters/Resource" }
|
|
499
|
+
- { $ref: "#/components/parameters/Id" }
|
|
500
|
+
responses:
|
|
501
|
+
"200":
|
|
502
|
+
description: Destroyed
|
|
503
|
+
content:
|
|
504
|
+
application/json:
|
|
505
|
+
schema: { $ref: "#/components/schemas/WriteResult" }
|
|
506
|
+
"401": { $ref: "#/components/responses/Error" }
|
|
507
|
+
"403": { $ref: "#/components/responses/Error" }
|
|
508
|
+
"404": { $ref: "#/components/responses/Error" }
|
|
509
|
+
"422": { $ref: "#/components/responses/Invalid" }
|
|
510
|
+
components:
|
|
511
|
+
securitySchemes:
|
|
512
|
+
bearerAuth:
|
|
513
|
+
type: http
|
|
514
|
+
scheme: bearer
|
|
515
|
+
description: "Optional alternative to the session cookie where the host configures `ReactiveAdmin::Auth::Bearer`. Bearer requests skip CSRF and never fall back to cookies. With scopes, reads need `config.mcp.read_scope` and writes `write_scope`; a missing scope is 403 `insufficient_scope`."
|
|
516
|
+
parameters:
|
|
517
|
+
Resource: { name: resource, in: path, required: true, schema: { type: string } }
|
|
518
|
+
Id: { name: id, in: path, required: true, schema: { type: string } }
|
|
519
|
+
Action: { name: action, in: path, required: true, schema: { type: string } }
|
|
520
|
+
headers:
|
|
521
|
+
RetryAfter: { description: "Seconds until the user may retry.", schema: { type: integer, minimum: 1 } }
|
|
522
|
+
Degraded: { description: "Number of parts that fell back to a degraded rendering (see `degraded` in the body); 0 when none.", schema: { type: integer, minimum: 0 } }
|
|
523
|
+
requestBodies:
|
|
524
|
+
ActionParams:
|
|
525
|
+
required: false
|
|
526
|
+
content:
|
|
527
|
+
application/json:
|
|
528
|
+
schema: { type: object, additionalProperties: true }
|
|
529
|
+
responses:
|
|
530
|
+
Error:
|
|
531
|
+
description: Error
|
|
532
|
+
content:
|
|
533
|
+
application/json:
|
|
534
|
+
schema: { $ref: "#/components/schemas/Error" }
|
|
535
|
+
BadRequest:
|
|
536
|
+
description: "Bad parameters: an undeclared sort, filter or predicate, or a malformed value."
|
|
537
|
+
content:
|
|
538
|
+
application/json:
|
|
539
|
+
schema: { $ref: "#/components/schemas/Error" }
|
|
540
|
+
Conflict:
|
|
541
|
+
description: "A stale lock (`stale`) needs a fresh edit. A retryable failure (`retry`) carries `Retry-After` and can be resent unchanged."
|
|
542
|
+
headers:
|
|
543
|
+
Retry-After: { $ref: "#/components/headers/RetryAfter" }
|
|
544
|
+
content:
|
|
545
|
+
application/json:
|
|
546
|
+
schema: { $ref: "#/components/schemas/Error" }
|
|
547
|
+
RateLimited:
|
|
548
|
+
description: "Over the user's request budget for this endpoint. Retry once `Retry-After` seconds have passed."
|
|
549
|
+
headers:
|
|
550
|
+
Retry-After: { $ref: "#/components/headers/RetryAfter" }
|
|
551
|
+
content:
|
|
552
|
+
application/json:
|
|
553
|
+
schema: { $ref: "#/components/schemas/Error" }
|
|
554
|
+
Invalid:
|
|
555
|
+
description: |
|
|
556
|
+
Rejected. Either validation errors, a host override re-rendering the form (its flash lands in `base`),
|
|
557
|
+
an action whose redirect carried an alert, or a missing/stale CSRF token (code `invalid_csrf`, which
|
|
558
|
+
has no errors/base).
|
|
559
|
+
content:
|
|
560
|
+
application/json:
|
|
561
|
+
schema:
|
|
562
|
+
oneOf:
|
|
563
|
+
- $ref: "#/components/schemas/ValidationError"
|
|
564
|
+
- $ref: "#/components/schemas/Error"
|
|
565
|
+
ActionResult:
|
|
566
|
+
description: "The action ran. `message` is the flash notice; `location` is where the classic admin would have redirected. An action that renders its template again instead of redirecting (a search that lists its results) answers 200 with a FormResponse, which has `form` and no `ok`: show it in place of the form that was submitted. A 422 is kept for a rejected write: an alert flash or errors on the record or the form's object."
|
|
567
|
+
content:
|
|
568
|
+
application/json:
|
|
569
|
+
schema: { $ref: "#/components/schemas/ActionResult" }
|
|
570
|
+
schemas:
|
|
571
|
+
ClientErrorReport:
|
|
572
|
+
type: object
|
|
573
|
+
required: [error_name]
|
|
574
|
+
description: Names only. Never an error's message, a URL, a query value or a record value; the server drops fields that aren't shaped like the names below.
|
|
575
|
+
properties:
|
|
576
|
+
error_name: { type: string, maxLength: 64, description: "The error's class name, e.g. `TypeError`" }
|
|
577
|
+
boundary: { type: string, description: "Which error boundary caught it: `app`, `route`, `frame`, `iframe` or `node:<type>`" }
|
|
578
|
+
components:
|
|
579
|
+
type: array
|
|
580
|
+
maxItems: 20
|
|
581
|
+
items: { type: string, maxLength: 64 }
|
|
582
|
+
description: Component names of the stack, innermost first
|
|
583
|
+
route: { type: string, maxLength: 128, description: "The matched route pattern, e.g. `/:resource/:id/edit`" }
|
|
584
|
+
resource: { type: string, description: "Resource or page key; dropped unless it is one the user may see" }
|
|
585
|
+
client_version: { type: string, maxLength: 32 }
|
|
586
|
+
request_id: { type: string, maxLength: 64, description: The `X-Request-Id` of the last API response the client saw }
|
|
587
|
+
McpRequest:
|
|
588
|
+
type: object
|
|
589
|
+
required: [jsonrpc, method]
|
|
590
|
+
properties:
|
|
591
|
+
jsonrpc: { type: string, enum: ["2.0"] }
|
|
592
|
+
id: { description: "Absent for notifications", oneOf: [{ type: string }, { type: integer }] }
|
|
593
|
+
method: { type: string, enum: [initialize, ping, tools/list, tools/call, notifications/initialized] }
|
|
594
|
+
params: { type: object, additionalProperties: true }
|
|
595
|
+
McpResponse:
|
|
596
|
+
type: object
|
|
597
|
+
required: [jsonrpc]
|
|
598
|
+
properties:
|
|
599
|
+
jsonrpc: { type: string, enum: ["2.0"] }
|
|
600
|
+
id: { nullable: true, oneOf: [{ type: string }, { type: integer }] }
|
|
601
|
+
result:
|
|
602
|
+
type: object
|
|
603
|
+
additionalProperties: true
|
|
604
|
+
description: "`tools/call`: `{content: [{type: \"text\", text: <compact JSON or message>}], isError}`. `tools/list`: `{tools: [{name, title, description, inputSchema, annotations}]}`."
|
|
605
|
+
error:
|
|
606
|
+
type: object
|
|
607
|
+
required: [code, message]
|
|
608
|
+
properties:
|
|
609
|
+
code: { type: integer }
|
|
610
|
+
message: { type: string }
|
|
611
|
+
Error:
|
|
612
|
+
type: object
|
|
613
|
+
required: [code, message]
|
|
614
|
+
properties:
|
|
615
|
+
code:
|
|
616
|
+
type: string
|
|
617
|
+
enum: [unauthorized, forbidden, insufficient_scope, not_found, invalid, invalid_csrf, unsupported, error, stale, retry, rate_limited, api_denied]
|
|
618
|
+
description: "`stale` is a lock mismatch: the record changed, so review it. `retry` is a 409 with a `Retry-After` header for a host error declared retryable: the write lost a race, so resend it unchanged. `api_denied` is a 403 from an `api` guard the host declared on an action, resource, page or attribute: never retry it, link to `classic_url`. `guard` names the guard."
|
|
619
|
+
message:
|
|
620
|
+
type: string
|
|
621
|
+
description: "For `error` this is `<ExceptionClass> while rendering <resource> <action>`, never the exception message."
|
|
622
|
+
location: { type: string, nullable: true }
|
|
623
|
+
guard: { type: string, description: "`api_denied`: the guard that refused: `deny`, `read_only`, `session_only` or the name the host registered" }
|
|
624
|
+
classic_url: { type: string, description: "`api_denied`: the classic admin page of the same request (the same page for a GET, else the record's or the resource's page)" }
|
|
625
|
+
attributes:
|
|
626
|
+
type: array
|
|
627
|
+
description: "`api_denied` for a write: the names of the guarded attributes it included, never their values"
|
|
628
|
+
items: { type: string }
|
|
629
|
+
ValidationError:
|
|
630
|
+
type: object
|
|
631
|
+
description: "`form` is present when the rejected write re-rendered a native template (ActionView mode native): the same form with the submitted values and errors, so the client can redraw it."
|
|
632
|
+
required: [code, message, errors, base]
|
|
633
|
+
properties:
|
|
634
|
+
code: { type: string, enum: [invalid] }
|
|
635
|
+
message: { type: string }
|
|
636
|
+
errors:
|
|
637
|
+
type: object
|
|
638
|
+
description: Messages keyed by attribute (`FormField.name`; nested rows use Rails keys like `insurance_carrier_aliases.alias`).
|
|
639
|
+
additionalProperties: { type: array, items: { type: string } }
|
|
640
|
+
row_errors:
|
|
641
|
+
type: object
|
|
642
|
+
description: "Nested rows that failed, by has_many association (`FormSection.name`). `errors` keeps its `assoc.attribute` keys; this says which row each belongs to."
|
|
643
|
+
additionalProperties:
|
|
644
|
+
type: array
|
|
645
|
+
items:
|
|
646
|
+
type: object
|
|
647
|
+
required: [errors]
|
|
648
|
+
description: "A saved row is named by `id`; a new row by `new`, its zero-based place among the new rows in the order they were sent."
|
|
649
|
+
properties:
|
|
650
|
+
id: { type: string }
|
|
651
|
+
new: { type: integer }
|
|
652
|
+
errors:
|
|
653
|
+
type: object
|
|
654
|
+
description: Messages keyed by attribute, `base` for the row as a whole.
|
|
655
|
+
additionalProperties: { type: array, items: { type: string } }
|
|
656
|
+
base:
|
|
657
|
+
type: array
|
|
658
|
+
description: Record-level errors plus any flash alert/error the host action set.
|
|
659
|
+
items: { type: string }
|
|
660
|
+
location: { $ref: "#/components/schemas/Location" }
|
|
661
|
+
form: { $ref: "#/components/schemas/FormResponse" }
|
|
662
|
+
Location:
|
|
663
|
+
type: object
|
|
664
|
+
description: Where an action redirected. `resource`/`id`/`view` are present when it points at a registered resource; `url` is always the classic admin (or external) URL.
|
|
665
|
+
required: [url]
|
|
666
|
+
properties:
|
|
667
|
+
url: { type: string }
|
|
668
|
+
resource: { type: string }
|
|
669
|
+
id: { type: string }
|
|
670
|
+
view: { type: string, enum: [index, show, new, edit] }
|
|
671
|
+
WriteResult:
|
|
672
|
+
type: object
|
|
673
|
+
required: [ok, id]
|
|
674
|
+
properties:
|
|
675
|
+
ok: { type: boolean, enum: [true] }
|
|
676
|
+
id: { type: string }
|
|
677
|
+
message: { type: string, description: "Flash notice, e.g. Post was successfully updated." }
|
|
678
|
+
location: { $ref: "#/components/schemas/Location" }
|
|
679
|
+
DryRunResult:
|
|
680
|
+
type: object
|
|
681
|
+
description: What an update with `dry_run` would change. Nothing was saved.
|
|
682
|
+
required: [ok, dry_run, changes]
|
|
683
|
+
properties:
|
|
684
|
+
ok: { type: boolean, enum: [true] }
|
|
685
|
+
dry_run: { type: boolean, enum: [true] }
|
|
686
|
+
changes:
|
|
687
|
+
type: object
|
|
688
|
+
description: Attribute to its value before and after. Masked attributes show as `[masked]`.
|
|
689
|
+
additionalProperties:
|
|
690
|
+
type: object
|
|
691
|
+
required: [from, to]
|
|
692
|
+
properties:
|
|
693
|
+
from: {}
|
|
694
|
+
to: {}
|
|
695
|
+
nested:
|
|
696
|
+
type: object
|
|
697
|
+
description: Rows of each has_many section that would be added, removed or changed.
|
|
698
|
+
additionalProperties:
|
|
699
|
+
type: object
|
|
700
|
+
required: [added, removed, changed]
|
|
701
|
+
properties:
|
|
702
|
+
added: { type: integer }
|
|
703
|
+
removed: { type: integer }
|
|
704
|
+
changed: { type: integer }
|
|
705
|
+
ActionResult:
|
|
706
|
+
type: object
|
|
707
|
+
required: [ok]
|
|
708
|
+
properties:
|
|
709
|
+
ok: { type: boolean, enum: [true] }
|
|
710
|
+
message: { type: string }
|
|
711
|
+
location: { $ref: "#/components/schemas/Location" }
|
|
712
|
+
RecordParams:
|
|
713
|
+
type: object
|
|
714
|
+
description: "`{ <param_key>: { <attribute>: value } }` where param_key is the prefix of FormField.param (e.g. post)."
|
|
715
|
+
additionalProperties:
|
|
716
|
+
oneOf:
|
|
717
|
+
- { type: object, additionalProperties: true }
|
|
718
|
+
- { type: boolean, description: "A top-level flag, e.g. `dry_run` on update." }
|
|
719
|
+
BatchActionRequest:
|
|
720
|
+
type: object
|
|
721
|
+
required: [batch_action, collection_selection]
|
|
722
|
+
properties:
|
|
723
|
+
batch_action: { type: string, description: BatchAction.key }
|
|
724
|
+
collection_selection:
|
|
725
|
+
type: array
|
|
726
|
+
items: { type: string }
|
|
727
|
+
batch_action_inputs:
|
|
728
|
+
type: object
|
|
729
|
+
additionalProperties: true
|
|
730
|
+
description: Values for BatchAction.inputs, keyed by name.
|
|
731
|
+
BatchAction:
|
|
732
|
+
type: object
|
|
733
|
+
required: [key, label, inputs]
|
|
734
|
+
properties:
|
|
735
|
+
key: { type: string }
|
|
736
|
+
label: { type: string }
|
|
737
|
+
confirm: { type: string }
|
|
738
|
+
api_denied: { type: boolean, description: "The server refuses this batch action through the API; link to `classic_url` instead of offering it" }
|
|
739
|
+
api_guard: { type: string, description: "A guard the host registered may refuse this batch action, depending on the request" }
|
|
740
|
+
classic_url: { type: string }
|
|
741
|
+
disabled_reason: { type: string, description: "With `api_denied`: why, as the host worded it" }
|
|
742
|
+
inputs:
|
|
743
|
+
type: array
|
|
744
|
+
items: { $ref: "#/components/schemas/FormField" }
|
|
745
|
+
Session:
|
|
746
|
+
type: object
|
|
747
|
+
required: [user, csrf_token]
|
|
748
|
+
properties:
|
|
749
|
+
user:
|
|
750
|
+
type: object
|
|
751
|
+
required: [id, display_name]
|
|
752
|
+
properties:
|
|
753
|
+
id: { type: string }
|
|
754
|
+
display_name: { type: string }
|
|
755
|
+
csrf_token: { type: string, description: "Send as the X-CSRF-Token header on every write. Bearer-token requests need none and the server ignores it." }
|
|
756
|
+
ui:
|
|
757
|
+
$ref: "#/components/schemas/UiState"
|
|
758
|
+
UiState:
|
|
759
|
+
type: object
|
|
760
|
+
required: [available, default, client_errors]
|
|
761
|
+
description: Whether this user may switch between the classic admin and this client, and which one the host would start them in. The browser's `reactiveadmin_ui` cookie, not the server, holds the choice.
|
|
762
|
+
properties:
|
|
763
|
+
available: { type: boolean }
|
|
764
|
+
default: { type: string, enum: [classic, new] }
|
|
765
|
+
client_errors: { type: boolean, description: "Whether the client reports crashes to `_client_errors` (`config.ui.client_errors`)." }
|
|
766
|
+
OptionsResponse:
|
|
767
|
+
type: object
|
|
768
|
+
required: [options, truncated]
|
|
769
|
+
properties:
|
|
770
|
+
options:
|
|
771
|
+
type: array
|
|
772
|
+
items: { $ref: "#/components/schemas/Option" }
|
|
773
|
+
truncated: { type: boolean, description: More matches exist than `limit` }
|
|
774
|
+
next_cursor: { type: string, nullable: true, description: "Present when truncated; send as `cursor` to load more" }
|
|
775
|
+
LabelsResponse:
|
|
776
|
+
type: object
|
|
777
|
+
required: [labels]
|
|
778
|
+
properties:
|
|
779
|
+
labels:
|
|
780
|
+
type: array
|
|
781
|
+
items:
|
|
782
|
+
type: object
|
|
783
|
+
required: [resource, id, display_name]
|
|
784
|
+
properties:
|
|
785
|
+
resource: { type: string }
|
|
786
|
+
id: { type: string }
|
|
787
|
+
display_name: { type: string }
|
|
788
|
+
LookupResponse:
|
|
789
|
+
type: object
|
|
790
|
+
required: [lookups]
|
|
791
|
+
properties:
|
|
792
|
+
lookups:
|
|
793
|
+
type: object
|
|
794
|
+
description: "Options found for each requested field, keyed by field name"
|
|
795
|
+
additionalProperties:
|
|
796
|
+
type: array
|
|
797
|
+
items: { $ref: "#/components/schemas/Option" }
|
|
798
|
+
FormResponse:
|
|
799
|
+
type: object
|
|
800
|
+
x-degraded: true
|
|
801
|
+
description: |
|
|
802
|
+
The new/edit form of a resource, or the Formtastic form of a custom GET action template (ActionView mode native).
|
|
803
|
+
For a template, `resource` is the resource (or page) key, `id` the member id when the action has one, `title`
|
|
804
|
+
the template's first heading, and nested params such as `prior_authorization[approval][note]` appear as
|
|
805
|
+
fields named `approval.note`. Html around the form is kept as `html` fields. Typeahead `options_path` points
|
|
806
|
+
at the same action (`?context=template&field=<name>&term=`, plus the query the view was loaded with), which answers with an
|
|
807
|
+
OptionsResponse. A form with `action.method` get is a filter form: its results are the template's `layout` below it.
|
|
808
|
+
required: [resource, title, action, form, permissions]
|
|
809
|
+
properties:
|
|
810
|
+
layout:
|
|
811
|
+
type: array
|
|
812
|
+
description: "Template forms only. Present when the template shows more than its form: further forms, row actions (button_to forms and data-method links become `action` nodes), or content after the form such as search results. The whole template content as typed nodes in order, with a `form` node that has no `form` payload standing for this response's own form; render that form (fields and submit button) at that position. Further Formtastic forms are `form` nodes with their own FormResponse. When absent, content around the form is in `form.sections` as html fields."
|
|
813
|
+
items: { $ref: "#/components/schemas/Node" }
|
|
814
|
+
submittable: { type: boolean, description: "False when the form can't be submitted faithfully (form partial, raw inputs in html fields); clients disable Save and link to classic" }
|
|
815
|
+
unsupported_reason: { type: string, nullable: true }
|
|
816
|
+
lock: { $ref: "#/components/schemas/FormLock" }
|
|
817
|
+
degraded:
|
|
818
|
+
type: array
|
|
819
|
+
items: { $ref: "#/components/schemas/Degradation" }
|
|
820
|
+
resource: { type: string }
|
|
821
|
+
id: { type: string, description: Present for edit forms }
|
|
822
|
+
title: { type: string }
|
|
823
|
+
display_name: { type: string, nullable: true }
|
|
824
|
+
actions:
|
|
825
|
+
type: array
|
|
826
|
+
description: "Action items for the new/edit page (placement header)"
|
|
827
|
+
items: { $ref: "#/components/schemas/Action" }
|
|
828
|
+
action:
|
|
829
|
+
type: object
|
|
830
|
+
description: Where to submit. `path` is relative to the host root and already includes the mount.
|
|
831
|
+
required: [method, path]
|
|
832
|
+
properties:
|
|
833
|
+
method:
|
|
834
|
+
type: string
|
|
835
|
+
enum: [get, post, put, patch, delete]
|
|
836
|
+
description: "`get`: a read-only form (a filter with results below it). Never send it as a write: navigate the same view with the form's fields as the query string, named by each field's `param` (Rails nesting, e.g. `simulation[date]=2026-10-01`), and fetch `path` with that query. Needs no CSRF token. The browser URL carries the same query, so a page loaded with it shows the results and prefilled fields."
|
|
837
|
+
path: { type: string }
|
|
838
|
+
form: { $ref: "#/components/schemas/Form" }
|
|
839
|
+
submit_label: { type: string, description: "Label of the template's submit button (template forms and `form` nodes)" }
|
|
840
|
+
submit_confirm: { type: string, description: "Question the form's submit button asks (data-confirm: `f.action :submit, button_html:` or a template's submit); clients ask it before posting" }
|
|
841
|
+
permissions: { $ref: "#/components/schemas/Permissions" }
|
|
842
|
+
Form:
|
|
843
|
+
type: object
|
|
844
|
+
required: [sections]
|
|
845
|
+
properties:
|
|
846
|
+
sections:
|
|
847
|
+
type: array
|
|
848
|
+
items: { $ref: "#/components/schemas/FormSection" }
|
|
849
|
+
FormSection:
|
|
850
|
+
type: object
|
|
851
|
+
description: |
|
|
852
|
+
`inputs` is a fieldset of fields. `has_many` is a nested-attributes collection: submit existing rows as
|
|
853
|
+
`<param>[<index>][<field>]` (including their hidden `id`; add `[_destroy]=1` to remove when `destroy`),
|
|
854
|
+
and new rows from `template_fields` after replacing the `__INDEX__` placeholder in each param.
|
|
855
|
+
required: [kind, fields]
|
|
856
|
+
properties:
|
|
857
|
+
title: { type: string, nullable: true, description: "The section heading. A compact has_many without a `heading:` is named for its one control, pluralized." }
|
|
858
|
+
kind: { type: string, enum: [inputs, has_many] }
|
|
859
|
+
fields: { type: array, items: { $ref: "#/components/schemas/FormField" } }
|
|
860
|
+
name: { type: string, description: has_many association }
|
|
861
|
+
param_key: { type: string, example: insurance_carrier_aliases_attributes }
|
|
862
|
+
param: { type: string, example: "insurance_carrier[insurance_carrier_aliases_attributes]" }
|
|
863
|
+
allow_destroy: { type: boolean }
|
|
864
|
+
sortable: { type: string, description: Column to set to each row's position }
|
|
865
|
+
new_record_label: { type: string, description: Absent when rows cannot be added }
|
|
866
|
+
layout:
|
|
867
|
+
type: string
|
|
868
|
+
enum: [cards, compact]
|
|
869
|
+
description: "How to lay the rows out. `compact` when every row is a single visible control (a text, select or single typeahead; hidden `id` and `_destroy` aside): a dense list, one line per row, labelled by the section heading. `cards` otherwise, or when the host declared `nested_layout`. A client that doesn't know `layout` shows cards."
|
|
870
|
+
max_rows: { type: integer, description: "The most rows the host allows (the has_many `max_rows:` option). A hint: the server doesn't enforce it." }
|
|
871
|
+
template_fields:
|
|
872
|
+
type: array
|
|
873
|
+
items: { $ref: "#/components/schemas/FormField" }
|
|
874
|
+
records:
|
|
875
|
+
type: array
|
|
876
|
+
items: { $ref: "#/components/schemas/FormRecord" }
|
|
877
|
+
FormRecord:
|
|
878
|
+
type: object
|
|
879
|
+
required: [fields]
|
|
880
|
+
properties:
|
|
881
|
+
id: { type: string }
|
|
882
|
+
param: { type: string, description: "Row prefix, e.g. insurance_carrier[insurance_carrier_aliases_attributes][0]" }
|
|
883
|
+
fields: { type: array, items: { $ref: "#/components/schemas/FormField" } }
|
|
884
|
+
destroy: { type: boolean, description: Whether this row may be removed }
|
|
885
|
+
FormField:
|
|
886
|
+
type: object
|
|
887
|
+
description: |
|
|
888
|
+
One input. `param` is the full bracket param (a trailing `[]` marks array values); null for `html` and `content`.
|
|
889
|
+
`json` controls take and return structured JSON values. `html` is the graceful fallback for content or
|
|
890
|
+
custom inputs the API cannot express: `value` is sanitized html to display read-only.
|
|
891
|
+
`content` is not an input: it is what the form block rendered between its inputs (headings, panels, tables
|
|
892
|
+
of the current record, notices) as typed nodes in `layout`, to show read-only at this position. It has no
|
|
893
|
+
`param` or `value` and takes no part in a write. A client that doesn't know `content` may skip it.
|
|
894
|
+
`typeahead` fields carry the current selection in `options` and search the rest via `options_path`
|
|
895
|
+
(append `&term=`); `free_text` means any typed value is accepted (datalist).
|
|
896
|
+
|
|
897
|
+
Writes follow HTML form semantics, applied by the server so every client behaves alike. A `null` for
|
|
898
|
+
a text-like or select control (text, textarea, email, url, phone, password, select, typeahead, number,
|
|
899
|
+
date, datetime, time, hidden, json) is stored as `""`, as a browser posts an empty input. An unselected
|
|
900
|
+
`radio` is sent as `""` or omitted: either leaves the attribute out of the write, since browsers post
|
|
901
|
+
nothing for it. `boolean`, `file`, `multiselect` and `checkboxes` keep their types. A `json` control
|
|
902
|
+
accepts any JSON value and is posted to the host as JSON text, as the classic textarea posts it, so
|
|
903
|
+
`permit_params` takes it as a scalar attribute. Errors in a rejected write are keyed by the `name` of
|
|
904
|
+
the field that posts the attribute (`category` and `category_id` both map to
|
|
905
|
+
the rendered field).
|
|
906
|
+
|
|
907
|
+
A `json` control with a `summary` was not sent its value. Omit it from the write to keep the stored value
|
|
908
|
+
(a `null` or `""` for it is also treated as unchanged; send `{}` or `[]` to empty it). A client that loaded the
|
|
909
|
+
value through `expand_path` submits it as usual. `[masked]` placeholders in a submitted json value are
|
|
910
|
+
replaced with the stored values of the same keys, and the literal is never written.
|
|
911
|
+
required: [name, label, control, required]
|
|
912
|
+
properties:
|
|
913
|
+
name: { type: string }
|
|
914
|
+
param: { type: string, nullable: true }
|
|
915
|
+
label: { type: string }
|
|
916
|
+
control:
|
|
917
|
+
type: string
|
|
918
|
+
enum: [text, textarea, number, email, url, phone, password, select, multiselect, typeahead, boolean, radio, checkboxes, date, datetime, time, json, file, hidden, html, content]
|
|
919
|
+
value: { nullable: true }
|
|
920
|
+
layout:
|
|
921
|
+
type: array
|
|
922
|
+
description: "`content` only: the nodes to show, in order, as a page's layout within the form's record."
|
|
923
|
+
items: { $ref: "#/components/schemas/Node" }
|
|
924
|
+
summary:
|
|
925
|
+
type: object
|
|
926
|
+
description: "json controls on an existing record: sent with `value: null` when the stored value is over the inline limit or holds a masked key at any depth. Nested masked keys read `[masked]` once loaded."
|
|
927
|
+
properties:
|
|
928
|
+
kind: { type: string, enum: [object, array, scalar] }
|
|
929
|
+
keys: { type: array, items: { type: string } }
|
|
930
|
+
size: { type: integer }
|
|
931
|
+
expand_path: { type: string, description: "json controls with a `summary`: API path of getRecordValue (an audited view) that returns the full value for editing. Absent for fields inside nested rows, which stay unchanged." }
|
|
932
|
+
masked: { type: boolean, description: "A secret: the current value is never sent (no `value`). Show an empty input and submit blank to keep the stored value; a non-blank value replaces it." }
|
|
933
|
+
required: { type: boolean }
|
|
934
|
+
hint: { type: string }
|
|
935
|
+
placeholder: { type: string }
|
|
936
|
+
options:
|
|
937
|
+
type: array
|
|
938
|
+
items: { $ref: "#/components/schemas/Option" }
|
|
939
|
+
options_path: { type: string }
|
|
940
|
+
multiple: { type: boolean }
|
|
941
|
+
free_text: { type: boolean }
|
|
942
|
+
disabled: { type: boolean }
|
|
943
|
+
api_denied: { type: boolean, description: "The host guarded this attribute: the server refuses a write that includes it. Shown read-only (`disabled` is also set) with a link to `classic_url`." }
|
|
944
|
+
api_guard: { type: string, description: "A guard the host registered may refuse a write that includes this attribute, depending on the request" }
|
|
945
|
+
classic_url: { type: string, description: "With `api_denied`: the classic page of this form" }
|
|
946
|
+
errors:
|
|
947
|
+
type: array
|
|
948
|
+
items: { type: string }
|
|
949
|
+
input_html:
|
|
950
|
+
type: object
|
|
951
|
+
properties:
|
|
952
|
+
rows: { type: integer }
|
|
953
|
+
min: { description: "A number for `number`. For `date` an ISO day (`2026-01-01`), for `datetime` an ISO time (`2026-01-01T09:00:00Z`): the earliest value the picker offers. Not enforced by the server." }
|
|
954
|
+
max: { description: "As `min`: the largest number, or the latest day or time the picker offers." }
|
|
955
|
+
step: {}
|
|
956
|
+
maxlength: { type: integer }
|
|
957
|
+
Manifest:
|
|
958
|
+
type: object
|
|
959
|
+
required: [schema_version, site, resources, menu]
|
|
960
|
+
description: Lightweight; everything needed for the shell. Per-resource details come from getResourceMeta.
|
|
961
|
+
properties:
|
|
962
|
+
schema_version: { type: integer, example: 2 }
|
|
963
|
+
site: { $ref: "#/components/schemas/Site" }
|
|
964
|
+
menu:
|
|
965
|
+
type: array
|
|
966
|
+
description: AA menu tree for the current user (items failing `if:`/authorization omitted), ordered by priority then label.
|
|
967
|
+
items: { $ref: "#/components/schemas/MenuItem" }
|
|
968
|
+
resources:
|
|
969
|
+
type: array
|
|
970
|
+
items: { $ref: "#/components/schemas/ResourceSummary" }
|
|
971
|
+
Site:
|
|
972
|
+
type: object
|
|
973
|
+
description: ActiveAdmin namespace settings evaluated for the current user.
|
|
974
|
+
required: [title, utility_menu, locale, time_zone, comments, default_per_page]
|
|
975
|
+
properties:
|
|
976
|
+
title: { type: string, description: "AA site_title, e.g. Core Admin" }
|
|
977
|
+
title_link: { type: string, nullable: true }
|
|
978
|
+
title_image: { type: string, nullable: true, description: URL }
|
|
979
|
+
favicon: { type: string, nullable: true, description: URL }
|
|
980
|
+
home:
|
|
981
|
+
type: object
|
|
982
|
+
nullable: true
|
|
983
|
+
description: "AA root_to: a resource or a page/url"
|
|
984
|
+
properties:
|
|
985
|
+
resource: { type: string, nullable: true }
|
|
986
|
+
url: { type: string, nullable: true }
|
|
987
|
+
logout:
|
|
988
|
+
type: object
|
|
989
|
+
nullable: true
|
|
990
|
+
required: [url, method]
|
|
991
|
+
properties:
|
|
992
|
+
url: { type: string }
|
|
993
|
+
method: { type: string, enum: [get, post, delete] }
|
|
994
|
+
utility_menu:
|
|
995
|
+
type: array
|
|
996
|
+
description: AA utility_navigation menu (current user, logout, custom links)
|
|
997
|
+
items: { $ref: "#/components/schemas/MenuItem" }
|
|
998
|
+
current_user:
|
|
999
|
+
type: object
|
|
1000
|
+
nullable: true
|
|
1001
|
+
required: [id, display_name]
|
|
1002
|
+
properties:
|
|
1003
|
+
id: { type: string }
|
|
1004
|
+
display_name: { type: string }
|
|
1005
|
+
locale: { type: string, example: en }
|
|
1006
|
+
time_zone: { type: string, example: America/New_York }
|
|
1007
|
+
date_format: { type: string, nullable: true, description: "strftime pattern from AA localize_format (e.g. :long)" }
|
|
1008
|
+
datetime_format: { type: string, nullable: true, description: "strftime pattern from AA localize_format" }
|
|
1009
|
+
footer: { type: string, nullable: true }
|
|
1010
|
+
comments: { type: boolean, description: AA comments enabled }
|
|
1011
|
+
default_per_page: { type: integer }
|
|
1012
|
+
max_per_page: { type: integer, nullable: true }
|
|
1013
|
+
trusted_media_hosts:
|
|
1014
|
+
type: array
|
|
1015
|
+
description: "Hostnames besides this site that image and document nodes may load from (the host's html_trusted_hosts). The client refuses any other host and the host app's CSP must allow these in img-src and frame-src."
|
|
1016
|
+
items: { type: string }
|
|
1017
|
+
ActionView:
|
|
1018
|
+
type: object
|
|
1019
|
+
nullable: true
|
|
1020
|
+
description: |
|
|
1021
|
+
How to present a GET action (member/collection action or action item that renders a template) inside the client.
|
|
1022
|
+
Chosen server-side by the fallback ladder, overridable per action with `reactive { render_as ... }`:
|
|
1023
|
+
native (template is Formtastic-only: `path` returns a FormResponse; a read-only template with no form or
|
|
1024
|
+
control: `path` returns a PageResponse of its content as typed nodes, `view` absent) > frame (HTML over the wire: `path` is the
|
|
1025
|
+
classic URL fetched with header X-Reactiveadmin-Frame: 1, returning layout-less HTML) > iframe (custom JS:
|
|
1026
|
+
`path` is the classic URL with ?embed=1) > custom (host React component registered under `custom_key`).
|
|
1027
|
+
For a link to a register_page the mode is native and `path` returns a PageResponse (getPage), whose nodes carry
|
|
1028
|
+
any frames and iframes. Overridden with `reactive { render_as :frame, action: :name }`.
|
|
1029
|
+
required: [mode]
|
|
1030
|
+
properties:
|
|
1031
|
+
mode: { type: string, enum: [native, frame, iframe, custom] }
|
|
1032
|
+
path: { type: string }
|
|
1033
|
+
custom_key: { type: string, nullable: true }
|
|
1034
|
+
presentation: { type: string, enum: [page, dialog, sheet], description: "Suggested container; dialog for short forms" }
|
|
1035
|
+
PageResponse:
|
|
1036
|
+
type: object
|
|
1037
|
+
required: [key, title, layout, actions]
|
|
1038
|
+
description: |
|
|
1039
|
+
A register_page, or the content of a read-only GET action template (`view.mode` native, `view` absent; `key` is the
|
|
1040
|
+
resource or page key). `layout` holds typed nodes; forms in the content are `frame` nodes, and a page that runs its own
|
|
1041
|
+
JS is a single `iframe` node. `view.mode` reports what the content turned out to be: native (typed nodes only), frame
|
|
1042
|
+
(some nodes are frames), iframe (one iframe node) or custom (empty layout; render the host component for `custom_key`).
|
|
1043
|
+
Served at `/admin/_pages/{page}`, or `/admin/{parent}/{parent_id}/_pages/{page}` for a page under a required parent.
|
|
1044
|
+
properties:
|
|
1045
|
+
degraded:
|
|
1046
|
+
type: array
|
|
1047
|
+
items: { $ref: "#/components/schemas/Degradation" }
|
|
1048
|
+
key: { type: string }
|
|
1049
|
+
title: { type: string }
|
|
1050
|
+
view: { $ref: "#/components/schemas/ActionView" }
|
|
1051
|
+
layout:
|
|
1052
|
+
type: array
|
|
1053
|
+
items: { $ref: "#/components/schemas/Node" }
|
|
1054
|
+
actions:
|
|
1055
|
+
type: array
|
|
1056
|
+
description: Page action items and page_actions (placement header)
|
|
1057
|
+
items: { $ref: "#/components/schemas/Action" }
|
|
1058
|
+
FrameResponse:
|
|
1059
|
+
type: object
|
|
1060
|
+
description: |
|
|
1061
|
+
Not JSON: frame requests (header X-Reactiveadmin-Frame: 1) to classic URLs return text/html without the AA layout,
|
|
1062
|
+
scripts and handlers stripped; same authentication and authorization as classic. Failures are JSON `Error` (401
|
|
1063
|
+
unauthorized, 403 forbidden, 422 invalid_csrf).
|
|
1064
|
+
Writes from a frame (intercepted form submit / data-method link, sent as FormData with X-CSRF-Token) return either
|
|
1065
|
+
200 text/html (re-rendered fragment: replace the frame), or 200 application/json `FrameRedirect` when the action redirected,
|
|
1066
|
+
or a file download (Content-Disposition attachment).
|
|
1067
|
+
properties: {}
|
|
1068
|
+
FrameRedirect:
|
|
1069
|
+
type: object
|
|
1070
|
+
required: [redirect]
|
|
1071
|
+
properties:
|
|
1072
|
+
redirect: { $ref: "#/components/schemas/Location" }
|
|
1073
|
+
flash:
|
|
1074
|
+
type: object
|
|
1075
|
+
additionalProperties: { type: string }
|
|
1076
|
+
Degradation:
|
|
1077
|
+
type: object
|
|
1078
|
+
description: "Something the server could not represent faithfully. Clients surface these (dev toast, subtle banner) instead of failing silently."
|
|
1079
|
+
required: [kind, reason]
|
|
1080
|
+
properties:
|
|
1081
|
+
kind: { type: string, example: sidebar_dropped }
|
|
1082
|
+
where: { type: string, nullable: true, description: "Structural location, e.g. show/panel[2] or form/section[1]; never contains record data" }
|
|
1083
|
+
reason: { type: string }
|
|
1084
|
+
ValueResponse:
|
|
1085
|
+
type: object
|
|
1086
|
+
required: [value]
|
|
1087
|
+
properties:
|
|
1088
|
+
value: {}
|
|
1089
|
+
FormLock:
|
|
1090
|
+
type: object
|
|
1091
|
+
description: "Optimistic-lock token. Send it back unchanged as `lock` in the update body; a mismatch returns 409 `stale`."
|
|
1092
|
+
required: [field, value]
|
|
1093
|
+
properties:
|
|
1094
|
+
field: { type: string, enum: [lock_version, updated_at] }
|
|
1095
|
+
value: { type: string }
|
|
1096
|
+
ResourceSummary:
|
|
1097
|
+
type: object
|
|
1098
|
+
required: [key, label, plural_label, actions, permissions, meta_path]
|
|
1099
|
+
properties:
|
|
1100
|
+
key: { type: string }
|
|
1101
|
+
label: { type: string }
|
|
1102
|
+
plural_label: { type: string }
|
|
1103
|
+
menu_parent: { type: string, nullable: true, description: "Label of the immediate parent menu group (the last of a parent array), null for top-level items" }
|
|
1104
|
+
menu_priority: { type: integer, nullable: true }
|
|
1105
|
+
meta_path: { type: string, description: "API path of getResourceMeta, e.g. /api/admin/posts/_meta" }
|
|
1106
|
+
belongs_to: { $ref: "#/components/schemas/BelongsTo" }
|
|
1107
|
+
index_path_template: { type: string, nullable: true }
|
|
1108
|
+
api_index_path_template: { type: string, nullable: true }
|
|
1109
|
+
actions:
|
|
1110
|
+
type: array
|
|
1111
|
+
items: { type: string, enum: [index, show, new, create, edit, update, destroy] }
|
|
1112
|
+
permissions: { $ref: "#/components/schemas/Permissions" }
|
|
1113
|
+
api_denied: { $ref: "#/components/schemas/ApiDeniedSummary" }
|
|
1114
|
+
ApiDeniedSummary:
|
|
1115
|
+
type: object
|
|
1116
|
+
description: "Present on a resource when an `api` guard refuses part of it for the requesting channel, a session or a token (a resource denied whole is not in the manifest). `actions` lists the refused standard and custom actions (`new` and `create`, `edit` and `update` go together): offer a classic link instead, e.g. for New."
|
|
1117
|
+
properties:
|
|
1118
|
+
actions: { type: array, items: { type: string } }
|
|
1119
|
+
attributes: { type: array, items: { type: string } }
|
|
1120
|
+
guards:
|
|
1121
|
+
type: object
|
|
1122
|
+
description: "Actions a guard the host registered may refuse, by action name to guard name. Only a request tells."
|
|
1123
|
+
additionalProperties: { type: string }
|
|
1124
|
+
classic_url: { type: string, description: "The classic index page" }
|
|
1125
|
+
BelongsTo:
|
|
1126
|
+
type: object
|
|
1127
|
+
nullable: true
|
|
1128
|
+
description: Set when the resource is nested under a parent. When `optional` is false it has no top-level routes and is not in the menu.
|
|
1129
|
+
required: [parent, param, optional]
|
|
1130
|
+
properties:
|
|
1131
|
+
parent: { type: string, description: Parent resource key }
|
|
1132
|
+
param: { type: string, description: "Path param carrying the parent id, e.g. post_id" }
|
|
1133
|
+
optional: { type: boolean }
|
|
1134
|
+
MenuItem:
|
|
1135
|
+
type: object
|
|
1136
|
+
required: [id, label, children]
|
|
1137
|
+
properties:
|
|
1138
|
+
id: { type: string, description: "Unique in the tree; overlay groups use their slugged label path, e.g. setup/billing" }
|
|
1139
|
+
label: { type: string }
|
|
1140
|
+
kind:
|
|
1141
|
+
type: string
|
|
1142
|
+
enum: [group, resource, page, link]
|
|
1143
|
+
description: "group = container with children only (the client builds its overview page); resource, page and link are destinations. Absent in older servers: infer from resource/page/url."
|
|
1144
|
+
description: { type: string, nullable: true, description: "Overlay text for a group overview or tooltip" }
|
|
1145
|
+
icon: { type: string, nullable: true, description: "Icon name, resolved by the client's icon set" }
|
|
1146
|
+
resource: { type: string, nullable: true, description: "ResourceMeta.key when the item is a registered resource" }
|
|
1147
|
+
page: { type: string, nullable: true, description: "Page key when the item is an AA register_page (route /pages/{page}, data from getPage)" }
|
|
1148
|
+
url: { type: string, nullable: true, description: "Classic/custom URL when not a resource (pages, external links)" }
|
|
1149
|
+
priority: { type: integer, nullable: true }
|
|
1150
|
+
method: { type: string, enum: [get, post, put, patch, delete], description: "HTTP verb for url items that act (e.g. logout); absent means get" }
|
|
1151
|
+
api_denied: { type: boolean, description: "An `api` guard refuses this resource or page: `kind` is link and `url` is its classic page; open it in a new tab. `resource` or `page` still names it." }
|
|
1152
|
+
children:
|
|
1153
|
+
type: array
|
|
1154
|
+
items: { $ref: "#/components/schemas/MenuItem" }
|
|
1155
|
+
Permissions:
|
|
1156
|
+
type: object
|
|
1157
|
+
description: Result of the AA authorization adapter (Pundit) for the current user. Absent key = not applicable.
|
|
1158
|
+
properties:
|
|
1159
|
+
index: { type: boolean }
|
|
1160
|
+
show: { type: boolean }
|
|
1161
|
+
create: { type: boolean }
|
|
1162
|
+
update: { type: boolean }
|
|
1163
|
+
destroy: { type: boolean }
|
|
1164
|
+
Action:
|
|
1165
|
+
type: object
|
|
1166
|
+
required: [key, label, kind, enabled]
|
|
1167
|
+
properties:
|
|
1168
|
+
key: { type: string, example: edit }
|
|
1169
|
+
label: { type: string }
|
|
1170
|
+
kind: { type: string, enum: [edit, destroy, member, collection, custom, link] }
|
|
1171
|
+
placement:
|
|
1172
|
+
type: string
|
|
1173
|
+
enum: [header, row, inline]
|
|
1174
|
+
description: "header = page action item or member action button; row = index row menu item; inline = button inside show content (see Node type action)"
|
|
1175
|
+
external: { type: boolean, description: "Opens a non-admin URL (another site, or a path of this host outside the admin namespace, then with an absolute href); render in a new tab" }
|
|
1176
|
+
form_path:
|
|
1177
|
+
type: string
|
|
1178
|
+
nullable: true
|
|
1179
|
+
description: "API path returning a FormResponse to collect inputs before running the action (GET member/collection action forms, batch action forms)"
|
|
1180
|
+
view:
|
|
1181
|
+
$ref: "#/components/schemas/ActionView"
|
|
1182
|
+
supported:
|
|
1183
|
+
type: boolean
|
|
1184
|
+
description: "False when the action can't run through the API (custom JS, unknown route); client renders it disabled with disabled_reason and a classic-admin href"
|
|
1185
|
+
api_denied:
|
|
1186
|
+
type: boolean
|
|
1187
|
+
description: "An `api` guard refuses this action and the server answers 403 `api_denied`. It has no `api_path`; render a link to `classic_url`, opened in a new tab, never a button. Also sets `supported: false`, so older clients show it disabled."
|
|
1188
|
+
api_guard: { type: string, description: "A guard the host registered may refuse this action, depending on the request: it is offered as usual" }
|
|
1189
|
+
classic_url: { type: string, description: "With `api_denied`: where the action can be used" }
|
|
1190
|
+
method: { type: string, enum: [get, post, put, patch, delete] }
|
|
1191
|
+
href: { type: string, nullable: true, description: Classic admin URL }
|
|
1192
|
+
api_path: { type: string, description: "API endpoint for this action (edit: GET the form; destroy/member: send with `method`)" }
|
|
1193
|
+
confirm: { type: string, nullable: true }
|
|
1194
|
+
navigate:
|
|
1195
|
+
type: boolean
|
|
1196
|
+
description: "A POST that navigates the browser to a route of this host outside the admin (an OmniAuth start such as `/auth/provider`). `kind` is link, `method` post, `href` the absolute same-origin URL, with no `api_path`. Submit a real hidden `<form method=post action=href>` in the top window with the CSRF token as `authenticity_token` and `params` as hidden fields (a full navigation, not a fetch or a popup). Offered to sessions only, never to bearer tokens."
|
|
1197
|
+
params:
|
|
1198
|
+
type: object
|
|
1199
|
+
description: "With `navigate`: the hidden fields the form carries, besides its CSRF token and `_method`"
|
|
1200
|
+
additionalProperties: { type: string }
|
|
1201
|
+
enabled: { type: boolean }
|
|
1202
|
+
disabled_reason: { type: string, nullable: true }
|
|
1203
|
+
ResourceMeta:
|
|
1204
|
+
type: object
|
|
1205
|
+
required: [key, label, plural_label, actions, permissions, meta_path, filters, scopes, per_page_options, default_per_page]
|
|
1206
|
+
description: Full metadata (superset of ResourceSummary) returned by getResourceMeta.
|
|
1207
|
+
properties:
|
|
1208
|
+
key: { type: string, description: "AA route key, e.g. posts" }
|
|
1209
|
+
meta_path: { type: string, description: "API path of getResourceMeta, e.g. /api/admin/posts/_meta" }
|
|
1210
|
+
action_items:
|
|
1211
|
+
type: array
|
|
1212
|
+
description: Index page action items and collection actions (header buttons), evaluated for the current user.
|
|
1213
|
+
items: { $ref: "#/components/schemas/Action" }
|
|
1214
|
+
download_formats:
|
|
1215
|
+
type: array
|
|
1216
|
+
description: "AA download_links, e.g. [csv]; export with GET {api index path}.{format} keeping current q/scope/order"
|
|
1217
|
+
items: { type: string }
|
|
1218
|
+
pagination_total:
|
|
1219
|
+
type: boolean
|
|
1220
|
+
description: "False when AA index pagination_total is off; IndexMeta.total_count and total_pages are then null"
|
|
1221
|
+
label: { type: string }
|
|
1222
|
+
plural_label: { type: string }
|
|
1223
|
+
menu_parent: { type: string, nullable: true, description: "Label of the immediate parent menu group (the last of a parent array), null for top-level items" }
|
|
1224
|
+
menu_priority: { type: integer, nullable: true }
|
|
1225
|
+
belongs_to:
|
|
1226
|
+
type: object
|
|
1227
|
+
nullable: true
|
|
1228
|
+
description: Set when the resource is nested under a parent. When `optional` is false it has no top-level routes and is not in the menu.
|
|
1229
|
+
required: [parent, param, optional]
|
|
1230
|
+
properties:
|
|
1231
|
+
parent: { type: string, description: Parent resource key }
|
|
1232
|
+
param: { type: string, description: "Path param carrying the parent id, e.g. post_id" }
|
|
1233
|
+
optional: { type: boolean }
|
|
1234
|
+
index_path_template:
|
|
1235
|
+
type: string
|
|
1236
|
+
nullable: true
|
|
1237
|
+
description: "Classic path of the nested index, e.g. /admin/authors/{parent_id}/comments. Null unless belongs_to is set."
|
|
1238
|
+
api_index_path_template:
|
|
1239
|
+
type: string
|
|
1240
|
+
nullable: true
|
|
1241
|
+
description: "Same under the API mount, e.g. /api/admin/authors/{parent_id}/comments."
|
|
1242
|
+
actions:
|
|
1243
|
+
type: array
|
|
1244
|
+
items: { type: string, enum: [index, show, new, create, edit, update, destroy] }
|
|
1245
|
+
api_denied: { $ref: "#/components/schemas/ApiDeniedSummary" }
|
|
1246
|
+
permissions: { $ref: "#/components/schemas/Permissions" }
|
|
1247
|
+
filters:
|
|
1248
|
+
type: array
|
|
1249
|
+
items: { $ref: "#/components/schemas/Filter" }
|
|
1250
|
+
scopes:
|
|
1251
|
+
type: array
|
|
1252
|
+
items: { $ref: "#/components/schemas/Scope" }
|
|
1253
|
+
default_scope: { type: string, nullable: true }
|
|
1254
|
+
per_page_options:
|
|
1255
|
+
type: array
|
|
1256
|
+
items: { type: integer }
|
|
1257
|
+
default_per_page: { type: integer }
|
|
1258
|
+
default_order: { type: string, nullable: true }
|
|
1259
|
+
index_views:
|
|
1260
|
+
type: array
|
|
1261
|
+
description: "Set when the resource declares several index presenters (`index as: ...`); select one with ?as=<as> on the index request. Absent with a single view."
|
|
1262
|
+
items:
|
|
1263
|
+
type: object
|
|
1264
|
+
required: [as, default]
|
|
1265
|
+
properties:
|
|
1266
|
+
as: { type: string, description: "AA index_name, e.g. table, grid, blog, block" }
|
|
1267
|
+
label: { type: string }
|
|
1268
|
+
default: { type: boolean }
|
|
1269
|
+
batch_actions:
|
|
1270
|
+
type: array
|
|
1271
|
+
description: Batch actions the current user is offered on the index (AA `batch_action`, `if:` evaluated).
|
|
1272
|
+
items: { $ref: "#/components/schemas/BatchAction" }
|
|
1273
|
+
Filter:
|
|
1274
|
+
type: object
|
|
1275
|
+
required: [name, label, control]
|
|
1276
|
+
description: |
|
|
1277
|
+
One AA filter. The client sets ransack params under q[...]:
|
|
1278
|
+
- text/number: one of predicates[].param
|
|
1279
|
+
- select/typeahead/checkboxes/boolean: param
|
|
1280
|
+
- date_range: range.from / range.to
|
|
1281
|
+
properties:
|
|
1282
|
+
name: { type: string }
|
|
1283
|
+
label: { type: string }
|
|
1284
|
+
control:
|
|
1285
|
+
type: string
|
|
1286
|
+
enum: [text, number, select, typeahead, boolean, date_range, checkboxes]
|
|
1287
|
+
description: "checkboxes: pick any of `options` (AA `as: :check_boxes`); a large collection degrades to a multiple typeahead"
|
|
1288
|
+
multiple:
|
|
1289
|
+
type: boolean
|
|
1290
|
+
description: "True when several values can be picked (checkboxes, multiple select or typeahead): send each as q[<param>][]=value, where param ends in _in"
|
|
1291
|
+
param: { type: string, nullable: true, description: "Ransack key for single-param controls, e.g. billing_provider_id_eq" }
|
|
1292
|
+
predicates:
|
|
1293
|
+
type: array
|
|
1294
|
+
nullable: true
|
|
1295
|
+
items:
|
|
1296
|
+
type: object
|
|
1297
|
+
required: [param, label]
|
|
1298
|
+
properties:
|
|
1299
|
+
param: { type: string, example: title_cont }
|
|
1300
|
+
label: { type: string, example: Contains }
|
|
1301
|
+
range:
|
|
1302
|
+
type: object
|
|
1303
|
+
nullable: true
|
|
1304
|
+
required: [from, to]
|
|
1305
|
+
properties:
|
|
1306
|
+
from: { type: string, example: published_on_gteq }
|
|
1307
|
+
to: { type: string, example: published_on_lteq }
|
|
1308
|
+
options:
|
|
1309
|
+
type: array
|
|
1310
|
+
nullable: true
|
|
1311
|
+
items: { $ref: "#/components/schemas/Option" }
|
|
1312
|
+
options_path:
|
|
1313
|
+
type: string
|
|
1314
|
+
nullable: true
|
|
1315
|
+
description: Set when the collection exceeds the inline limit (control is then `typeahead` and `options` is empty); search it with getOptions semantics (append `&term=`, or `&value=` to label a selection).
|
|
1316
|
+
Option:
|
|
1317
|
+
type: object
|
|
1318
|
+
required: [label, value]
|
|
1319
|
+
properties:
|
|
1320
|
+
label: { type: string }
|
|
1321
|
+
value: { type: string }
|
|
1322
|
+
hint: { type: string, nullable: true, description: "Secondary text to show muted next to the label (for example an email, or the raw value behind a friendly label)" }
|
|
1323
|
+
Scope:
|
|
1324
|
+
type: object
|
|
1325
|
+
required: [id, name]
|
|
1326
|
+
properties:
|
|
1327
|
+
id: { type: string }
|
|
1328
|
+
name: { type: string }
|
|
1329
|
+
count: { type: integer, nullable: true }
|
|
1330
|
+
group: { type: string, nullable: true, description: "AA `scope group:`; scopes are listed in AA's render order (grouped), render each group as its own segmented control" }
|
|
1331
|
+
Column:
|
|
1332
|
+
type: object
|
|
1333
|
+
required: [key, label, sortable]
|
|
1334
|
+
properties:
|
|
1335
|
+
key: { type: string }
|
|
1336
|
+
label: { type: string }
|
|
1337
|
+
sortable: { type: boolean }
|
|
1338
|
+
sort_key: { type: string, nullable: true, description: "Use as order=<sort_key>_asc|_desc" }
|
|
1339
|
+
kind:
|
|
1340
|
+
type: string
|
|
1341
|
+
enum: [data, index]
|
|
1342
|
+
description: "index: AA `index_column`, the row's running number (cells hold a number node)"
|
|
1343
|
+
class_name: { type: string, nullable: true, description: "AA `column class:`, as written" }
|
|
1344
|
+
align: { type: string, enum: [left, right, center], nullable: true, description: "Right for numeric columns and number-like classes; absent means left" }
|
|
1345
|
+
IndexResponse:
|
|
1346
|
+
type: object
|
|
1347
|
+
required: [resource, columns, rows, meta]
|
|
1348
|
+
properties:
|
|
1349
|
+
degraded:
|
|
1350
|
+
type: array
|
|
1351
|
+
items: { $ref: "#/components/schemas/Degradation" }
|
|
1352
|
+
resource: { type: string }
|
|
1353
|
+
columns:
|
|
1354
|
+
type: array
|
|
1355
|
+
items: { $ref: "#/components/schemas/Column" }
|
|
1356
|
+
rows:
|
|
1357
|
+
type: array
|
|
1358
|
+
items: { $ref: "#/components/schemas/Row" }
|
|
1359
|
+
meta: { $ref: "#/components/schemas/IndexMeta" }
|
|
1360
|
+
RecordPaths:
|
|
1361
|
+
type: object
|
|
1362
|
+
description: Classic and API paths of a record's pages, nested under the parent for nested resources. Only defined actions are present.
|
|
1363
|
+
properties:
|
|
1364
|
+
show: { type: string }
|
|
1365
|
+
edit: { type: string }
|
|
1366
|
+
api_show: { type: string }
|
|
1367
|
+
api_edit: { type: string }
|
|
1368
|
+
Row:
|
|
1369
|
+
type: object
|
|
1370
|
+
required: [id, cells, permissions]
|
|
1371
|
+
properties:
|
|
1372
|
+
id: { type: string }
|
|
1373
|
+
display_name: { type: string, nullable: true, description: "AA display_name; null when AA would only fall back to Model #id" }
|
|
1374
|
+
paths: { $ref: "#/components/schemas/RecordPaths" }
|
|
1375
|
+
permissions: { $ref: "#/components/schemas/Permissions" }
|
|
1376
|
+
actions:
|
|
1377
|
+
type: array
|
|
1378
|
+
description: "Custom row items from the index actions block (View/Edit/Delete come from permissions and paths)"
|
|
1379
|
+
items: { $ref: "#/components/schemas/Action" }
|
|
1380
|
+
cells:
|
|
1381
|
+
type: object
|
|
1382
|
+
description: "Keyed by Column.key; empty for non-table views"
|
|
1383
|
+
additionalProperties: { $ref: "#/components/schemas/Node" }
|
|
1384
|
+
layout:
|
|
1385
|
+
type: array
|
|
1386
|
+
description: "The record rendered by a grid, blog, block or custom index view (IndexMeta.view is not table)"
|
|
1387
|
+
items: { $ref: "#/components/schemas/Node" }
|
|
1388
|
+
class_name: { type: string, nullable: true, description: "AA `row_class:` result" }
|
|
1389
|
+
tone:
|
|
1390
|
+
type: string
|
|
1391
|
+
nullable: true
|
|
1392
|
+
enum: [success, warning, danger, info]
|
|
1393
|
+
description: "Mapped from obvious row_class words (warning, error, danger, success, info)"
|
|
1394
|
+
IndexMeta:
|
|
1395
|
+
type: object
|
|
1396
|
+
required: [page, per_page, total_count, total_pages, scopes]
|
|
1397
|
+
properties:
|
|
1398
|
+
page: { type: integer }
|
|
1399
|
+
per_page: { type: integer }
|
|
1400
|
+
total_count: { type: integer, nullable: true }
|
|
1401
|
+
total_pages: { type: integer, nullable: true }
|
|
1402
|
+
has_next_page: { type: boolean }
|
|
1403
|
+
scopes:
|
|
1404
|
+
type: array
|
|
1405
|
+
items: { $ref: "#/components/schemas/Scope" }
|
|
1406
|
+
current_scope: { type: string, nullable: true }
|
|
1407
|
+
order: { type: string, nullable: true }
|
|
1408
|
+
as: { type: string, description: "AA index_name of the presenter in effect" }
|
|
1409
|
+
view:
|
|
1410
|
+
type: string
|
|
1411
|
+
enum: [table, grid, blog, block]
|
|
1412
|
+
description: "table: columns and cells. Others: Row.layout per record (custom IndexAs classes arrive as block)."
|
|
1413
|
+
grid_columns: { type: integer, description: "Cards per row for view grid (AA `columns:`, default 3)" }
|
|
1414
|
+
title: { type: string, description: "AA `index title:`; absent means the plural label" }
|
|
1415
|
+
blank_slate:
|
|
1416
|
+
type: object
|
|
1417
|
+
description: "AA `blank_slate_link:`; absent means the default create link. A null label and href means the resource declared no link."
|
|
1418
|
+
properties:
|
|
1419
|
+
label: { type: string, nullable: true }
|
|
1420
|
+
href: { type: string, nullable: true, description: Classic admin URL }
|
|
1421
|
+
default_row_actions:
|
|
1422
|
+
type: boolean
|
|
1423
|
+
description: "False when the index block has `actions defaults: false` or no `actions` at all: show only Row.actions, not View, Edit and Delete. Absent means true."
|
|
1424
|
+
row_actions_label: { type: string, description: "AA `actions name:` (the column header) or, with a dropdown, `dropdown_name`" }
|
|
1425
|
+
row_actions_dropdown: { type: boolean, description: "AA `actions dropdown: true`: put the row actions in one menu" }
|
|
1426
|
+
paginator: { type: boolean, description: "False when the presenter has `paginator: false`; absent means true" }
|
|
1427
|
+
per_page_options:
|
|
1428
|
+
type: array
|
|
1429
|
+
description: "Set when the presenter overrides `per_page:`; replaces ResourceMeta.per_page_options for this view (an empty list hides the selector)"
|
|
1430
|
+
items: { type: integer }
|
|
1431
|
+
sidebars:
|
|
1432
|
+
type: array
|
|
1433
|
+
description: "AA sidebar sections for the index page (the built-in filters and search-status sections are left out)"
|
|
1434
|
+
items: { $ref: "#/components/schemas/Sidebar" }
|
|
1435
|
+
Sidebar:
|
|
1436
|
+
type: object
|
|
1437
|
+
required: [title, layout]
|
|
1438
|
+
properties:
|
|
1439
|
+
title: { type: string }
|
|
1440
|
+
layout:
|
|
1441
|
+
type: array
|
|
1442
|
+
items: { $ref: "#/components/schemas/Node" }
|
|
1443
|
+
ShowResponse:
|
|
1444
|
+
type: object
|
|
1445
|
+
required: [resource, id, title, layout, permissions, actions]
|
|
1446
|
+
properties:
|
|
1447
|
+
degraded:
|
|
1448
|
+
type: array
|
|
1449
|
+
items: { $ref: "#/components/schemas/Degradation" }
|
|
1450
|
+
resource: { type: string }
|
|
1451
|
+
id: { type: string }
|
|
1452
|
+
paths: { $ref: "#/components/schemas/RecordPaths" }
|
|
1453
|
+
title: { type: string }
|
|
1454
|
+
display_name: { type: string, nullable: true }
|
|
1455
|
+
permissions: { $ref: "#/components/schemas/Permissions" }
|
|
1456
|
+
actions:
|
|
1457
|
+
type: array
|
|
1458
|
+
description: "Edit, destroy, member actions and show-page action items (placement header)"
|
|
1459
|
+
items: { $ref: "#/components/schemas/Action" }
|
|
1460
|
+
layout:
|
|
1461
|
+
type: array
|
|
1462
|
+
items: { $ref: "#/components/schemas/Node" }
|
|
1463
|
+
sidebars:
|
|
1464
|
+
type: array
|
|
1465
|
+
description: AA sidebar sections for the show page, rendered after the main layout.
|
|
1466
|
+
items: { $ref: "#/components/schemas/Sidebar" }
|
|
1467
|
+
Ref:
|
|
1468
|
+
type: object
|
|
1469
|
+
required: [resource, id]
|
|
1470
|
+
properties:
|
|
1471
|
+
resource: { type: string }
|
|
1472
|
+
id: { type: string }
|
|
1473
|
+
path: { type: string, description: "Classic show path; only set for nested-only resources, whose `resource` and `id` don't locate the record." }
|
|
1474
|
+
api_path: { type: string, description: "The same under the API mount; only set with `path`." }
|
|
1475
|
+
Node:
|
|
1476
|
+
type: object
|
|
1477
|
+
required: [type]
|
|
1478
|
+
description: |
|
|
1479
|
+
Discriminated by `type`. Fields used per type:
|
|
1480
|
+
empty | text{text} | number{value} | boolean{value} | date{value: YYYY-MM-DD} | datetime{value: ISO8601}
|
|
1481
|
+
| ref{label, ref?} | link{label, href, ref?, view?, external} | status{label, variant}
|
|
1482
|
+
| json{value} | code{text, language?}: preformatted text that is not JSON (a stack trace, an id, a snippet); render monospaced and never as html
|
|
1483
|
+
| html{html (sanitized; see `rake reactiveadmin:html_policy`)} | group{children}
|
|
1484
|
+
| box{tag, layout?, width?, span?, text_align?, spacing?, max_width?, grow?, marks?, tone?, nowrap?, children} | panel{title, header_actions?, children}: `header_actions` (action|link nodes) belong in the title bar, beside the title
|
|
1485
|
+
| attributes_table{title?, rows[{label, value: Node[]}]} | table{headers[], rows: Node[][]}
|
|
1486
|
+
| action{action: Action with placement inline}: a button or link inside content that performs a non-GET request
|
|
1487
|
+
(rails-ujs data-method/data-confirm links, button_to forms); never render these as plain links
|
|
1488
|
+
| tabs{children: tab[]} | tab{title, children} | columns{children: column[]} | column{children}
|
|
1489
|
+
| toolbar{align, spacing?, children: (action|link)[]}: a row of actions and links with nothing else in it (button_to forms,
|
|
1490
|
+
rails-ujs links, plain links, however deeply wrapped in divs); inside a panel it is the panel's footer actions
|
|
1491
|
+
| list{ordered, children: list_item[]} | list_item{children}: ul/ol/li
|
|
1492
|
+
| heading{level 1-6, children}: h1-h6; children are inline nodes (text, link, ...)
|
|
1493
|
+
| paragraph{children}: inline content (text with marks, link, break, ...) that flows on one line and wraps
|
|
1494
|
+
| break: a line break inside a paragraph or heading
|
|
1495
|
+
| divider: a horizontal rule
|
|
1496
|
+
| disclosure{summary_nodes: Node[], children, open}: details/summary; `open` is the initial state
|
|
1497
|
+
| definition_list{rows[{label, value: Node[]}]}: dl/dt/dd, one row per term
|
|
1498
|
+
| blockquote{children}
|
|
1499
|
+
| text may carry `marks` (strong, em, code, underline, strike, mark, small, sub, sup; render each) and `title`
|
|
1500
|
+
(an abbr's expansion; render as an abbr). Text inside a paragraph keeps its surrounding spaces.
|
|
1501
|
+
| masked: a secret attribute (token, password) whose value is withheld; render a placeholder, never the value
|
|
1502
|
+
| error{label}: the value could not be computed (the response's `degraded` names where); render `label` as a
|
|
1503
|
+
subtle error marker, never as an empty cell. `empty` stays for genuinely empty data.
|
|
1504
|
+
| frame{html, src, title?}: sanitized-but-interactive HTML (forms allowed, scripts/on* stripped) rendered inline;
|
|
1505
|
+
intercept submits and data-method links and send them to `src`-relative URLs with X-Reactiveadmin-Frame: 1
|
|
1506
|
+
| image{src, alt, width_px?, height_px?}: an image on this site or a trusted media host (http(s) only, never data:);
|
|
1507
|
+
render lazily with referrerPolicy no-referrer and open it in a zoomable lightbox. width_px and height_px are the
|
|
1508
|
+
markup's declared size (1-10000), a layout hint only.
|
|
1509
|
+
| document{src, mime: "application/pdf", title?}: a PDF on this site or a trusted media host (http(s) only); render
|
|
1510
|
+
it inline with the browser's own PDF viewer, an open-in-new-tab and a download link, and a plain link if the
|
|
1511
|
+
browser won't embed it. Never proxied: the browser loads sensitive documents straight from `src`.
|
|
1512
|
+
| iframe{src, title?}: same-origin classic page with ?embed=1 (chrome-free layout + postMessage bridge
|
|
1513
|
+
emitting {type: "reactiveadmin:navigate"|"reactiveadmin:flash"|"reactiveadmin:resize", ...})
|
|
1514
|
+
| form{form: FormResponse}: a Formtastic form in the content of a page or show view, rendered inline with the
|
|
1515
|
+
same form renderer as `new`/`edit`. It submits to `form.action` through the API with the same param
|
|
1516
|
+
semantics as other native forms (blanks, checkboxes and radios as a browser would post them) and no lock.
|
|
1517
|
+
`form.submit_confirm`, when present, is asked about before posting. On success show the response's message
|
|
1518
|
+
and refetch the page, or follow its location; on 422 show `base` and the field errors in the form. Typeahead
|
|
1519
|
+
`options_path` points at the page (`?context=page_form&form=<n>&field=<name>&term=`) and answers with an
|
|
1520
|
+
OptionsResponse. A form the server can't describe faithfully (raw controls, an off-site or non-admin action,
|
|
1521
|
+
a GET form) stays a `frame` node. Inside a FormResponse `layout`, a `form` node without `form` stands for
|
|
1522
|
+
the response's own form.
|
|
1523
|
+
|
|
1524
|
+
Layout hints (box only). The server translates a safelisted subset of utility classes and never passes raw
|
|
1525
|
+
classes through; unknown classes and inline styles are ignored and reported by `doctor`.
|
|
1526
|
+
`layout` with display flex: `direction` row or column; `breakpoint` sm|md|lg|xl means a row from that width
|
|
1527
|
+
up and stacked below it (null means the same at every width, and `flex lg:flex-row` counts as lg);
|
|
1528
|
+
`gap` 0-8 in 0.25rem steps; `wrap`; optional `align` (items-*) and `justify` (justify-*).
|
|
1529
|
+
`layout` with display grid: `columns` is the count from `breakpoint` up (`base_columns`, default 1, below it) and
|
|
1530
|
+
`gap`. Children of a grid may carry `span` (col-span-N, 1-12).
|
|
1531
|
+
`width` (w-* or basis-*) is the share of the parent row; below the parent's breakpoint every child is full width.
|
|
1532
|
+
Vocabulary: flex, inline-flex, grid, flex-row, flex-col, flex-wrap, flex-nowrap, gap-N, items-start|center|end|
|
|
1533
|
+
stretch|baseline, justify-start|center|end|between, w-|basis- 1/4 1/3 1/2 2/3 3/4 full, text-left|center|right,
|
|
1534
|
+
grid-cols-N, col-span-N, each with an optional sm: md: lg: xl: prefix where that means something.
|
|
1535
|
+
Also: m|mt|mr|mb|ml|mx|my-N (N 1-8) and `margin` in whole 4px steps become `spacing`; max-w-sm|md|lg|xl|2xl becomes
|
|
1536
|
+
`max_width`; grow, flex-grow and flex-1 become `grow`; font-bold|font-semibold and italic become `marks`
|
|
1537
|
+
(strong, em); text-muted|success|danger|warning, text-gray|red|green|yellow|orange|amber-N become `tone`.
|
|
1538
|
+
Inline styles are read as the same classes, one declaration at a time, and only when the value lands exactly
|
|
1539
|
+
on the vocabulary (8px, 1rem and 0.5rem are steps; 10px, 1em, auto and negatives are not). What does not translate
|
|
1540
|
+
is reported by `doctor` with the exact class or style and its source line (`rake reactiveadmin:styles`).
|
|
1541
|
+
`spacing` is margin: `{top?, right?, bottom?, left?}`, each 1-8 in 0.25rem steps; zero margins are omitted.
|
|
1542
|
+
`grow` (true) means the box takes the free space of the row it sits in. `marks` and `tone` on a box apply to
|
|
1543
|
+
its content; on a text node they apply to the text. `tone` is meaning, not color: render the design system's
|
|
1544
|
+
muted, success, danger or warning text color. `nowrap` (white-space: nowrap or whitespace-nowrap) means the text
|
|
1545
|
+
stays on one line, on a text node or for a box's content.
|
|
1546
|
+
properties:
|
|
1547
|
+
type:
|
|
1548
|
+
type: string
|
|
1549
|
+
enum: [empty, text, number, boolean, date, datetime, ref, link, status, json, code, html, group, box, panel, attributes_table, table, action, tabs, tab, columns, column, frame, iframe, image, document, toolbar, list, list_item, masked, error, heading, paragraph, break, divider, disclosure, definition_list, blockquote, form]
|
|
1550
|
+
form: { $ref: "#/components/schemas/FormResponse" }
|
|
1551
|
+
src: { type: string, description: "frame/iframe source URL (classic, same-origin); image/document URL (this site or a trusted media host)" }
|
|
1552
|
+
alt: { type: string, description: "image nodes: alternative text, empty when the markup gave none" }
|
|
1553
|
+
mime: { type: string, enum: [application/pdf], description: "document nodes: the media type; only PDF is embedded" }
|
|
1554
|
+
width_px: { type: integer, minimum: 1, maximum: 10000, description: "image nodes: declared width in pixels" }
|
|
1555
|
+
height_px: { type: integer, minimum: 1, maximum: 10000, description: "image nodes: declared height in pixels" }
|
|
1556
|
+
action: { $ref: "#/components/schemas/Action" }
|
|
1557
|
+
header_actions: { type: array, items: { $ref: "#/components/schemas/Node" }, description: "panel nodes: actions and links shown in the title bar (`header_action:`); absent when there are none" }
|
|
1558
|
+
summary:
|
|
1559
|
+
type: object
|
|
1560
|
+
nullable: true
|
|
1561
|
+
description: "json nodes: present instead of `value` when the server summarizes (minimization or size); fetch the full value via expand_path"
|
|
1562
|
+
properties:
|
|
1563
|
+
kind: { type: string, enum: [object, array, scalar] }
|
|
1564
|
+
keys: { type: array, items: { type: string } }
|
|
1565
|
+
size: { type: integer }
|
|
1566
|
+
expand_path: { type: string, nullable: true, description: "json nodes, and text nodes with `truncated`: API path of getRecordValue for this field (for text, the response value is the full string)" }
|
|
1567
|
+
view: { $ref: "#/components/schemas/ActionView" }
|
|
1568
|
+
text: { type: string }
|
|
1569
|
+
truncated: { type: boolean, description: "text nodes: `text` is only the start of a longer value (a free-text column in a default view); render it with an ellipsis and offer expand_path to load the rest" }
|
|
1570
|
+
language: { type: string, description: "code nodes: language hint from the markup (e.g. ruby), when it names one" }
|
|
1571
|
+
label: { type: string }
|
|
1572
|
+
value: {}
|
|
1573
|
+
href: { type: string }
|
|
1574
|
+
external: { type: boolean, description: "link nodes: another site, or a path of this host outside the admin namespace (href is then absolute); open in a new tab" }
|
|
1575
|
+
ref: { $ref: "#/components/schemas/Ref" }
|
|
1576
|
+
variant: { type: string, enum: [neutral, success, warning, danger, info] }
|
|
1577
|
+
html: { type: string }
|
|
1578
|
+
tag: { type: string }
|
|
1579
|
+
class_name: { type: string, deprecated: true, description: "No longer emitted; layout hints replace raw classes" }
|
|
1580
|
+
layout: { $ref: "#/components/schemas/NodeLayout" }
|
|
1581
|
+
width: { type: string, enum: ["1/4", "1/3", "1/2", "2/3", "3/4", full] }
|
|
1582
|
+
span: { type: integer, minimum: 1, maximum: 12 }
|
|
1583
|
+
text_align: { type: string, enum: [left, center, right] }
|
|
1584
|
+
spacing: { $ref: "#/components/schemas/NodeSpacing" }
|
|
1585
|
+
max_width: { type: string, enum: [sm, md, lg, xl, 2xl], description: "Box: the widest it grows (max-w-*)" }
|
|
1586
|
+
grow: { type: boolean, description: "Box: takes the free space of its row" }
|
|
1587
|
+
tone: { type: string, enum: [muted, success, danger, warning], description: "Text or box: what the color means" }
|
|
1588
|
+
nowrap: { type: boolean, description: "Text or box: keep the text on one line" }
|
|
1589
|
+
align: { type: string, enum: [start, center, end], description: "Toolbar alignment" }
|
|
1590
|
+
ordered: { type: boolean, description: "List: ol rather than ul" }
|
|
1591
|
+
level: { type: integer, minimum: 1, maximum: 6, description: "Heading level (h1-h6)" }
|
|
1592
|
+
marks:
|
|
1593
|
+
type: array
|
|
1594
|
+
description: "Text: inline formatting, in nesting order. Box: formatting that applies to its content (strong, em)"
|
|
1595
|
+
items: { type: string, enum: [strong, em, code, underline, strike, mark, small, sub, sup] }
|
|
1596
|
+
open: { type: boolean, description: "Disclosure: initially expanded" }
|
|
1597
|
+
summary_nodes:
|
|
1598
|
+
type: array
|
|
1599
|
+
description: "Disclosure: the always-visible summary line (inline nodes)"
|
|
1600
|
+
items: { $ref: "#/components/schemas/Node" }
|
|
1601
|
+
title: { type: string, nullable: true }
|
|
1602
|
+
children:
|
|
1603
|
+
type: array
|
|
1604
|
+
items: { $ref: "#/components/schemas/Node" }
|
|
1605
|
+
headers:
|
|
1606
|
+
type: array
|
|
1607
|
+
items: { type: string }
|
|
1608
|
+
rows:
|
|
1609
|
+
type: array
|
|
1610
|
+
items:
|
|
1611
|
+
oneOf:
|
|
1612
|
+
- $ref: "#/components/schemas/AttributeRow"
|
|
1613
|
+
- type: array
|
|
1614
|
+
items: { $ref: "#/components/schemas/Node" }
|
|
1615
|
+
NodeSpacing:
|
|
1616
|
+
type: object
|
|
1617
|
+
description: "Margin around a box or toolbar in 0.25rem steps; a side that is absent has none"
|
|
1618
|
+
properties:
|
|
1619
|
+
top: { type: integer, minimum: 1, maximum: 8 }
|
|
1620
|
+
right: { type: integer, minimum: 1, maximum: 8 }
|
|
1621
|
+
bottom: { type: integer, minimum: 1, maximum: 8 }
|
|
1622
|
+
left: { type: integer, minimum: 1, maximum: 8 }
|
|
1623
|
+
NodeLayout:
|
|
1624
|
+
type: object
|
|
1625
|
+
required: [display]
|
|
1626
|
+
properties:
|
|
1627
|
+
display: { type: string, enum: [flex, grid] }
|
|
1628
|
+
direction: { type: string, enum: [row, column] }
|
|
1629
|
+
breakpoint: { type: string, enum: [sm, md, lg, xl, null], nullable: true }
|
|
1630
|
+
gap: { type: integer, minimum: 0, maximum: 8 }
|
|
1631
|
+
wrap: { type: boolean }
|
|
1632
|
+
align: { type: string, enum: [start, center, end, stretch, baseline] }
|
|
1633
|
+
justify: { type: string, enum: [start, center, end, between] }
|
|
1634
|
+
columns: { type: integer, minimum: 1, maximum: 12 }
|
|
1635
|
+
base_columns: { type: integer, minimum: 1, maximum: 12 }
|
|
1636
|
+
AttributeRow:
|
|
1637
|
+
type: object
|
|
1638
|
+
required: [label, value]
|
|
1639
|
+
properties:
|
|
1640
|
+
label: { type: string }
|
|
1641
|
+
value:
|
|
1642
|
+
type: array
|
|
1643
|
+
items: { $ref: "#/components/schemas/Node" }
|