1
以下は、私のjsonスキーマの部分的なバージョンです。 strictモードで検証するとき、それは」プロパティを述べJSONスキーマの検証に失敗しました... "プロパティに必要なプロパティが含まれていませんでした"
{
"botSettings": {
"welcomeMessage": {
"title": "Welcome to the bot",
"body": "This is the body right here"
}
}
}
次の(部分)JSONに対して
{
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"botSettings": {
"type": "object",
"properties": {
"welcomeMessage": {
"type": "object",
"required": ["body"],
"properties": {
"title": { "type": "string" },
"body": { "type": "string" },
"image": { "#ref": "#/definitions/image" }
}
},
"invalidCommandMessage": { "type": "string" }
}
}
}
}
:私は現在、次の(部分)スキーマを検証するためにjson-schema
宝石を使用しています#/ botSettings/welcomeMessage 'には' image 'の必須プロパティは含まれていませんでしたが、 "body"に設定するだけで済みました。では、私はここで何が欠けていますか?