The reason is that the following request is accepted by the API, even though there are some properties in the request that were not specified in the above schema.
Solution is to use the above schema with 'additionalProperties: false' as follows, in order to prevent the acceptance of additional properties other than those specified in the schema.
Description: Response validation is not working correctly when using the following schema in the API definition.
The reason is that the following request is accepted by the API, even though there are some properties in the request that were not specified in the above schema.
Solution is to use the above schema with 'additionalProperties: false' as follows, in order to prevent the acceptance of additional properties other than those specified in the schema.
Add 'additionalProperties' configuration in the documentation[1] along with a yaml format example, as this is a common requirement.
[1] https://apim.docs.wso2.com/en/4.1.0/design/api-security/api-request-response-schema-validation/json-schema-validator/#enabling-the-json-schema-validator