Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable the visual form builder to recognize external refs #492

Open
jamieleecho opened this issue Sep 7, 2023 · 1 comment
Open

Enable the visual form builder to recognize external refs #492

jamieleecho opened this issue Sep 7, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@jamieleecho
Copy link

The visual form builder currently is able to interpret internal refs, but not external refs. Adding external refs would allow developers to create libraries of reusable components corresponding to standardized data structures. This could be a boon for biological contexts because common biological components (NCBI organisms or something) can be defined in a common library and reused from form to form.

For Ginkgo, this would allow us to integrate the form builder to the Standardized Schema Library that we are building out for Servicely.

Here's what i mean:
Link to demo of form builder: https://ginkgobioworks.github.io/react-json-schema-form-builder/

The form builder supports building common components, but these get defined as part of the JSON schema itself:
image

The definition is put directly into the definitions section of the JSON Schema
image

Which can be referenced in the main form builder:
image

image

See:

    newInput1: {
      '$ref': '#/definitions/commonComponent1',
      title: 'New Input 1',
      description: ''
    }

But if i wanted to $ref an external schema:
image

See:

  properties: {
    newInput1: {
      '$ref': 'http://servicely/named/request/input/sample',
      title: 'New Input 1',
      description: ''
    }

JSON Schema Form doesn't know what to do:
image
image.png

What would be really useful is to be able to pass in a library of named schema fragments (so schema fragments that have an $id field) into the constructor of the component and then have the form builder be able to reference these schema fragments without the schema fragment actually needing to be in the schema's definition section

@raymond-lam raymond-lam added the enhancement New feature or request label Sep 10, 2023
@qw4n7y
Copy link

qw4n7y commented Dec 18, 2023

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants