Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Apigee json schema validation

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 Solved
0 7 1,894
1 ACCEPTED 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.

View solution in original post

7 REPLIES 7