-
-
Save mrenvoize/0c004f97e024f527a885 to your computer and use it in GitHub Desktop.
JSON Schema Failure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": null, | |
"text": "Whatever" | |
} | |
{ | |
"text": "Whatever" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Note the 'required' fields inthe schema are id + text.. however the latter json object is passing validation? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-04/schema#" | |
"title": "rebus:list - tag", | |
"description": "The tag schema for rebus:list; used for creation and update of tag objects.", | |
"name": "tag", | |
"type": "object", | |
"properties": { | |
"id": { | |
"oneOf": [{ | |
"type": "integer", | |
"multipleOf": 1 | |
}, { | |
"type": "null" | |
}], | |
"title": "Id schema.", | |
"description": "A system generated read-only field for identifying the resource", | |
"name": "id" | |
}, | |
"text": { | |
"type": "string", | |
"title": "Tag text", | |
"description": "Enter tag content here", | |
"name": "text", | |
"minLength": 1, | |
"pattern": "^\\S.*\\S$" | |
}, | |
"list": { | |
"type": "integer" | |
} | |
}, | |
"additionalProperties": false, | |
"required": [ | |
"id", | |
"text" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment