i’ve recently tried upgrading to mui 5 and json forms 3 alpha and i’m having some troubles. I’m now getting ‘no applicable renderer found’ for the same renderer set, same schema, ui schema, data, ajv that I previously had.
I’ve tried to create a stackblitz project to demonstrate this issue, I tried to use the current seed project and then add my schema and UI schema but I wasn’t able to even get the seed project working, apologies if it’s just lack of experience using stackblitz. Here’s the link: Eclipsesource - Jsonforms React Seed - StackBlitz
I’ve added my own schema and ui schema which can be seen at /src/test.schema.json and /src/test.uischema.json
any help greatly appreciated.
I have no experience with StackBlitz, but it seems to modify the root package json and perform some magic compiling etc. So I don’t think it’s worth the time to getting
jsonforms-react-seed to work there. You can always just fork the seed, add your schemas there and then send a link to the fork.
Did you follow our migration guide? We removed the 3rd-party dependency we had integrated for JSON Schema resolving. I think this is most likely what’s going wrong in your case. The only remaining issue for JSON Forms for a stable 3.0 release is to improve the internal resolving we have in JSON Forms already to mostly cover all the use cases we had before.
You can restore the old behavior of JSON Forms by just resolving the JSON Schema yourself before handing it to JSON Forms. I’m pretty sure that this should solve your problems. This resolving step is what happened internally in JSON Forms before version 3.0. I can recommend
json-refs for that, you can find example code in the migration guide.
Hi @sdirix , i’ve not seen the migration guide, that’s really helpful, i’ll start looking at that. What version of node do you use to build your seed project. I’m using 17.4 locally and can’t get npm start to run.
Personally I use Node 14 on Linux. It also works with Node 12 and Node 16 on Linux. I can reproduce that it doesn’t work with Node 17.
awesome, i’ve just switched to 14 and confirm the seed now works. I’ll test out my schema and ui schema in the seed then continue with the migration of my larger project.
I hit that message at one point. The initial data did not match the schema.
The original schema had a oneOf (string, array(string))
Since we are using this to create, I made it just “array(string)”
The initial data had just a string. Fixed by making the initial data an array.
hi, i’ve forked the repo and added my schema, uischema and test data. All you need to do is start the application and you should see the error i’ve been hitting. It also errors if you don’t provide a uischema
I can reproduce the problem. As mentioned before, if you would resolve the schema with
json-ref before handing it over to JSON Forms everything should work as before.
However we’re also improving the resolving within JSON Forms with #1829. In it’s current state it already improves the rendering, once the PR is completed your schema should fully work. So depending on your requirements / deadlines you could also wait for this to be merged.
Thanks for this and apologies for missing your recommendation before. I’ve just tried this and it’s worked for me on the example I provided. I’ll use json-ref for for now and then switch back to handing it off to json forms once you’re done with your work.