-
-
Notifications
You must be signed in to change notification settings - Fork 245
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
Valid JSON Schema with Dot-Fieldnames breaks JSONSchemaBridge 3.5.1 #963
Comments
Hi @rk3rn3r! Let's make this one in bold: I really hoped that no one will ever ask. I have a long story to tell here and no time to do so... Let's make it quick then. Since the beginning, uniforms heavily depend on the fact that the By looking at the current architecture, the only place that actually cares about it is the I believe that a subset of JSON Path or JSON Pointer would be the best. The simplest extension that would be enough to cover your case is to accept paths with escapes, e.g., As for now, the only workaround is to translate the schema to replace these dots with another character. If you need help with that, do let us know here. If you have ideas or other comments - please do share them. |
Thx a lot for your reply @radekmie! Like I said in the initial description, I can understand, when thinking about this naming/hierarchies from HTML side, especially forms, the hierarchy actually makes sense. But if this is reflected in the internal structure of uniforms it is unfortunate, especially because the constraint that the dot is a hierarchy separator does not make sense for Javscript/JSON where a member/property name like I see that this might cause trouble and I am very glad that you still consider this for a milestone! 🙏 Thx a lot for the pointers and my colleagues & I will have a look if we can temporarily quick-fix this for us with the help of that guidance, and maybe contribute a better and complete fix later. But I can't promise! |
(We've had a team discussion about this issue, and here are the notes.)
Idea 2 (or 2.5) seems to be the best and the easiest to use. @kestarumper will continue his research of this topic. |
Hey!
We are using uniforms with uniforms-bridge-json-schema/JSONSchemaBridge.
We have a valid JSON Schema, but the schema is for a tool that has dots in the field/property names like
mystructure.value.enabled
.Unfortunately JSONSchemaBridge seems to expect that dots in names are addressing a hierarchy instead of just a plain name with dots. That expectation might be true from an HTML form view, but is not valid for JSON/JSON Schema. So we have a valid schema but can't convert it successfully with AutoForm.
We receive a
Field not found in schema: "mystructure.value.enabled"
error.I expect only when you traverse nested objects in the JSON Schema you should expect a nested structure, but not base this on property names.
Or is there anything I don't see? Help would be really appreciated.
The text was updated successfully, but these errors were encountered: