-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Closed
Copy link
Description
I marked properties of one of my schema objects as required.
"definitions": {
"Credentials": {
"title": "Credentials",
"properties": {
"client_id": {
"type": "string",
"required": true
},
"client_secret": {
"type": "string",
"required": true
},
"username": {
"type": "string",
"required": true
},
"password": {
"type": "string",
"required": true
}
}The validator says the value of required has to be a stringArray:
[ {
"level" : "error",
"schema" : {
"loadingURI" : "http://json-schema.org/draft-04/schema#",
"pointer" : "/definitions/stringArray"
},
"instance" : {
"pointer" : "/definitions/Credentials/properties/client_id/required"
},
"domain" : "validation",
"keyword" : "type",
"message" : "instance type (boolean) does not match any allowed primitive type (allowed: [\"array\"])",
"found" : "boolean",
"expected" : [ "array" ]
} ]So I'm wondering why the required attribute of properties is defined as stringArray?
"required": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray"
}Metadata
Metadata
Assignees
Labels
No labels