question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Supporting postman collections

See original GitHub issue

What do you guys think about supporting postman collections? It should be possible to integrate them in a similar manner as the curl documentation, although it could be tricky because a postman collection is described in one file. As all the classes are re-instantiated on every call, one way of doing things would be trying to deserialize the given file into a list of postman-collection-models, append current request and overwrite the given file with the updated list. A few changes would be needed in order to properly generify classes like SnippetWritingResultHandler for them to support different output writers. The mentioned ResultHandler is currently hardcoded to use the AsciiDoctorWriter. I am not quite sure on what is the best way to do this, since I cannot really figure out, which class should be responsible for determining in which format the request/response is going to be documented. Although writing out postman collections is just a matter of implementing a DocumentationWriter and DocumentationActions, it does not make much sense to use them in combination with the cURL stuff. So maybe classes like CurlDocumentation should decide which DocumentationWriter should be used to write the DocumentationAction. I would happily support the implementation of this feature request.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:3
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

6reactions
fbenzcommented, Dec 31, 2017

I solved it for myself by creating a small npm package that does the job: https://www.npmjs.com/package/restdocs-to-postman

It can be used as a CLI tool:

restdocs-to-postman --folder generated-snipptes --export-format postman --output postman-collection.json

The following article explains the tool a bit: https://medium.com/@flbenz/create-postman-collections-out-of-tests-7ee05c8c1883

1reaction
wilkinsonacommented, Mar 28, 2018

With thanks to @fbenz’s blog post, I have an answer to my question above and now know that the Postman schema is documented here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Postman Collections: Organize API Development and Testing
Use Postman Collections to organize your API development and testing efforts—generate collections from API schemas, share with others, and more.
Read more >
Postman Collections - SoapUI
In the Postman application in Chrome, select your collection and click Download. Select Collection v1 export option. SoapUI does not support v2 collections....
Read more >
Launched: Support for Postman Collections - Stoplight Platform
Import for postman collections is available. What else would you like? How important is this to you?
Read more >
Working With Postman - ReadyAPI - SmartBear Support
Import a Postman collection · Select File > Create Project via Integration . · In the dialog that appears, switch to the Integration...
Read more >
Does WunderGraph support Postman collections?
Frequently Asked Questions. Does WunderGraph support Postman collections? An error occurred: Unexpected end of JSON input. Previous: ← Next.js.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found