I'm trying to use a swagger document to validate requests on my services but I can't validate path of my requests. I have the 11401 error that mean path validation fails according to : Validate Against Swagger Document Assertion - CA API Gateway - 9.0 - CA Technologies Documentation
I tried using the example of the CA API Gateway documentation and it didn't work.
I've made a simple swagger document :
"title": "Simple API"
and a simple policy to test path of my request:
It still didn't work.
If someone have tried this assertion and made it worked, i'd like some help on it.
Indeed you have a path validation error.
I'm not familiar with Swagger but I think you are mingling here service uri and request path.
In your example, "testSwaggger" service uri is "/test". If you are sending an http get request to "http(s)://<pathToYourgateway>/test", the request path is empty, throwing an error with your swagger validation assertion.
Try to add a ressource to your service, let's say "movies". Now add this request path to your swagger description (just replace /test with /movies).
Change the service resolution path resolution logic from your service in order to accept this pattern (in service properties).
Request to http(s)://<pathToYourgateway>/test/movies must now match your new swagger description
Hope this helps !