Hi All, I have been working on JBallerina upgrade for the schema validator filter which validates the request/response payloads against the schema in the swagger file. Significant changes have been introduced with the b7 release and thus we need to revamp the feature accordingly. This is an arduous task provided that the validation logic has been implemented by ourselves and not using a third-party library. The validation logic in a sense, it includes a blend of tasks as below.
1. Primitive type validation 2. Custom type validation 3. Minimum, Maximum length of the integer and query parameters 4. Required field validation 5. Consider (allOf, anyOf ,oneOf) and use with a discriminator Besides the above, the feature should be compatible with both swagger versions 2 and 3. There are some drawbacks with the current implementation such as, 1. Complexity - We have to put unnecessary effort to do generic JSON schema validations on our side. 2. Maintainability - We can get future improvements from the library instead of writing ourselves. Hence, I would like to propose to use the third party library everit [1] which is similar to the synapse gateway and It provides the same capabilities extensively. If we go ahead with this approach, we just need to provide the payload and relevant schema model to the validate function of the library. WDYT? [1] https://github.com/everit-org/json-schema Regards, Hasunie -- *Hasunie Adikari* Associate Technical Lead WSO2 Inc.; http://wso2.com lean.enterprise.middleware blog http://hasuniea.blogspot.com | https://medium.com/@Hasunie/ Mobile:+94713095876
_______________________________________________ Architecture mailing list Architecture@wso2.org https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture