在OData中为Mule处理ComplexType json
我正在尝试为复杂类型处理odata.raml。这是我的要求看起来像在OData中为Mule处理ComplexType json,mule,mulesoft,mule4,Mule,Mulesoft,Mule4,我正在尝试为复杂类型处理odata.raml。这是我的要求看起来像 { "studentNumber": "QA1V2US86940109", "admissionDate": "2021-04-02T15:44:04Z", "contactAddress": { "addressId": "28067277799447", "addres
{
"studentNumber": "QA1V2US86940109",
"admissionDate": "2021-04-02T15:44:04Z",
"contactAddress": {
"addressId": "28067277799447",
"address1": "123 Windmill Road"
}
}
这是我的奥达·拉姆
#%RAML 1.0 Library
uses:
odata: libraries/odataLibrary.raml
types:
students:
(odata.remote): Students
properties:
studentNumber:
type: string
(odata.key): true
(odata.nullable): true
admissionDate:
type: datetime-only
(odata.nullable): true
(odata.key): false
contactAddress:
type:object
(odata.nullable): true
(odata.key): false
properties:
addressId:
type: string
(odata.nullable): true
(odata.key): false
address1:
type: string
(odata.nullable): true
(odata.key): false
这是odata.raml,但Mules不接受对象类型。但是你知道怎么用骡子吃吗
提前感谢“Mules不接受对象类型”这是什么意思?在某一点上有错误吗。提供症状描述、错误消息。你在用APIKit吗?哪个版本?在给定的示例中,我们将
contactAddress
作为students
的嵌套对象,因此Mule OData Apikit解析器不理解这一点,并抛出“错误:属性contactAddress的类型不受支持”。我希望你能理解这一点