Extract swagger/openapi spec with only required endpoint(s).
npm i @gloird/extract-swagger-for-endpoints-to-js
extract-swagger-for-endpoints-to-js --src sourcefile.yml --dest output.yml
extract-swagger-for-endpoints-to-js --srcUrl https://petstore.swagger.io/v2/swagger.json -d 'c:/test.js'