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

Support nested anyOf/oneOf schemas #948

Closed
lordrip opened this issue Mar 15, 2024 · 0 comments · Fixed by #1551
Closed

Support nested anyOf/oneOf schemas #948

lordrip opened this issue Mar 15, 2024 · 0 comments · Fixed by #1551
Assignees
Labels
canvas/config-form Configuration form related issues
Milestone

Comments

@lordrip
Copy link
Member

lordrip commented Mar 15, 2024

Please describe the feature that you want to propose

Currently, there's partial support for anyOf/oneOf definitions. It's necessary to support multiple levels of nesting of those definitions, for instance, the errorHandler definition contains one anyOf with subsequent nested oneOf

@lordrip lordrip added the canvas/config-form Configuration form related issues label Mar 15, 2024
lordrip added a commit to lordrip/kaoto that referenced this issue Mar 15, 2024
Extract single OneOf definition from AnyOf definition and put it into the root definitions.

relates: KaotoIO#948
relates: KaotoIO#560
lordrip added a commit that referenced this issue Mar 18, 2024
Extract single OneOf definition from AnyOf definition and put it into the root definitions.

relates: #948
relates: #560
lordrip added a commit to lordrip/kaoto that referenced this issue Mar 18, 2024
Currently, in case a schema contains a `oneOf` array, `uniforms`
combines all `oneOf` definitions in a single schema definition.

The issue with this approach is that combine potentially non-compatible
schemas, like the `errorHandler` one, since we need to specify a single
property.

This commit extends the `getField` method from the uniforms `JSONSchemaBridge`
to add the `oneOf` definitions into the field, this way, we could use
this information in the form to render an UI control to select a given
schema

relates: KaotoIO#948
relates: KaotoIO#560
lordrip added a commit to lordrip/kaoto that referenced this issue Mar 18, 2024
Currently, in case a schema contains a `oneOf` array, `uniforms`
combines all `oneOf` definitions in a single schema definition.

The issue with this approach is that combine potentially non-compatible
schemas, like the `errorHandler` one, since we need to specify a single
property.

This commit extends the `getField` method from the uniforms `JSONSchemaBridge`
to add the `oneOf` definitions into the field, this way, we could use
this information in the form to render an UI control to select a given
schema

relates: KaotoIO#948
relates: KaotoIO#560
lordrip added a commit to lordrip/kaoto that referenced this issue Mar 18, 2024
Currently, in case a schema contains a `oneOf` array, `uniforms`
combines all `oneOf` definitions in a single schema definition.

The issue with this approach is that combine potentially non-compatible
schemas, like the `errorHandler` one, since we need to specify a single
property.

This commit extends the `getField` method from the uniforms `JSONSchemaBridge`
to add the `oneOf` definitions into the field, this way, we could use
this information in the form to render an UI control to select a given
schema

relates: KaotoIO#948
relates: KaotoIO#560
lordrip added a commit that referenced this issue Mar 18, 2024
Currently, in case a schema contains a `oneOf` array, `uniforms`
combines all `oneOf` definitions in a single schema definition.

The issue with this approach is that combine potentially non-compatible
schemas, like the `errorHandler` one, since we need to specify a single
property.

This commit extends the `getField` method from the uniforms `JSONSchemaBridge`
to add the `oneOf` definitions into the field, this way, we could use
this information in the form to render an UI control to select a given
schema

relates: #948
relates: #560
lordrip added a commit to lordrip/kaoto that referenced this issue Mar 19, 2024
Currently, there's partial support for `oneOf` in the `uniforms` library.

This commit adds a new `OneOfField` component that shows a selector to
pick which schema should the form generate.

Also, if a model is already defined, the closest schema is selected
automatically.

fix: KaotoIO#560
relates: KaotoIO#948
lordrip added a commit to lordrip/kaoto that referenced this issue Mar 19, 2024
Currently, there's partial support for `oneOf` in the `uniforms` library.

This commit adds a new `OneOfField` component that shows a selector to
pick which schema should the form generate.

Also, if a model is already defined, the closest schema is selected
automatically.

fix: KaotoIO#560
relates: KaotoIO#948
lordrip added a commit to lordrip/kaoto that referenced this issue Mar 19, 2024
Currently, there's partial support for `oneOf` in the `uniforms` library.

This commit adds a new `OneOfField` component that shows a selector to
pick which schema should the form generate.

Also, if a model is already defined, the closest schema is selected
automatically.

fix: KaotoIO#560
relates: KaotoIO#948
@lordrip lordrip moved this from New to Backlog in Kanban Board Mar 19, 2024
lordrip added a commit to lordrip/kaoto that referenced this issue Mar 20, 2024
Currently, there's partial support for `oneOf` in the `uniforms` library.

This commit adds a new `OneOfField` component that shows a selector to
pick which schema should the form generate.

Also, if a model is already defined, the closest schema is selected
automatically.

fix: KaotoIO#560
relates: KaotoIO#948
lordrip added a commit to lordrip/kaoto that referenced this issue Mar 20, 2024
Currently, there's partial support for `oneOf` in the `uniforms` library.

This commit adds a new `OneOfField` component that shows a selector to
pick which schema should the form generate.

Also, if a model is already defined, the closest schema is selected
automatically.

fix: KaotoIO#560
relates: KaotoIO#948
lordrip added a commit that referenced this issue Mar 21, 2024
Currently, there's partial support for `oneOf` in the `uniforms` library.

This commit adds a new `OneOfField` component that shows a selector to
pick which schema should the form generate.

Also, if a model is already defined, the closest schema is selected
automatically.

fix: #560
relates: #948
@lordrip lordrip self-assigned this Oct 9, 2024
@lordrip lordrip moved this from Backlog to In Progress in Kanban Board Oct 9, 2024
@lordrip lordrip added this to the 2.3.0 milestone Oct 9, 2024
lordrip added a commit to lordrip/kaoto that referenced this issue Oct 9, 2024
Currently, we have partial support for the `oneOf` schemas.

This commit cleans up the generated schemas, by removing the `not`
definition from `oneOf` and also removing the empty properties like:

'''
{
  property: { }
}
'''

fix: KaotoIO#1550
fix: KaotoIO#948
@lordrip lordrip moved this from In Progress to In Review in Kanban Board Oct 9, 2024
lordrip added a commit to lordrip/kaoto that referenced this issue Oct 9, 2024
Currently, we have partial support for the `oneOf` schemas.

This commit cleans up the generated schemas, by removing the `not`
definition from `oneOf` and also removing the empty properties like:

'''
{
  property: { }
}
'''

fix: KaotoIO#1550
fix: KaotoIO#948
lordrip added a commit to lordrip/kaoto that referenced this issue Oct 10, 2024
Currently, we have partial support for the `oneOf` schemas.

This commit cleans up the generated schemas, by removing the `not`
definition from `oneOf` and also removing the empty properties like:

'''
{
  property: { }
}
'''

fix: KaotoIO#1550
fix: KaotoIO#948
@github-project-automation github-project-automation bot moved this from In Review to Done in Kanban Board Oct 10, 2024
@github-project-automation github-project-automation bot moved this from In Review to Done in Kanban Board Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
canvas/config-form Configuration form related issues
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant