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

type is undefined but have allOf #1237

Closed
joneldiablo opened this issue Mar 26, 2019 · 6 comments · Fixed by #1380
Closed

type is undefined but have allOf #1237

joneldiablo opened this issue Mar 26, 2019 · 6 comments · Fixed by #1380

Comments

@joneldiablo
Copy link

Hi, I have a very long jsonschema which I want see as form.
Using the live demo, have this error:

image

doing some test using the live demo, I found that if type is not declared, throw the error, its possible use allOf without type?

@epicfaace
Copy link
Member

@joneldiablo
Can you please send a playground link demonstrating this issue? https://mozilla-services.github.io/react-jsonschema-form/

@travisdahl
Copy link
Contributor

running into the same problem, it looks like allOf isnt supported yet...
#52

@epicfaace epicfaace added the bug label Mar 27, 2019
@travisdahl
Copy link
Contributor

travisdahl commented Mar 28, 2019

I was able to work around the current limitations with a couple extra libraries.First I resolve all the refs then I merge all the allOf...

import deref from 'json-schema-deref-sync';
import mergeAllOf from 'json-schema-merge-allof';
const schema = {...}
...
const resolvedSchema = deref(schema);
const mergedSchema = mergeAllOf(resolvedSchema);
export default mergedSchema;

not ideal, but could get you by in a pinch and easy enough to remove once these issues are resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants