Raja,
Good evening. I've setup a Swagger based service on the Gateway using the URL http://petstore.swagger.io/v2/swagger.json as a sample. During the creation of the service, the wizard will ask for several validation options as seen in the image below.
If Validate Path is selected - Validate the path portion of the request (excluding base path and service URI).
If Validate Method is selected - Check whether the method from the request is allowed by the API from the Swagger document.
If Validate Scheme is selected - Check whether the scheme from the request (http or https) is permitted by the API from the Swagger document.
If Require Security Credentials to be Present is selected - Check whether the security credentials required for the API from the Swagger document is present in the request.
*Note: For this sample the Require Security Credentials is not used.
From the wizard a service is created that can be consumed at http(s)://<gateway>:<port>/v2/ with the policy that is attached. The request that can be tested at /v2/pet using the headers "Content-Type: application/json" and "Accept: application/json" and the sample payload:
{ "id": 0, "category": { "id": 0, "name": "string" }, "name": "doggie", "photoUrls": [ "string" ], "tags": [ { "id": 0, "name": "string" } ], "status": "available"}
Issues that can occur with consuming the service is if the validation are in place and some component is in correct, URL is not valid, and back-end certificate is not trusted in the Gateway to name a few. The audit log should outline why the service failed or the service debugger on the service can be very beneficial.
Sincerely,
Stephen Hughes
Director, CA Support