How can I generate swagger based off of existing postman collection?
APIMatic API Transformer can process a Postman collection (v1 or v2) as an input format and produce Swagger 1.2 or 2.0, and now OpenAPI 3.0.0 as output.
It has its own API and a Web front-end, and also a command-line version.
You can use https://github.com/stoplightio/api-spec-converter with code
var transformer = require('api-spec-transformer');
var postmanToSwagger = new transformer.Converter(transformer.Formats.POSTMAN, transformer.Formats.SWAGGER);
postmanToSwagger.loadFile('/path/to/your.json.postman_collection', function(err) {
if (err) {
console.log(err.stack);
return;
}
postmanToSwagger.convert('yaml')
.then(function(convertedData) {
// convertedData is swagger YAML string
console.log(convertedData);
})
.catch(function(err){
console.log(err);
});
});
Someone posted this link (and deleted it?): http://restunited.com/
It accepts postman JSON and converts it to swagger. This seems to be what I was looking for.