Hello
Currently, we are searching ways to refine and optimize our APIs. One of what we are looking for is to make json schema validation for queries, URIs for related APIs.
Is there any suggestions about how to implement this idea as l’m not able yet to find a good solution to go with it.
all answers are appreciated
thanks in advance,
Fasaiel
Solved! Go to Solution.
OpenAPI Spec often includes JSON Schema. IF you are using OpenAPI Spec (fka Swagger spec) , then you can use the OASValidation policy that is builtin to APigee to get the implicit JSON schema validation.
If you don't have an OpenAPI Spec and you just want to validate a JSON payload against a schema, you need to use a Java callout or JS callout to do so. Here's an example: https://github.com/DinoChiesa/ApigeeEdge-Java-Validate-JSON-Schema
I suggest you search the Apigee community archives for more info and context. I believe this question has been discussed before.