Skip to content

docs(builder-agent): document REST-bound and cascading JSON Form dropdowns#36

Closed
ZackStr wants to merge 1 commit into
itential:mainfrom
ZackStr:docs/json-form-rest-bound-helper
Closed

docs(builder-agent): document REST-bound and cascading JSON Form dropdowns#36
ZackStr wants to merge 1 commit into
itential:mainfrom
ZackStr:docs/json-form-rest-bound-helper

Conversation

@ZackStr
Copy link
Copy Markdown
Member

@ZackStr ZackStr commented May 6, 2026

Replaces #35 — same commit content; only the branch name changed (claude/...docs/...) to satisfy the branch-naming CI check.

Summary

  • Adds a new helper template helpers/create-json-form-rest-bound.json for JSON Forms whose dropdowns are populated live from IAP endpoints, including the cascading pattern (one dropdown's URL path parameter fed by another field).
  • Documents three previously-undocumented details in builder-agent/SKILL.md: bulk DELETE /json-forms/forms, the structbindingSchema mirroring requirement, and the variables[] + DependencyWidget mechanism that wires cascading dropdowns.

Background

While building a Site/Device cascade against Inventory Manager I produced a form whose dropdowns rendered but never fetched. Working from the existing create-json-form.json helper, I had assumed bindingSchema: {} was always correct and used {customKey} curly-brace interpolation in href. Both wrong. The user hand-built a working form to demonstrate the actual pattern; this PR captures what was learned so the next agent doesn't repeat the mistakes.

Changes

New file: helpers/create-json-form-rest-bound.json

  • Annotated scaffold in the same _comment_* style as the other helpers
  • Worked example: Site (inventory list) → Device (nodes from selected inventory) cascade against Inventory Manager
  • Inline gotchas list at the bottom

Edits: .claude/skills/builder-agent/SKILL.md

  • Endpoint table: add GET /json-forms/forms/{id} and DELETE /json-forms/forms (bulk; body {"ids":[...]} — there is no per-id DELETE; per-id 404s)
  • New "REST-bound dropdowns" subsection: covers struct.type: "array" requirement, the structbindingSchema mirroring requirement, :name colon syntax for path params (not {name}), the variables[] cascade mechanism with reference JSON pointers into form data, the DependencyWidget ui:widget requirement on both source and dependent fields, and GET /automation-studio/json-forms/method-options for bindable-endpoint discovery
  • Templates table at the bottom: split the JSON Form row into static and REST-bound entries

Edit: helpers/create-json-form.json

  • One-line _comment_bindingSchema redirecting readers to the new helper when bindingSchema must not be empty

Test plan

  • jq type passes on both helpers (verified locally)
  • POST the new helper's body to /json-forms/forms against a live platform → form appears in Studio with two dropdowns
  • Selecting a site repopulates the device dropdown via the cascade (:inventoryIdentifier filled from /site reference)
  • Bulk DELETE removes both forms
  • Reviewer reads the new SKILL.md subsection and verifies the gotchas match observed Studio behavior

🤖 Generated with Claude Code

…downs

Adds a new helper template (create-json-form-rest-bound.json) for forms
whose dropdowns are populated from live IAP endpoints, including the
cascading pattern where one dropdown's URL path parameter is fed by
another field's selection.

Builder-agent SKILL.md updates:
- Endpoint table gains GET /forms/{id} and bulk DELETE /json-forms/forms
  (body {"ids":[...]} — there is no per-id DELETE)
- New "REST-bound dropdowns" subsection covering struct/bindingSchema
  mirroring, the :name path-param syntax (not {name}), the variables[]
  cascade mechanism with reference JSON pointers, the DependencyWidget
  ui:widget requirement on both source and dependent fields, and
  /automation-studio/json-forms/method-options for endpoint discovery
- Templates table now lists both create-json-form.json (static) and
  create-json-form-rest-bound.json (REST-bound/cascading)
- One-line comment in the static helper redirecting readers to the new
  helper when bindingSchema must not be empty

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@keepithuman
Copy link
Copy Markdown
Contributor

Closing in favor of creating an independent skills for JSON Forms.
Please create a new PR focusing on a skill totally focused on app-json_forms

ZackStr added a commit to ZackStr/builder-skills that referenced this pull request May 11, 2026
Re-opens itential#36 per @keepithuman's review: instead of expanding
builder-agent with REST-bound and cascading dropdown details, the
JSON Forms application gets its own skill.

The new skill (.claude/skills/app-json_forms/SKILL.md) covers the
full form structure (struct / schema / uiSchema / bindingSchema),
the three dropdown patterns (static-enum, REST-bound, cascading),
the API reference (including the bulk-only DELETE that returns 404
on per-id calls), update semantics (`{"options": ...}` wrapper with
full-replacement requirement), and the wiring to Operations Manager
manual triggers (`legacyWrapper: false`).

Companion changes:
- helpers/create-json-form-rest-bound.json: new annotated scaffold
  with a worked Inventory Manager Site/Device cascade example, in
  the same `_comment_*` style as the existing helpers.
- helpers/create-json-form.json: one-line `_comment_bindingSchema`
  redirecting readers to the new helper when bindingSchema must
  not be empty.
- builder-agent/SKILL.md: the JSON Forms subsection shrinks to a
  pointer at the new skill so there's no duplicated source of
  truth; the helpers table at the bottom splits the JSON Form row
  into static and REST-bound entries and points both at the new
  skill for full details.

Closes itential#36 (was rejected because builder-agent was the wrong home
for this content).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants