Swagger validation using Swagger-tools

I'm trying to implement swagger validation using standalone version of swagger-tools that can work with the JavaScript policy.Please refer the below link.

https://raw.github.com/apigee-127/swagger-tools/master/browser/swagger-tools-standalone-min.js

But unable to find any sample example or detailed doc that how to use this. If someone has used this, please let me know.

0 5 2,221
5 REPLIES 5

Could you please elaborate a bit more on your use case?

It sounds as you are trying to validate the swagger from inside the API itself or maybe another API?

I've used something like this in the past as part of a CI/CD flow to validate the API specs prior to deploying code or updating documentation for example.

@Ricardo de Andrade , Yes I'm trying to validate against the swagger from inside the API but not willing to use node js library. Do you have any input on this?

There are API examples in the swagger-tools project. Here is a direct link to the API for validating an API specification document (or documents if using Swagger 1.2): https://github.com/apigee-127/swagger-tools/blob/master/docs/API.md#validaterlorso-apideclarations-c...

Below link contains the info for validating an API specification and API examples.

https://github.com/apigee-127/swagger-tools/tree/master/docs.

Is there any example of using swagger tools in apigee edge node.js proxy?