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

oneOf does not detect and select the proper choice based on data #1661

Closed
3 tasks done
heath-freenome opened this issue Mar 18, 2020 · 4 comments
Closed
3 tasks done
Labels
any-one-all-of Related to fixing anyOf, oneOf or allOf bug

Comments

@heath-freenome
Copy link
Member

heath-freenome commented Mar 18, 2020

Prerequisites

Description

Using this playground link, see that there are two choices. The oneOf renders a selector that is preselected with the first choice. The data uses a schema that matches the second choice.

[Description of the bug or feature]
I would have expected the rendered form to have detected the second schema in the oneOf matches the data and therefore selected the second choice rather than the first.

Steps to Reproduce

  1. Click the link above
  2. Simply look at the UI and see it didn't do the correct behavior
  3. Also, changing the selector to the correct schema does not actually make any of the validation errors around the oneOf go away.

Expected behavior

The choices selector will select the second choice since the data matches it

Actual behavior

The choices selector defaults to the first choice even though the data obviously contains the second choice

Version

whatever version is running on the playground

@heath-freenome
Copy link
Member Author

Make a few changes helped to alleviate the validation issues mentioned in step 3. But having the selector for choice not properly selecting the schema that matches the data provided is still an issue (the main issue for me).

@heath-freenome
Copy link
Member Author

heath-freenome commented Mar 24, 2020

@epicfaace Have you had the chance to look at this and decide what its status should be?

@stale
Copy link

stale bot commented Apr 15, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please leave a comment if this is still an issue for you. Thank you.

@stale stale bot added the wontfix label Apr 15, 2022
@heath-freenome
Copy link
Member Author

Yes, I have had to work around this issue, but would love to get it fixed for real

@stale stale bot removed the wontfix label Apr 15, 2022
@heath-freenome heath-freenome added bug any-one-all-of Related to fixing anyOf, oneOf or allOf labels Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
any-one-all-of Related to fixing anyOf, oneOf or allOf bug
Projects
None yet
Development

No branches or pull requests

1 participant