postmanlabs / postmanlabs/postman-code-generators
Add a Google App Script (UrlFetchApp) code generator
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 381
- PR merge metrics
- No merged PRs in 30d
Description
Is your feature request related to a problem? Please describe.
No code generator is compatible with Google Apps Script and GAS doesn't support regular JS libraries regarding API requests
Describe the solution you'd like
Implement postman code generation for UrlFetchApp
Additional context
An issue on the postman-app-support:
https://github.com/postmanlabs/postman-app-support/issues/3298
My implementation:
https://github.com/rayliuca/postman-code-generators/tree/develop/codegens/js-urlfetchapp
My implementation is based on the javascript-xhr code generator, but do note that the UrlFetchApp class is non-existent on node.js so it is impossible to run the newman tests. I adapted the unit tests from the xhr variant and manually tested the generated codes on GAS to make sure it has most of the common functionalities.
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 by comparing the javascript-xhr generator with the referenced js-urlfetchapp implementation and its unitTestSnippets. Check how the generator is registered and how the adapted tests cover common requests; done means the UrlFetchApp generator and its tests are integrated, with generated snippets manually verified in Google Apps Script because Newman cannot run them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100