Skip to content

Comments

✨ Support additionalProperties schema for structured map fields#886

Open
pierrecdn wants to merge 1 commit intocyclops-ui:mainfrom
criteo-forks:main
Open

✨ Support additionalProperties schema for structured map fields#886
pierrecdn wants to merge 1 commit intocyclops-ui:mainfrom
criteo-forks:main

Conversation

@pierrecdn
Copy link

📑 Description

Add support for JSON Schema additionalProperties on object types, enabling maps with structured values (in addition to lists) to render as proper forms instead of flat key/json-value text inputs.

Backend:

  • Parse additionalProperties in helm schema (using a custom RawJSON type to handle both boolean and object values from json-iterator)
  • Map it to a new AdditionalProperties field on the Field model
  • Propagate through the schema-to-field mapper

Frontend:

  • Split MapField into FlatMapField (existing behavior) and StructuredMapField
  • Update form value converters (mapsToArray / findMaps) to handle structured map entries

✅ Checks

  • I have tested my code (provide screenshots or screen recordings of a working solution)
  • I have performed a self-review of my code

ℹ Additional context

image

Correspond to the following schema:

"workers": {
      "type": "object",
      "description": "Map of worker pools, keyed by pool name.",
      "additionalProperties": {
        "type": "object",
        "required": [
          "replicaCount"
        ],
        "properties": {
          "replicaCount": {
            "type": "number",
            "description": "Number of workers to run"
          },
          "flavor": {
            "default": "u1.small",
            "enum": [
              "u1.small",
              "u1.large",
            ],
            "type": "string",
            "description": "Type of VM worker"
          },
          "os": {
            "default": "ubuntu",
            "type": "string",
            "enum": [
              "ubuntu",
              "centos",
              "windows"
            ],
            "description": "Base image of the VM"
          }
        }
      },
      "title": "workers"
    }

Add support for JSON Schema `additionalProperties` on object types,
enabling maps with structured values (in addition to lists) to render
as proper forms instead of flat key/json-value text inputs.

Backend:
- Parse `additionalProperties` in helm schema (using a custom RawJSON
type to handle both boolean and object values from json-iterator)
- Map it to a new AdditionalProperties field on the Field model
- Propagate through the schema-to-field mapper

Frontend:
- Split MapField into FlatMapField (existing behavior) and
StructuredMapField
- Update form value converters (mapsToArray / findMaps) to handle
structured map entries

Co-authored-by: Cursor <cursoragent@cursor.com>
@pierrecdn pierrecdn requested a review from a team as a code owner February 19, 2026 08:01
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.

1 participant