Skip to content

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

@rongyj

Description

@rongyj

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions