I am defining a new API and in Design centre have defined RAML endpoint as :
/employees:
get:
type:{
ResourceTypes.getInstance: {
typeName: object,
exampleInstance: !include examples/get-employee-response.json
}
}
get-employee-response.json
is a simple json :
{
"empId" : 100,
"empName : "John",
...
...
}
Now what I am confused is that I know the input can get validated by API Kit router However to validate response - document here states that we will need to use JSON Schema
However I was unable to understand the last few sentences:
If your response schema is encapsulated in a DataType (as per RAML 1.0), unfortunately this cannot be utilised for validation purposes and you will need to maintain a separate JSON schema for that.
So really can someone explain how do we go about it ? If there is an example that would greatly help ! Thanks !