我怎样才能在现有的邮递员收藏的基础上产生自信呢?

我正在开发一个 REST API。在开发过程中,我使用邮递员(chrome 扩展)来使用和记录我的 API。这是一个很棒的工具,我的大部分 API 端点都在里面。 然而,当我们即将发布的时候,我想大张旗鼓地记录这个 API,我该怎么做呢?有没有什么方法可以让我靠邮递员的出口产生自信?

109096 次浏览

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.

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);
});
});