Skip to content

[Feature] Auto-generate fields and types in InputValues & JsonSchemaEditor from JSON string. #943

@lq9958

Description

@lq9958

Currently, both InputValues and JsonSchemaEditor require users to manually add fields one by one and then choose each field’s data type.
When users already have a JSON string (for example, copied from an API response or mock data), this manual process becomes repetitive and time-consuming⏳.

It would be much more efficient if these components could automatically generate field definitions (with type inference) based on the provided JSON string.

Proposed behavior:

When the user provides a JSON string, the component:

  1. Parses the JSON.
  2. Creates fields automatically.
  3. Infers each field’s data type (string, number, boolean, object, array, etc.).

Benefits:

  1. Saves time for users handling large JSON payloads.
  2. Reduces human error when manually creating schema fields.

Example

{
  "name": "Alice",
  "age": 25,
  "tags": ["developer", "openai"]
}

Result

Field Type
name string
age number
tags array

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions