Skip to content

Comments

Make ui:order less strict#918

Closed
mfulton26 wants to merge 1 commit intorjsf-team:masterfrom
mfulton26:ordering-with-conditional-schemas
Closed

Make ui:order less strict#918
mfulton26 wants to merge 1 commit intorjsf-team:masterfrom
mfulton26:ordering-with-conditional-schemas

Conversation

@mfulton26
Copy link
Contributor

Throwing an error when an extraneous property name is included
or when a property name is missing is problematic when ordering
properties in a dynamic schema (e.g. via schema dependencies,
etc.).

This change ignores extraneous property names and places places
missing properties at the end if not specified.

Reasons for making this change

[Please describe them here]

If this is related to existing tickets, include links to them as well.

Checklist

  • I'm updating documentation
    • I've checked the rendering of the Markdown text I've added
    • If I'm adding a new section, I've updated the Table of Content
  • I'm adding or updating code
    • I've added and/or updated tests
    • I've updated docs if needed
    • I've run npm run cs-format on my branch to conform my code to prettier coding style
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature

Throwing an error when an extraneous property name is included
or when a property name is missing is problematic when ordering
properties in a dynamic schema (e.g. via schema dependencies,
etc.).

This change ignores extraneous property names and places places
missing properties at the end if not specified.
@glasserc
Copy link
Contributor

Refs #823, #814. Per the discussion in the other threads, I think doing this unconditionally is dangerous. I'd much rather be smart about it.

@mfulton26
Copy link
Contributor Author

I just got done looking at those refs. Thank you. If I understand correctly, you would like for an error to be shown for any extraneous property name that is not in the schema properties nor any conditional schema properties defined in dependencies. That seems doable.

@epicfaace
Copy link
Member

I just got done looking at those refs. Thank you. If I understand correctly, you would like for an error to be shown for any extraneous property name that is not in the schema properties nor any conditional schema properties defined in dependencies. That seems doable.

@mfulton26 I'm closing this for now, if you would like to implement the behavior mentioned above, please make another PR. Thanks

@epicfaace epicfaace closed this Jan 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants