postmanlabs / postmanlabs/postman-code-generators
Support for Mikrotik RouterOS's /tool/fetch CLI command (`routeros-fetch`)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 381
- PR merge metrics
- No merged PRs in 30d
Description
I created a new code generator for Mikrotik RouterOS's CLI command /tool fetch url=.... The spec is here: https://help.mikrotik.com/docs/display/ROS/Fetch
Mikrotik makes routers with a powerful scripting langange (.rsc), and supports making web service calls via the /tool/fetch command. But the syntax requires some specific string escapes and OS has a primitive toolchain - so existing Postman code generators like curl or http are pretty far from a cut-and-paste job.
Following the CONTRIBUTING.md guide... I used npm run boilerplate routeros-fetch to create a new one, borrowing code from the http and curl codegens to deal with options/body/headers. I have not looked at the unit/etc tests much yet (and would be before doing pull request) – but the basic of my routers-fetch codegen seem to create working snippet for RouterOS /tool/fetch. At least form the CLI/test code - I'd really like to test my codegen code in the actual Postman GUI (see question below) before doing any pull request but don't know how to do that!
Also had a other questions:
- Is there a more specific process than what in the CONTRIBUTING guide to pull requests?
- Is there any way to load a "development" code generator into to the Postman GUI so it appear in the list? I kinda want to use the GUI to run some additional test and generate the test cases ;).
- What is the general scheme for "unconvertible" things in a Request? - as there are some things in a Postman Request that cannot be done using RouterOS /tool/fetch. Both
curlandhttpcodegen do not return any errors in the callback, so was not clear how to provide errors/issues in conversion. Right now, I just add code comment to the snippet generated with "potential problems" rather than figuring out how to provide a "hard" error in callback (so it'snull).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with CONTRIBUTING.md and the entry point created by npm run boilerplate routeros-fetch; compare its options, body, and header handling with the existing http and curl code generators. Run the available unit and CLI tests, then clarify the project’s expected behavior for unconvertible request parts and GUI loading before considering the generator complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100