Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert apiDoc to postman collection?

Tags:

I have a nodejs project with many requests implemented and well documented by apiDoc, and I want to create a Postman collection from it!

> example:

/**
     * @api {GET} config/updates Updates - Get the latest event updates
     * @apiGroup Config service
     * @apiDescription This api endpoint provides the latest updates that need to be fetched by the client. It provides
         * an array of events, based on either the latestupdate (timestamp) param, or a configured interval (currently default to 1 minute.
...
..
    */

It is possible to create from apiDoc a postman collection?

like image 607
Krausz Lóránt Szilveszter Avatar asked Oct 19 '17 08:10

Krausz Lóránt Szilveszter


1 Answers

You can export your apiDoc to Swagger and then import it to Postman.

1.Export to Swagger

  • Install this npm-package

  • npm install apidoc-swagger -g

  • apidoc-swagger -i example/ -o doc/ (example is the input and doc is the output)

2.Import in Postman

Postman supports swagger files so you can import it without issues you can read about it here read 'Importing swagger' section.

The npm package may not work because it seems outdated.

like image 125
Anouar Kacem Avatar answered Sep 30 '22 15:09

Anouar Kacem