Skip to content

invalid use of oneOf #23

@epugh

Description

@epugh

From the JSONSchema community Slack -->

One thing I noticed is invalid use of oneOf on this line. https://github.com/o19s/ubi/blob/main/schema%2F1.0.0%2Fquery.response.schema.json#L11
JSON Schema validation does not evaluate the format keyword to distinguish strings. The format keyword is referred to as an annotation and is only informational.
You might try something like this.

{
  "query_id": { 
    "type": "string",
    "oneOf":[
      { "pattern": "pattern for <uuid>"},
      {"not":{ "pattern": "pattern for <uuid>", "maxLength": 100}}
    ]
  }
}

Metadata

Metadata

Assignees

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