-
Notifications
You must be signed in to change notification settings - Fork 396
Mixed support #2409
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
base: master
Are you sure you want to change the base?
Mixed support #2409
Conversation
kchobantonov
commented
Dec 30, 2024
•
edited
Loading
edited
- provide support for mixed types
- fix clearing of inputs when not under an object - e.g. string once cleared will become empty string rather than to return undefined to remove the property from the parent object
- fix date controls, now the date can show year, year/month and etc. depending on the control option views
- improve the performance to convert dayjs format into maska format function
- fixing the :key to at least have the collection size into the key so when the size changes the vue will not reuse html elements leaving attributes like id unchanged
- add more examples to show how the mixed control can be used
- use arraySchema from the mapped values rather than using Resolve
- minor UI changes to use less space
- core changes : use the provided schema when the resolve failed, make sure that boolean is valid schema as well - e.g. items: true is valid schema (Note: the last change for the items to be boolean was reverted back since more code should be adjusted - maybe a future improvement)
- introduce a new config - allowAdditionalPropertiesIfMissing - this allows to show the additioanalProperties UI when the additionalProperties and patternProperties do not exist. The reason is that by default if the additionalProperties is missing from the schema the default should be considered as true but the UI component does not respect that default - e.g. it needs to be explicitly states as additionalProperties: true if the UI control is needed without the allowAdditionalPropertiesIfMissing config
…ot part of the object that has the property defined in properties then to not clear it - e.g. send undefined value
… based on index - e.g. prevent reusing elements when the array change size which will cause id properties for example to not have correct value
…tified for the new value
…n also allow such case to be handled by the object renderer
…s no need to resolve that schema just use it
…n the mixed renderer selected object type
@sdirix check my responses and also updated repo but it looks like the build failed perhaps because netlify is using greater than pnpm version 8 now ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have concerns about the proposed changes to the core functionality.
Please have a look at my new comments and the unresolved comments from my previous review.
…d renderer handle the true value directly
@sdirix please review again - here are the outstanding items that I need to check with you if you are ok with those as they are at the moment with the explanation that was provided.
|
… and we have patternProprties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works good for me!
I'm waiting on Lucas' (or your) input to this suggestion and the handling of the additionalErrors. When they are resolved I'm happy to merge.
Thanks for your great work and patience ;)
Nitpick: the "Mixed" and "Json Editor" examples in the Vue Vuetify app do not render as nicely as the other examples. Does not need to be resolved for the merge.
@kchobantonov Please adapt the resolver as suggested and the additionalErrors, then we can merge |
@sdirix both changes that were request are now done - please review again and let me know if anything else is needed. Thanks for your feedback. |
Co-authored-by: Stefan Dirix <sdirix@eclipsesource.com>
…ctly
@sdirix please review again - all concerns should be addresses and the last commit is fixing an issue where in the jsonschema example when you try to add new example field as an object and you do enable from the "Allow Additional Properties By Default" option then to correctly determine the type of the new properties that are going to be added to this new object example. |