postmanlabs / postman-code-generators

Common repository for all code generators shipped with Postman
Apache License 2.0
994 stars 350 forks source link

Support for Mikrotik RouterOS's /tool/fetch CLI command (`routeros-fetch`) #769

Open mobileskyfi opened 1 month ago

mobileskyfi commented 1 month ago

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:

mobileskyfi commented 1 month ago
  • 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 ;).

Guess not? #620

mobileskyfi commented 1 month ago

Is there something else I need to do?

I'd like be able to actually use my codegen in Postman. And I cannot figure out to even load it locally in the Postman App.