Closed tkohegyi closed 6 years ago
Example usage of the method implemented:
<dialog-descriptor comment="random comment" name="error-descriptor" usage="always">
<condition-descriptor>
<not>
<condition class="JsonSchemaChecker">
<param name="schema" value="jsonTestSchema.json"/>
<param name="isSchemaVolatile" value="false"/>
</condition>
</not>
</condition-descriptor>
<response-descriptor code="200" delay="0" mimetype="application/json" template="templateBadJson"/>
</dialog-descriptor>
This little config example cause stub response (templateBadJson) in case the incoming request does not fit to jsonTestSchema.json schema file.
This is a good step before #88 that is about to use json configuration in Wilma, instead of Xml. In addition, this has additional benefit - can be used to validate the messages between services - if there is no such validation in the service itself.