-
Notifications
You must be signed in to change notification settings - Fork 367
[FEATURE] Codegen Dart Dio Support #710
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
Merged
aman-v-singh
merged 20 commits into
develop
from
IMPORT-815-github-postman-app-support-10521-postman-code-dart-dio-library
Jun 15, 2023
Merged
Changes from 12 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
11afab7
IMPORT-815 Dart Dio Codegen
aman-v-singh 03581ba
adding files to .gitignore
aman-v-singh 507c500
Update the dart version for dio library
aman-v-singh bd84b21
Adding environment to ci-requirements pubspec.yaml
aman-v-singh b250248
Adding environment to ci-requirements pubspec.yaml
aman-v-singh 457b60f
update config
aman-v-singh 5314217
use lodash npm module
aman-v-singh 8bd7b6e
update dart http package version
aman-v-singh cb27bba
Update ci-requirements package order and version
aman-v-singh a1fc8ea
Update ci-requirements
aman-v-singh b727444
Handled failing test- POST UrlEncoded body
aman-v-singh 734a513
Upgrading dart version for dart-http
aman-v-singh c6dcaaf
Updates
aman-v-singh 3389713
Install dart once
aman-v-singh 884b37b
reverting changes
aman-v-singh 630c123
Install dart once
aman-v-singh 26d6424
Update
aman-v-singh 688dc18
Update
aman-v-singh 7fca9d5
Updating dart version
aman-v-singh 076d007
Updating dart-dio dependency version
aman-v-singh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| .DS_Store | ||
|
|
||
| #Obj-c files | ||
| *.m | ||
| # Logs | ||
| logs | ||
| *.log | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
|
|
||
| # Coverage directory used by tools like istanbul | ||
| .coverage | ||
|
|
||
| # node-waf configuration | ||
| .lock-wscript | ||
|
|
||
|
|
||
| # Dependency directories | ||
| node_modules/ | ||
| jspm_packages/ | ||
|
|
||
| # Typescript v1 declaration files | ||
| typings/ | ||
|
|
||
| # Optional npm cache directory | ||
| .npm | ||
|
|
||
| # Optional eslint cache | ||
| .eslintcache | ||
|
|
||
| # Optional REPL history | ||
| .node_repl_history | ||
|
|
||
| # Output of 'npm pack' | ||
| *.tgz | ||
|
|
||
| # Yarn Integrity file | ||
| .yarn-integrity | ||
|
|
||
| # dotenv environment variables file | ||
| .env | ||
|
|
||
| out/ | ||
| /.idea/ | ||
| pubspec.lock | ||
| pubspec.yaml | ||
| .packages | ||
| snippet.dart | ||
| .dart_tool/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| ### NPM Specific: Disregard recursive project files | ||
| ### =============================================== | ||
| /.editorconfig | ||
| /.gitmodules | ||
| /test | ||
|
|
||
| ### Borrowed from .gitignore | ||
| ### ======================== | ||
|
|
||
| # Logs | ||
| logs | ||
| *.log | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
|
|
||
| # Runtime data | ||
| pids | ||
| *.pid | ||
| *.seed | ||
| *.pid.lock | ||
|
|
||
| # Prevent IDE stuff | ||
| .idea | ||
| .vscode | ||
| *.sublime-* | ||
|
|
||
| # Directory for instrumented libs generated by jscoverage/JSCover | ||
| lib-cov | ||
|
|
||
| # Coverage directory used by tools like istanbul | ||
| .coverage | ||
|
|
||
| # nyc test coverage | ||
| .nyc_output | ||
|
|
||
| # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
| .grunt | ||
|
|
||
| # Bower dependency directory (https://bower.io/) | ||
| bower_components | ||
|
|
||
| # node-waf configuration | ||
| .lock-wscript | ||
|
|
||
| # Compiled binary addons (http://nodejs.org/api/addons.html) | ||
| build/Release | ||
|
|
||
| # Dependency directories | ||
| node_modules/ | ||
| jspm_packages/ | ||
|
|
||
| # Typescript v1 declaration files | ||
| typings/ | ||
|
|
||
| # Optional npm cache directory | ||
| .npm | ||
|
|
||
| # Optional eslint cache | ||
| .eslintcache | ||
|
|
||
| # Optional REPL history | ||
| .node_repl_history | ||
|
|
||
| # Output of 'npm pack' | ||
| *.tgz | ||
|
|
||
| # Yarn Integrity file | ||
| .yarn-integrity | ||
|
|
||
| # dotenv environment variables file | ||
| .env | ||
|
|
||
| snippet.swift | ||
|
|
||
| out/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
|
|
||
| > Converts Postman-SDK Request into code snippet for Dart dio. | ||
|
|
||
| #### Prerequisites | ||
| To run Code-Gen, ensure that you have NodeJS >= v8. A copy of the NodeJS installable can be downloaded from https://nodejs.org/en/download/package-manager. | ||
|
|
||
| ## Using the Module | ||
| The module will expose an object which will have property `convert` which is the function for converting the Postman-SDK request to swift code snippet. | ||
|
|
||
| ### convert function | ||
| Convert function takes three parameters | ||
|
|
||
| * `request` - Postman-SDK Request Object | ||
|
|
||
| * `options` - options is an object which hsa following properties | ||
| * `indentType` - String denoting type of indentation for code snippet. eg: 'Space', 'Tab' | ||
| * `indentCount` - The number of indentation characters to add per code level | ||
| * `trimRequestBody` - Whether or not request body fields should be trimmed | ||
|
|
||
| * `callback` - callback function with first parameter as error and second parameter as string for code snippet | ||
|
|
||
| ##### Example: | ||
| ```js | ||
| var request = new sdk.Request('www.google.com'), //using postman sdk to create request | ||
| options = { | ||
| indentCount: 3, | ||
| indentType: 'Space', | ||
| requestTimeout: 200, | ||
| trimRequestBody: true | ||
| }; | ||
| convert(request, options, function(error, snippet) { | ||
| if (error) { | ||
| // handle error | ||
| } | ||
| // handle snippet | ||
| }); | ||
| ``` | ||
| ### Guidelines for using generated snippet | ||
|
|
||
| * Since Postman-SDK Request object doesn't provide complete path of the file, it needs to be manually inserted in case of uploading a file. | ||
|
|
||
| * This module doesn't support cookies. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| module.exports = require('./lib'); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.