swagger-bank icon indicating copy to clipboard operation
swagger-bank copied to clipboard

Documentation and improvement suggestions

Open kristianmandrup opened this issue 7 years ago • 0 comments

I assume you need to pass the entire API as a single .yaml file. Would be nice to be able to pass it as an object as well (I did in my fork).

Also would be nice to be able to gradually build up the API per main domain or service. I guess the objects could just be merged into one final API object?

const SwaggerBank = require('swaggerbank');
const api = new SwaggerBank.API()

for (let service of services) {
  api.add(service.docs);
}

api.validateAPI()
.then( () => {
  api.setupMountebankImposter(3000);
})

What do you think?

kristianmandrup avatar Sep 12 '17 11:09 kristianmandrup