This is the relevant chunk of the library
get?:
description: Retrieve all <<resourceDescription | !pluralize>>
displayName: Get all <<resourceDescription | !pluralize>>
responses:
200:
body:
application/json:
type: <<typename-get>>[]
401:
body:
application/json:
type: errors.http-401
When looking at the example in the viewer is shows:
[{
"createdTimestamp": 1601323941346,
"enabled": true,
"totp": false,
"emailVerified": false,
"disableableCredentialTypes": [],
"requiredActions": [
"UPDATE PASSWORD"
],
"notBefore": 0,
"access": {
"impersonate": false,
"manage": true
}
}]
So an array as intended.
In anypoint 7.7.0 I see for the output payload:
Array<object>
createdTimestamp: number?
enabled: boolean
So the correct structure
The example payload shows:
%dw 2.0
output application/json
---
{
code: 401,
muleErrorType: "HTTP:CLIENT_SECURITY",
message: "HTTP Client Security Error",
errorMessage: "Unauthorized (401).",
datetime: "2020-11-03T13:40:39.775-04:00",
transactionId: "aff0c200-1dfb-11eb-b6b6-00155d199d11"
}
Which is the error message example and not the user example you see in the RAML
When it is not an array anypoint shows the user correctly.
Any thoughts on why the array example is not working in anypoint?
@Michael Fesser 😁 It just deleted the complete message chain.
No issues we already shared the information.
Will try more on the RAML.
Regards,
Abhishek Bathwal