I want to read swagger-1.json which is there in resources/oas folder in Javascript policy. Is there any possibility to do that?
My Intention is to write OASValidation using javascript Policy. For that I saw an example which makes use of swagger-1.js (var oas = <Swagger Spec>) which contains actual oas spec. But now as per my requirement I wanted to change swagger-1.js to swagge-1.json
Solved! Go to Solution.
you can add the file in javascript <IncludeURL> tag inside a function.
You can call that function in the main javascript and validate it as required.
you can use java callout also.