Skip to content

Restore complete OSBAPI parameter-schema editing for service instances - #5495

Merged
norman-abramovitz merged 25 commits into
cloudfoundry:developfrom
nabramovitz:feat/5488-osbapi-schema-form
Jun 25, 2026
Merged

Restore complete OSBAPI parameter-schema editing for service instances#5495
norman-abramovitz merged 25 commits into
cloudfoundry:developfrom
nabramovitz:feat/5488-osbapi-schema-form

Conversation

@nabramovitz

Copy link
Copy Markdown
Contributor

Restores complete OSBAPI (JSON Schema) parameter editing on the service-instance create/update form. The Tailwind/ngrx migration had replaced the AJSF-based schema form with a flat stub that dropped nesting, arrays, and composition; this brings that capability back, signal-native, with Monaco for the raw-JSON view.

Closes #5488.

What's in it

  • A new recursive, signal-native SchemaWidgetRenderer (selector json-schema-form) covering the full JSON Schema Draft-4 vocabulary: object nesting, scalars (incl. format such as password), enum selects, arrays (add/remove/reorder), multi-select (uniqueItems enum arrays), oneOf/anyOf (including scalar branches), allOf, $ref/$defs, an additionalProperties map editor, tuples, and an unknown-node JSON fallback so nothing is unrenderable.
  • The two-view (Form / JSON) editor is kept; the JSON view now uses Monaco fed the plan schema.
  • Validation is advisory: only unparseable JSON blocks submission; schema mismatches (type, required, etc.) surface as inline warnings — the broker remains the final authority (e.g. integer 5 vs string "5" warns but does not block).
  • If a plan's schema is too malformed to render as a form, the editor falls back to the JSON view with the schema's title/description and a short guidance message, preserving any entered params.
  • Removes the flat stub (TailwindJsonSchemaForm*) and its dead service; the Kubernetes chart-values editor moves to the new renderer.
  • Theme-token normalization of the renderer so it follows light/dark.

Verification

  • Frontend unit suites green; production build clean.
  • Live-verified against a fixture OSB broker with a schema-bearing plan: nested object / enum / number / boolean widgets render; Form↔JSON round-trips both directions; numbers emit as numbers; a type mismatch warns without blocking; dark mode is correct.

Follow-ups (separate)

The onRenderError handler defers its state changes via queueMicrotask. If
the component is torn down between the emit and the microtask firing, the
callback would set signals and open a snackbar on a destroyed view. Inject
DestroyRef, flag destruction, and bail at the top of the deferred callback.

The renderer's renderError emit is synchronous (fires from _seedAndBuild on
a live component mid-CD), so it needs no such guard.

@norman-abramovitz norman-abramovitz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM maybe some cleanup on text styling but does not hold up getting the functionality back.

@norman-abramovitz
norman-abramovitz merged commit ff582d4 into cloudfoundry:develop Jun 25, 2026
12 checks passed
@nabramovitz
nabramovitz deleted the feat/5488-osbapi-schema-form branch June 25, 2026 10:55
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.

Use the Monaco editor for raw-JSON service parameters

2 participants