Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mobileskyfi opened this issue Sep 20, 2024 · 2 comments

Comments

@mobileskyfi
Copy link

mobileskyfi commented Sep 20, 2024

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 curl and http codegen 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's null).
@mobileskyfi
Copy link
Author

  • 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 mobileskyfi changed the title Codegen push for Mikrotik RouterOS's /tool/fetch CLI command (routeros-fetch) Support for Mikrotik RouterOS's /tool/fetch CLI command (routeros-fetch) Sep 23, 2024
@mobileskyfi
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant