Strict Validations in Mulesoft APIkit Router
This article will help you in your understanding of the functionality of Query Parameters and Headers Strict Validations in the MuleSoft APIkit Router.
Join the DZone community and get the full member experience.
Join For FreeThis article will help you in your understanding of the functionality of Query Parameters and Headers Strict Validations in the MuleSoft APIkit Router.
What Are Strict Validations?
Strict Validations is an APIkit router configuration that restricts or limits API calls with unwanted Headers and/or Query Parameters which are not defined in the API Specification (RAML).
RAML:
Here, I designed a simple RAML, having no Headers or Query Parameters defined.
Configuration:
Now, I generated the flow out of the RAML. Configure APIkit router for Query Parameters and Headers Strict Validations.
- Select APIKit router and edit the Router Configuration.
- Enable the validation by selecting the required option.
Disable the Validation by Selecting the Disable option or Uncheck one or Both options.
Disable all
Uncheck one or Both
Testing:
- No Strict Validations. The RAML does not contain Header or Query Parameters, even if both the attributes are passed during API call, it returns a successful response.
- Both Headers and Query Parameters Validations
- Only Headers Validation
- Only Query Parameters Validation
Note: Postman contains hidden headers, manage the headers before testing otherwise it may return an error.
Check out the Video Tutorial:
Published at DZone with permission of Abhishek Bathwal. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments