Mule EE 3.5.2 を使用しており、3.6.2 に移行しています。エラー ミュール無効な JSON スキーマ エラーをスローする json スキーマを持つ RAML プロジェクトがあります。さらに掘り下げると、https://github.com/mulesoft/raml-for-jax-rs/issues/81で説明されているように、必要な属性が問題のある属性であることがわかりました。しかし、必要な変更を行った後でも、同じエラーが発生します。ここでも Mule EE 3.6.2 を使用しています。以下はjsonスキーマです。どんな助けでも大歓迎です。
よろしく、 ハリ
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "http://example.com",
"type": "object",
"properties": {
"record": {
"id": "http://example.com/record",
"type": "array",
"items": {
"id": "http://example.com/record/0",
"type": "object",
"properties": {
"Account": {
"id": "http://example.com/record/0/Account",
"type": "string"
},
"DeptID": {
"id": "http://example.com/record/0/DeptID",
"type": "string"
},
"ProjectID": {
"id": "http://example.com/record/0/ProjectID",
"type": "string"
},
"ProjectDescription": {
"id": "http://example.com/record/0/ProjectDescription",
"type": "string"
},
"Amount": {
"id": "http://example.com/record/0/Amount",
"type": "number"
},
"CheckNo": {
"id": "http://example.com/record/0/CheckNo",
"type": "integer"
},
"Reference": {
"id": "http://example.com/record/0/Reference",
"type": "string"
},
"BudgetRef": {
"id": "http://example.com/record/0/BudgetRef",
"type": "string"
},
"Description": {
"id": "http://example.com/record/0/Description",
"type": "string"
},
"Oprid": {
"id": "http://example.com/record/0/Oprid",
"type": "string"
},
"Date": {
"id": "http://example.com/record/0/Date",
"type": "string"
}
},
"required": [
"Account",
"DeptID",
"ProjectID",
"ProjectDescription",
"Amount",
"CheckNo",
"Reference",
"BudgetRef",
"Description",
"Oprid",
"Date"
]
},
"required": [
"0"
]
}
},
"required": [
"record"
]
}
エラーログは以下の通り
ERROR 2015-09-23 14:04:57,797 [main] org.mule.module.launcher.application.DefaultMuleApplication: null
org.mule.module.apikit.exception.ApikitRuntimeException: Invalid API descriptor -- errors found: 1
invalid JSON schema (schemas/ip_revenue_management_input.json):
error: value has incorrect type (found boolean, expected one of [array])
level: "error"
domain: "syntax"
schema: {"loadingURI":"#","pointer":"/properties/record/items/properties/Account"}
keyword: "required"
found: "boolean"
expected: ["array"]
error: value has incorrect type (found boolean, expected one of [array])
level: "error"
domain: "syntax"
schema: {"loadingURI":"#","pointer":"/properties/record/items/properties/Amount"}
keyword: "required"
found: "boolean"
expected: ["array"]
error: value has incorrect type (found boolean, expected one of [array])
level: "error"
domain: "syntax"
schema: {"loadingURI":"#","pointer":"/properties/record/items/properties/BudgetRef"}
keyword: "required"
found: "boolean"
expected: ["array"]
error: value has incorrect type (found boolean, expected one of [array])
level: "error"
domain: "syntax"
schema: {"loadingURI":"#","pointer":"/properties/record/items/properties/CheckNo"}
keyword: "required"
found: "boolean"
expected: ["array"]
error: value has incorrect type (found boolean, expected one of [array])
level: "error"
domain: "syntax"
schema: {"loadingURI":"#","pointer":"/properties/record/items/properties/Date"}
keyword: "required"
found: "boolean"
expected: ["array"]
error: value has incorrect type (found boolean, expected one of [array])
level: "error"
domain: "syntax"
schema: {"loadingURI":"#","pointer":"/properties/record/items/properties/DeptID"}
keyword: "required"
found: "boolean"
expected: ["array"]
error: value has incorrect type (found boolean, expected one of [array])
level: "error"
domain: "syntax"
schema: {"loadingURI":"#","pointer":"/properties/record/items/properties/Description"}
keyword: "required"
found: "boolean"
expected: ["array"]
error: value has incorrect type (found boolean, expected one of [array])
level: "error"
domain: "syntax"
schema: {"loadingURI":"#","pointer":"/properties/record/items/properties/Oprid"}
keyword: "required"
found: "boolean"
expected: ["array"]
error: value has incorrect type (found boolean, expected one of [array])
level: "error"
domain: "syntax"
schema: {"loadingURI":"#","pointer":"/properties/record/items/properties/ProjectDescription"}
keyword: "required"
found: "boolean"
expected: ["array"]
error: value has incorrect type (found boolean, expected one of [array])
level: "error"
domain: "syntax"
schema: {"loadingURI":"#","pointer":"/properties/record/items/properties/ProjectID"}
keyword: "required"
found: "boolean"
expected: ["array"]
error: value has incorrect type (found boolean, expected one of [array])
level: "error"
domain: "syntax"
schema: {"loadingURI":"#","pointer":"/properties/record/items/properties/Reference"}
keyword: "required"
found: "boolean"
expected: ["array"]
-- file: schemas/ip_revenue_management_input.json
at org.mule.module.apikit.AbstractConfiguration.validateRaml(AbstractConfiguration.java:199) ~[?:?]
at org.mule.module.apikit.AbstractConfiguration.initialise(AbstractConfiguration.java:97) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_45]
at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_45]