Skip to content

Commit 9fee7bb

Browse files
committed
Fixed example code and removed typos throughout the repo
1 parent 60f65c4 commit 9fee7bb

File tree

19 files changed

+27
-24
lines changed

19 files changed

+27
-24
lines changed

CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- [Pull request guidelines](#pull-request-guidelines)
1111
- [Tests](#tests)
1212
- [Build Failures](build-failures)
13-
- [Security guildelines](security-guidelines)
13+
- [Security guidelines](security-guidelines)
1414

1515
## Getting Started Quick
1616

@@ -33,7 +33,7 @@ Installs all `dependencies` of all the codegens. This runs the command `npm inst
3333
The script associated with `npm test` will run all tests that ensures that your commit does not break anything in the
3434
repository. Additional requirements to run these tests have been listed down in [ADDITIONAL_DEPENDENCIES](/ADDITIONAL_DEPENDENCIES.md)
3535

36-
* `npm test`: Runs strucutre, unit, newman and system tests for all codegens
36+
* `npm test`: Runs structure, unit, newman and system tests for all codegens
3737
* `npm run test <codegen-name>`: Runs tests for a particular codegen.
3838

3939

@@ -86,7 +86,7 @@ One of the following two contributions are possible for postman-code-generators:
8686
- All pull requests should be to the develop branch.
8787
- Every pull request should have associated issue(s) on our [issue tracker](https://github.com/postmanlabs/postman-code-generators/issues).
8888
- For any non-trivial fixes, regression tests should be added as well. For a bug, we also recommend adding a request to the `testCollection.json` found inside `test/codegen/newman/fixtures` to run the request using common newman tests.
89-
- For a new language to be added as a part of postman-code-generators, we will need some level of community support before we are able to accept the pull request. Feel free to add links to any sort of report/statistics from trusted sources that might help us understand the relavance and popularity of this language among users.
89+
- For a new language to be added as a part of postman-code-generators, we will need some level of community support before we are able to accept the pull request. Feel free to add links to any sort of report/statistics from trusted sources that might help us understand the relevance and popularity of this language among users.
9090
9191
9292
## Tests

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ var codegen = require('postman-code-generators'), // require postman-code-genera
104104

105105
This function takes in three parameters and returns a callback with error and supported options of that code generator.
106106

107-
* `language` - langugage key from the language list returned from getLanguageList function
107+
* `language` - language key from the language list returned from getLanguageList function
108108
* `variant` - variant key provided by getLanguageList function
109109
* `callback` - callback function with first parameter as error and second parameter as array of options supported by the codegen.
110110

@@ -159,9 +159,10 @@ This function takes in five parameters and returns a callback with error and gen
159159
##### Example:
160160
```js
161161
var codegen = require('postman-code-generators'), // require postman-code-generators in your project
162-
request = new sdk.Request('www.google.com'), //using postman sdk to create request
162+
sdk = require('postman-collection'), // require postman-collection in your project
163+
request = new sdk.Request('https://www.google.com'), //using postman sdk to create request
163164
language = 'nodejs',
164-
variant = 'requests',
165+
variant = 'request',
165166
options = {
166167
indentCount: 3,
167168
indentType: 'Space',

codegens/http/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Convert function takes three parameters
1313

1414
* `request` - Postman-SDK Request Object
1515

16-
* `options` - options is an object which hsa following properties
16+
* `options` - options is an object which has following properties
1717
* `trimRequestBody` - Trim request body fields
1818

1919
* `callback` - callback function with first parameter as error and second parameter as string for code snippet

codegens/java-okhttp/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ console.log(options);
6161
```
6262

6363
### Guideline for using generated snippet
64-
* Generated snippet requires dependecies [okhttp3](https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp/3.9.1) and [okio](https://mvnrepository.com/artifact/com.squareup.okio/okio/1.13.0) to compile and run
64+
* Generated snippet requires dependencies [okhttp3](https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp/3.9.1) and [okio](https://mvnrepository.com/artifact/com.squareup.okio/okio/1.13.0) to compile and run
6565

6666
* Generated snippet uses `.method(nameOfMethod, body)` from `Request` class to form HTTP request. If the `method` doesn't require body then the value of `body` will be `null`.
6767

codegens/java-unirest/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ console.log(options);
6161
```
6262

6363
### Guideline for using generated snippet
64-
* To download dependecies to use snippet please see [unirest-doc](http://unirest.io/java.html)
64+
* To download dependencies to use snippet please see [unirest-doc](http://unirest.io/java.html)
6565

6666
* This module supports six HTTP request methods.
6767
**GET** **POST** **PUT** **PATCH** **DELETE** **OPTIONS** **HEAD**

codegens/js-fetch/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Convert function takes three parameters
1313

1414
* `request` - Postman-SDK Request Object
1515

16-
* `options` - options is an object which hsa following properties
16+
* `options` - options is an object which has following properties
1717
* `indentType` - String denoting type of indentation for code snippet. eg: 'Space', 'Tab'
1818
* `indentCount` - The number of indentation characters to add per code level
1919
* `trimRequestBody` - Trim request body fields

codegens/js-jquery/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Convert function takes three parameters
1212

1313
* `request` - Postman-SDK Request Object
1414

15-
* `options` - options is an object which hsa following properties
15+
* `options` - options is an object which has following properties
1616
* `indentType` - String denoting type of indentation for code snippet. eg: 'Space', 'Tab'
1717
* `indentCount` - The number of indentation characters to add per code level
1818
* `trimRequestBody` - Trim request body fields

codegens/js-xhr/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Convert function takes three parameters
1212

1313
* `request` - Postman-SDK Request Object
1414

15-
* `options` - options is an object which hsa following properties
15+
* `options` - options is an object which has following properties
1616
* `indentType` - String denoting type of indentation for code snippet. eg: 'Space', 'Tab'
1717
* `indentCount` - The number of indentation characters to add per code level
1818
* `trimRequestBody` - Trim request body fields

codegens/libcurl/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Convert function takes three parameters
1313

1414
* `request` - Postman-SDK Request Object
1515

16-
* `options` - options is an object which hsa following properties
16+
* `options` - options is an object which has following properties
1717
* `indentType` - String denoting type of indentation for code snippet. eg: 'Space', 'Tab'
1818
* `indentCount` - Integer denoting count of indentation required
1919
* `trimRequestBody` - Boolean denoting whether to trim request body fields

codegens/nodejs-request/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Convert function will take three parameters
1818
* `requestTimeout` : Integer denoting time after which the request will bail out in milli-seconds
1919
* `trimRequestBody` : Trim request body fields
2020
* `followRedirect` : Boolean denoting whether to redirect a request
21+
* `ES6_enabled` : Boolean denoting whether to generate snippet with ES6 features
2122

2223
* `callback`- callback function with first parameter as error and second parameter as string for code snippet
2324

@@ -26,7 +27,8 @@ Convert function will take three parameters
2627
var request = new sdk.Request('www.google.com'), //using postman sdk to create request
2728
options = {
2829
indentType: 'Space',
29-
indentCount: 2
30+
indentCount: 2,
31+
ES6_enabled: true
3032
};
3133
convert(request, options, function(error, snippet) {
3234
if (error) {

codegens/objective-c/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Convert function takes three parameters
1212

1313
* `request` - Postman-SDK Request Object
1414

15-
* `options` - options is an object which hsa following properties
15+
* `options` - options is an object which has following properties
1616
* `indentType` - String denoting type of indentation for code snippet. eg: 'Space', 'Tab'
1717
* `indentCount` - The number of indentation characters to add per code level
1818
* `trimRequestBody` - Whether or not request body fields should be trimmed

codegens/ocaml-cohttp/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Convert function takes three parameters
1313

1414
* `request` - Postman-SDK Request Object
1515

16-
* `options` - options is an object which hsa following properties
16+
* `options` - options is an object which has following properties
1717
* `indentType` - String denoting type of indentation for code snippet. eg: 'Space', 'Tab'
1818
* `indentCount` - The number of indentation characters to add per code level
1919
* `trimRequestBody` - Trim request body fields

codegens/php-httprequest2/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Convert function takes three parameters
1212

1313
* `request` - Postman-SDK Request Object
1414

15-
* `options` - options is an object which hsa following properties
15+
* `options` - options is an object which has following properties
1616
* `indentType` - String denoting type of indentation for code snippet. eg: 'Space', 'Tab'
1717
* `indentCount` - The number of indentation characters to add per code level
1818
* `trimRequestBody` - Whether or not request body fields should be trimmed

codegens/php-pecl-http/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Convert function takes three parameters
1313

1414
* `request` - Postman-SDK Request Object
1515

16-
* `options` - options is an object which hsa following properties
16+
* `options` - options is an object which has following properties
1717
* `indentType` - String denoting type of indentation for code snippet. eg: 'Space', 'Tab'
1818
* `indentCount` - The number of indentation characters to add per code level
1919
* `trimRequestBody` - Trim request body fields

codegens/powershell-restmethod/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Convert function takes three parameters
1313

1414
* `request` - Postman-SDK Request Object
1515

16-
* `options` - options is an object which hsa following properties
16+
* `options` - options is an object which has following properties
1717
* `trimRequestBody` - Trim request body fields
1818
* `followRedirect` - Boolean denoting whether to redirect a request
1919
* `requestTimeout` - Integer denoting time after which the request will bail out in milli-seconds

codegens/python-http.client/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Convert function takes three parameters
1313

1414
* `request` - Postman-SDK Request Object
1515

16-
* `options` - options is an object which hsa following properties
16+
* `options` - options is an object which has following properties
1717
* `indentType` - String denoting type of indentation for code snippet. eg: 'Space', 'Tab'
1818
* `indentCount` - Set the number of indentation characters to add per code level
1919
* `trimRequestBody` - Trim request body fields

codegens/shell-httpie/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Convert function takes three parameters
1313

1414
* `request` - Postman-SDK Request Object
1515

16-
* `options` - options is an object which hsa following properties
16+
* `options` - options is an object which has following properties
1717
* `followRedirect` - Boolean denoting whether to redirect a request
1818
* `requestTimeout` - Integer denoting time after which the request will bail out in milli-seconds
1919

codegens/swift/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Convert function takes three parameters
1313

1414
* `request` - Postman-SDK Request Object
1515

16-
* `options` - options is an object which hsa following properties
16+
* `options` - options is an object which has following properties
1717
* `indentType` - String denoting type of indentation for code snippet. eg: 'Space', 'Tab'
1818
* `indentCount` - The number of indentation characters to add per code level
1919
* `trimRequestBody` - Whether or not request body fields should be trimmed

lib/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = {
2323
return callback('Codegen~getOptions: getOptions is not a function');
2424
}
2525
if (!main.getOptions) {
26-
return callback('Codegen~convert: Could not find condegen corresponding to provided language, variant pair');
26+
return callback('Codegen~convert: Could not find codegen corresponding to provided language, variant pair');
2727
}
2828

2929
return callback(null, main.getOptions());
@@ -103,7 +103,7 @@ module.exports = {
103103
}
104104
});
105105
if (!convert) {
106-
return callback('Codegen~convert: Could not find condegen corresponding to provided language, variant pair');
106+
return callback('Codegen~convert: Could not find codegen corresponding to provided language, variant pair');
107107
}
108108

109109

0 commit comments

Comments
 (0)