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

Cannot distinguish the "TextNode" and the "ArrayNode" with single value for oneOf #425

Closed
rongyj opened this issue Jul 9, 2021 · 2 comments

Comments

@rongyj
Copy link
Contributor

rongyj commented Jul 9, 2021

When schema has "oneOf" as below:

  "values": {
            "oneOf": [
              {
                "type": "string",
                "nullable": true
              },
              {
                "type": "array",
                "nullable": true,
                "items": {
                  "type": "string"
                }
              }
            ]
          },

When input test data is :

values: "test"

It has a validation error:

should be valid to one and only one of the schemas but more than one schemas {{"type":"string","nullable":true}{"type":"array","nullable":true,"items":{"type":"string"}}} are valid

when input data is :

values : ["test"]

It is fine.

@rongyj
Copy link
Contributor Author

rongyj commented Aug 11, 2021

Create a PR #432 which include the fixes for issue428 too.

@stevehu stevehu mentioned this issue Aug 12, 2021
@stevehu
Copy link
Contributor

stevehu commented Oct 11, 2021

@rongyj I have rolled back your changes for issue428 and issue425 as it breaks the issue456. Once I rolled back and I can see both 425 and 428 test cases are passed. If you still have the issues, please review the updates and make sure that 456 is not broken. Thanks.

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

No branches or pull requests

2 participants