Socket
Socket
Sign inDemoInstall

postman-code-generators

Package Overview
Dependencies
Maintainers
2
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postman-code-generators - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

codegens/nodejs-request/run.js

10

codegens/csharp-restsharp/lib/restsharp.js

@@ -76,4 +76,4 @@ var _ = require('./lodash'),

type: 'enum',
availableOptions: ['tab', 'space'],
default: 'space',
availableOptions: ['Tab', 'Space'],
default: 'Space',
description: 'Character used for indentation'

@@ -112,5 +112,5 @@ },

* @param {Object} options - Options to tweak code snippet generated in C#
* @param {String} options.indentType - type for indentation eg: space, tab (default: space)
* @param {String} options.indentType - type for indentation eg: Space, Tab (default: Space)
* @param {String} options.indentCount - number of spaces or tabs for indentation. (default: 4 for indentType:
space, default: 1 for indentType: tab)
Space, default: 1 for indentType: Tab)
* @param {Boolean} [options.includeBoilerplate] - indicates whether to include class defination in C#

@@ -142,3 +142,3 @@ * @param {Boolean} options.followRedirect - whether to enable followredirect

indentString = options.indentType === 'tab' ? '\t' : ' ';
indentString = options.indentType === 'Tab' ? '\t' : ' ';
indentString = indentString.repeat(options.indentCount);

@@ -145,0 +145,0 @@

@@ -29,3 +29,3 @@ # codegen-csharp-restsharp

options = {
indentType: 'space',
indentType: 'Space',
indentCount: 2,

@@ -32,0 +32,0 @@ includeBoilerplate: false

@@ -31,3 +31,3 @@ var sanitize = require('./util').sanitize,

if (multiLine) {
indent = options.indentType === 'tab' ? '\t' : ' ';
indent = options.indentType === 'Tab' ? '\t' : ' ';
indent = ' ' + options.lineContinuationCharacter + '\n' + indent.repeat(options.indentCount); // eslint-disable-line max-len

@@ -34,0 +34,0 @@ }

@@ -17,3 +17,3 @@ # codegen-curl

* `options` - options is an object which hsa following properties
* `indentType` - String denoting type of indentation for code snippet. eg: 'space', 'tab'
* `indentType` - String denoting type of indentation for code snippet. eg: 'Space', 'Tab'
* `indentCount` - Number of indentation characters to add per code level

@@ -33,3 +33,3 @@ * `trimRequestBody` - Trim request body fields

indentCount: 3,
indentType: 'space',
indentType: 'Space',
requestTimeout: 200,

@@ -36,0 +36,0 @@ trimRequestBody: true,

@@ -140,3 +140,3 @@ var _ = require('./lodash'),

indent = options.indentType === 'tab' ? '\t' : ' ';
indent = options.indentType === 'Tab' ? '\t' : ' ';
indent = indent.repeat(options.indentCount);

@@ -222,4 +222,4 @@ timeout = options.requestTimeout;

type: 'enum',
availableOptions: ['tab', 'space'],
default: 'space',
availableOptions: ['Tab', 'Space'],
default: 'Space',
description: 'Character used for indentation'

@@ -226,0 +226,0 @@ },

@@ -17,3 +17,3 @@ # codegen-golang

* `options` - options is an object which hsa following properties
* `indentType` - String denoting type of indentation for code snippet. eg: 'space', 'tab'
* `indentType` - String denoting type of indentation for code snippet. eg: 'Space', 'Tab'
* `indentCount` - Number of indentation characters to add per code level

@@ -31,3 +31,3 @@ * `trimRequestBody` - Trim request body fields

indentCount: 3,
indentType: 'space',
indentType: 'Space',
requestTimeout: 200,

@@ -34,0 +34,0 @@ trimRequestBody: true,

@@ -80,4 +80,4 @@ var _ = require('./lodash'),

type: 'enum',
availableOptions: ['tab', 'space'],
default: 'space',
availableOptions: ['Tab', 'Space'],
default: 'Space',
description: 'Character used for indentation'

@@ -116,3 +116,3 @@ },

* @param {Object} options - Options to tweak code snippet generated in Java-OkHttp
* @param {String} options.indentType - type for indentation eg: space, tab
* @param {String} options.indentType - type for indentation eg: Space, Tab
* @param {String} options.indentCount - number of spaces or tabs for indentation.

@@ -145,3 +145,3 @@ * @param {Boolean} [options.includeBoilerplate] - indicates whether to include class defination in java

indentString = options.indentType === 'tab' ? '\t' : ' ';
indentString = options.indentType === 'Tab' ? '\t' : ' ';
indentString = indentString.repeat(options.indentCount);

@@ -148,0 +148,0 @@

@@ -27,3 +27,3 @@ # codegen-java-okhttp

* `options`- options is an object which can have following properties
* `indentType`- string representing type of indentation for code snippet. eg: 'space', 'tab'
* `indentType`- string representing type of indentation for code snippet. eg: 'Space', 'Tab'
* `indentCount`- positiveInteger representing count of indentation required.

@@ -41,3 +41,3 @@ * `includeBoilerplate`- boolean representing whether to include class definition in code snippet

options = {
indentType: 'space',
indentType: 'Space',
indentCount: 2,

@@ -44,0 +44,0 @@ includeBoilerplate: false

@@ -76,4 +76,4 @@ var _ = require('./lodash'),

type: 'enum',
availableOptions: ['tab', 'space'],
default: 'space',
availableOptions: ['Tab', 'Space'],
default: 'Space',
description: 'Character used for indentation'

@@ -110,3 +110,3 @@ },

* @param {Object} options
* @param {String} options.indentType - type for indentation eg: space, tab
* @param {String} options.indentType - type for indentation eg: Space, Tab
* @param {String} options.indentCount - number of spaces or tabs for indentation.

@@ -135,3 +135,3 @@ * @param {Boolean} [options.includeBoilerplate] - indicates whether to include class defination in java

indentString = options.indentType === 'tab' ? '\t' : ' ';
indentString = options.indentType === 'Tab' ? '\t' : ' ';
indentString = indentString.repeat(options.indentCount);

@@ -138,0 +138,0 @@

@@ -27,3 +27,3 @@ # codegen-java-unirest

* `options`- options is an object which can have following properties
* `indentType`- string representing type of indentation for code snippet. eg: 'space', 'tab'
* `indentType`- string representing type of indentation for code snippet. eg: 'Space', 'Tab'
* `indentCount`- positiveInteger representing count of indentation required.

@@ -41,3 +41,3 @@ * `includeBoilerplate`- boolean representing whether to include class definition in code snippet

options = {
indentType: 'space',
indentType: 'Space',
indentCount: 2,

@@ -44,0 +44,0 @@ includeBoilerplate: false

@@ -139,4 +139,4 @@ var _ = require('./lodash'),

type: 'enum',
availableOptions: ['tab', 'space'],
default: 'space',
availableOptions: ['Tab', 'Space'],
default: 'Space',
description: 'Character used for indentation'

@@ -173,3 +173,3 @@ },

* @param {Object} options
* @param {String} options.indentType - type for indentation eg: space, tab
* @param {String} options.indentType - type for indentation eg: Space, Tab
* @param {String} options.indentCount - number of spaces or tabs for indentation.

@@ -187,3 +187,3 @@ * @param {Boolean} options.followRedirect - whether to enable followredirect

var indent = options.indentType === 'tab' ? '\t' : ' ',
var indent = options.indentType === 'Tab' ? '\t' : ' ',
trim = options.trimRequestBody,

@@ -190,0 +190,0 @@ headers, body,

@@ -17,3 +17,3 @@ # codegen-js-fetch

* `options` - options is an object which hsa following properties
* `indentType` - String denoting type of indentation for code snippet. eg: 'space', 'tab'
* `indentType` - String denoting type of indentation for code snippet. eg: 'Space', 'Tab'
* `indentCount` - Number of indentation characters to add per code level

@@ -31,3 +31,3 @@ * `trimRequestBody` - Trim request body fields

indentCount: 3,
indentType: 'space',
indentType: 'Space',
requestTimeout: 200,

@@ -34,0 +34,0 @@ trimRequestBody: true,

@@ -70,4 +70,4 @@ var _ = require('./lodash'),

type: 'enum',
availableOptions: ['tab', 'space'],
default: 'space',
availableOptions: ['Tab', 'Space'],
default: 'Space',
description: 'Character used for indentation'

@@ -96,5 +96,5 @@ },

* @param {Object} options
* @param {String} options.indentType - type of indentation eg: space / tab (default: space)
* @param {Number} options.indentCount - frequency of indent (default: 4 for indentType: space,
default: 1 for indentType: tab)
* @param {String} options.indentType - type of indentation eg: Space / Tab (default: Space)
* @param {Number} options.indentCount - frequency of indent (default: 4 for indentType: Space,
default: 1 for indentType: Tab)
* @param {Number} options.requestTimeout : time in milli-seconds after which request will bail out

@@ -118,3 +118,3 @@ (default: 0 -> never bail out)

options = sanitizeOptions(options, self.getOptions());
indentType = (options.indentType === 'tab') ? '\t' : ' ';
indentType = (options.indentType === 'Tab') ? '\t' : ' ';

@@ -121,0 +121,0 @@ indent = indentType.repeat(options.indentCount);

@@ -130,4 +130,4 @@ var _ = require('./lodash'),

type: 'enum',
availableOptions: ['tab', 'space'],
default: 'space',
availableOptions: ['Tab', 'Space'],
default: 'Space',
description: 'Character used for indentation'

@@ -156,3 +156,3 @@ },

* @param {Object} options
* @param {String} options.indentType - type for indentation eg: space, tab
* @param {String} options.indentType - type for indentation eg: Space, Tab
* @param {String} options.indentCount - number of spaces or tabs for indentation.

@@ -172,3 +172,3 @@ * @param {Boolean} options.trimRequestBody - whether to trim fields in request body or not

bodySnippet = '';
indent = options.indentType === 'tab' ? '\t' : ' ';
indent = options.indentType === 'Tab' ? '\t' : ' ';
indent = indent.repeat(options.indentCount);

@@ -175,0 +175,0 @@ trim = options.trimRequestBody;

@@ -26,3 +26,3 @@ # codegen-js-xhr

* `options` - options is an object which hsa following properties
* `indentType` - String denoting type of indentation for code snippet. eg: 'space', 'tab'
* `indentType` - String denoting type of indentation for code snippet. eg: 'Space', 'Tab'
* `indentCount` - Number of indentation characters to add per code level

@@ -40,3 +40,3 @@ * `trimRequestBody` - Trim request body fields

indentCount: 3,
indentType: 'space',
indentType: 'Space',
requestTimeout: 200,

@@ -43,0 +43,0 @@ trimRequestBody: true,

@@ -21,3 +21,3 @@ var sanitize = require('./util').sanitize,

timeout,
indent = options.indentType === 'tab' ? '\t' : ' ',
indent = options.indentType === 'Tab' ? '\t' : ' ',
indentString = indent.repeat(options.indentCount),

@@ -170,4 +170,4 @@ headerSnippet = '',

type: 'enum',
availableOptions: ['tab', 'space'],
default: 'space',
availableOptions: ['Tab', 'Space'],
default: 'Space',
description: 'Character used for indentation'

@@ -174,0 +174,0 @@ },

@@ -17,3 +17,3 @@ # codegen-libcurl

* `options` - options is an object which hsa following properties
* `indentType` - String denoting type of indentation for code snippet. eg: 'space', 'tab'
* `indentType` - String denoting type of indentation for code snippet. eg: 'Space', 'Tab'
* `indentCount` - Integer denoting count of indentation required

@@ -32,3 +32,3 @@ * `trimRequestBody` - Boolean denoting whether to trim request body fields

indentCount: 3,
indentType: 'space',
indentType: 'Space',
trimRequestBody: true,

@@ -35,0 +35,0 @@ protocol: 'https',

@@ -110,3 +110,3 @@ const _ = require('./lodash'),

* @param {Object} options
* @param {String} options.indentType - type for indentation eg: space, tab
* @param {String} options.indentType - type for indentation eg: Space, Tab
* @param {String} options.indentCount - number of spaces or tabs for indentation.

@@ -136,4 +136,4 @@ * @param {Boolean} options.followRedirect - whether to enable followredirect

type: 'enum',
availableOptions: ['tab', 'space'],
default: 'space',
availableOptions: ['Tab', 'Space'],
default: 'Space',
description: 'Character used for indentation'

@@ -173,3 +173,3 @@ },

indentString = options.indentType === 'tab' ? '\t' : ' ';
indentString = options.indentType === 'Tab' ? '\t' : ' ';
indentString = indentString.repeat(options.indentCount);

@@ -176,0 +176,0 @@

@@ -18,3 +18,3 @@ # codegen-nodejs-native

* `options`- options is an object which can have following properties
* `indentType`- string representing type of indentation for code snippet. eg: 'space', 'tab'
* `indentType`- string representing type of indentation for code snippet. eg: 'Space', 'Tab'
* `indentCount`- positiveInteger representing count of indentation required.

@@ -31,3 +31,3 @@ * `requestTimeout` : Integer denoting time after which the request will bail out in milli-seconds

options = {
indentType: 'space',
indentType: 'Space',
indentCount: 2

@@ -34,0 +34,0 @@ };

@@ -76,4 +76,4 @@ var _ = require('./lodash'),

type: 'enum',
availableOptions: ['tab', 'space'],
default: 'space',
availableOptions: ['Tab', 'Space'],
default: 'Space',
description: 'Character used for indentation'

@@ -110,3 +110,3 @@ },

* @param {Object} options
* @param {String} options.indentType - type for indentation eg: space, tab
* @param {String} options.indentType - type for indentation eg: Space, Tab
* @param {String} options.indentCount - number of spaces or tabs for indentation.

@@ -127,3 +127,3 @@ * @param {Boolean} options.followRedirect - whether to enable followredirect

indentString = options.indentType === 'tab' ? '\t' : ' ';
indentString = options.indentType === 'Tab' ? '\t' : ' ';
indentString = indentString.repeat(options.indentCount);

@@ -130,0 +130,0 @@

@@ -27,3 +27,3 @@ # codegen-nodejs-request

* `options`- options is an object which can have following properties
* `indentType`- string representing type of indentation for code snippet. eg: 'space', 'tab'
* `indentType`- string representing type of indentation for code snippet. eg: 'Space', 'Tab'
* `indentCount`- positiveInteger representing count of indentation required.

@@ -40,3 +40,3 @@ * `requestTimeout` : Integer denoting time after which the request will bail out in milli-seconds

options = {
indentType: 'space',
indentType: 'Space',
indentCount: 2

@@ -43,0 +43,0 @@ };

@@ -57,4 +57,4 @@ var _ = require('./lodash'),

type: 'enum',
availableOptions: ['tab', 'space'],
default: 'space',
availableOptions: ['Tab', 'Space'],
default: 'Space',
description: 'Character used for indentation'

@@ -91,3 +91,3 @@ },

* @param {Object} options
* @param {String} options.indentType - type for indentation eg: space, tab
* @param {String} options.indentType - type for indentation eg: Space, Tab
* @param {String} options.indentCount - number of spaces or tabs for indentation.

@@ -108,3 +108,3 @@ * @param {Boolean} options.followRedirect - whether to enable followredirect

indentString = options.indentType === 'tab' ? '\t' : ' ';
indentString = options.indentType === 'Tab' ? '\t' : ' ';
indentString = indentString.repeat(options.indentCount);

@@ -111,0 +111,0 @@

@@ -27,3 +27,3 @@ # codegen-nodejs-unirest

* `options`- options is an object which can have following properties
* `indentType`- string representing type of indentation for code snippet. eg: 'space', 'tab' (default: 'tab')
* `indentType`- string representing type of indentation for code snippet. eg: 'Space', 'Tab' (default: 'Tab')
* `indentCount`- positiveInteger representing count of indentation required.

@@ -40,3 +40,3 @@ * `requestTimeout` : Integer denoting time after which the request will bail out in milli-seconds

options = {
indentType: 'space',
indentType: 'Space',
indentCount: 2

@@ -43,0 +43,0 @@ };

@@ -218,4 +218,4 @@ var _ = require('./lodash'),

type: 'enum',
availableOptions: ['tab', 'space'],
default: 'space',
availableOptions: ['Tab', 'Space'],
default: 'Space',
description: 'Character used for indentation'

@@ -254,5 +254,5 @@ },

* @param {Object} options
* @param {String} options.indentType - type of indentation eg: space / tab (default: space)
* @param {Number} options.indentCount - frequency of indent (default: 4 for indentType: space,
default: 1 for indentType: tab)
* @param {String} options.indentType - type of indentation eg: Space / Tab (default: Space)
* @param {Number} options.indentCount - frequency of indent (default: 4 for indentType: Space,
default: 1 for indentType: Tab)
* @param {Number} options.requestTimeout - time in milli-seconds after which request will bail out

@@ -282,3 +282,3 @@ (default: 0 -> never bail out)

indent = options.indentType === 'tab' ? '\t' : ' ';
indent = options.indentType === 'Tab' ? '\t' : ' ';
indent = indent.repeat(options.indentCount);

@@ -285,0 +285,0 @@ // timeout = options.requestTimeout;

@@ -28,3 +28,3 @@ # codegen-ocaml-cohttp

* `options` - options is an object which hsa following properties
* `indentType` - String denoting type of indentation for code snippet. eg: 'space', 'tab'
* `indentType` - String denoting type of indentation for code snippet. eg: 'Space', 'Tab'
* `indentCount` - Number of indentation characters to add per code level

@@ -42,3 +42,3 @@ * `trimRequestBody` - Trim request body fields

indentCount: 3,
indentType: 'space',
indentType: 'Space',
requestTimeout: 200, // currently not supported (By default request will never bail out in Ocaml)

@@ -45,0 +45,0 @@ trimRequestBody: true,

@@ -46,4 +46,4 @@ var _ = require('./lodash'),

type: 'enum',
availableOptions: ['tab', 'space'],
default: 'space',
availableOptions: ['Tab', 'Space'],
default: 'Space',
description: 'Character used for indentation'

@@ -79,5 +79,5 @@ },

* @param {Object} options
* @param {String} options.indentType - type of indentation eg: space / tab (default: space)
* @param {Number} options.indentCount - frequency of indent (default: 4 for indentType: space,
default: 1 for indentType: tab)
* @param {String} options.indentType - type of indentation eg: Space / Tab (default: Space)
* @param {Number} options.indentCount - frequency of indent (default: 4 for indentType: Space,
default: 1 for indentType: Tab)
* @param {Number} options.requestTimeout : time in milli-seconds after which request will bail out

@@ -104,3 +104,3 @@ (default: 0 -> never bail out)

identity = options.indentType === 'tab' ? '\t' : ' ';
identity = options.indentType === 'Tab' ? '\t' : ' ';
indentation = identity.repeat(options.indentCount);

@@ -107,0 +107,0 @@ // concatenation and making up the final string

@@ -33,5 +33,5 @@ # Code-Gen: Postman SDK Request -> Php-Curl Snippet Converter

* `indentType` : can be `tab` or `space` (default: 'space')
* `indentType` : can be `Tab` or `Space` (default: 'Space')
* `indentCount` : Integer denoting the number of tabs/spaces required for indentation, range 0-8 (default : for indentType tab : 2, for indentType space : 4)
* `indentCount` : Integer denoting the number of tabs/spaces required for indentation, range 0-8 (default : for indentType Tab : 2, for indentType Space : 4)

@@ -53,3 +53,3 @@ * `requestTimeout` : Integer denoting time after which the request will bail out in milli-seconds (default: 0 -> never bail out)

var request = sdk.Request('http://www.google.com'),
options = {indentType: 'tab', indentCount: 4, followRediredirect: false, trimRequestBody: true};
options = {indentType: 'Tab', indentCount: 4, followRediredirect: false, trimRequestBody: true};

@@ -56,0 +56,0 @@ convert(request, options, function (err, snippet) {

@@ -46,4 +46,4 @@ var _ = require('./lodash'),

type: 'enum',
default: 'space',
availableOptions: ['tab', 'space'],
default: 'Space',
availableOptions: ['Tab', 'Space'],
description: 'Character used for indentation'

@@ -78,5 +78,5 @@ },

* @param {Object} options
* @param {String} options.indentType - type of indentation eg: spaces/tab (default: space)
* @param {String} options.indentCount - frequency of indent (default: 4 for indentType: space,
* default: 2 for indentType: tab)
* @param {String} options.indentType - type of indentation eg: spaces/Tab (default: Space)
* @param {String} options.indentCount - frequency of indent (default: 4 for indentType: Space,
* default: 2 for indentType: Tab)
* @param {Number} options.requestTimeout : time in milli-seconds after which request will bail out

@@ -101,3 +101,3 @@ (default: 0 -> never bail out)

identity = options.indentType === 'tab' ? '\t' : ' ';
identity = options.indentType === 'Tab' ? '\t' : ' ';
indentation = identity.repeat(options.indentCount);

@@ -104,0 +104,0 @@

@@ -17,3 +17,3 @@ # codegen-php-pecl-http

* `options` - options is an object which hsa following properties
* `indentType` - String denoting type of indentation for code snippet. eg: 'space', 'tab'
* `indentType` - String denoting type of indentation for code snippet. eg: 'Space', 'Tab'
* `indentCount` - Number of indentation characters to add per code level

@@ -31,3 +31,3 @@ * `trimRequestBody` - Trim request body fields

indentCount: 3,
indentType: 'space',
indentType: 'Space',
requestTimeout: 200,

@@ -34,0 +34,0 @@ trimRequestBody: true,

@@ -75,4 +75,4 @@ var _ = require('./lodash'),

type: 'enum',
default: 'space',
availableOptions: ['tab', 'space'],
default: 'Space',
availableOptions: ['Tab', 'Space'],
description: 'Character used for indentation'

@@ -104,5 +104,5 @@ },

* @param {Object} options - Options to tweak code snippet generated in Python
* @param {String} options.indentType - type of indentation eg: space / tab (default: space)
* @param {Number} options.indentCount - frequency of indent (default: 4 for indentType: space,
default: 1 for indentType: tab)
* @param {String} options.indentType - type of indentation eg: Space / Tab (default: Space)
* @param {Number} options.indentCount - frequency of indent (default: 4 for indentType: Space,
default: 1 for indentType: Tab)
* @param {Number} options.requestTimeout : time in milli-seconds after which request will bail out

@@ -128,3 +128,3 @@ (default: 0 -> never bail out)

identity = options.indentType === 'tab' ? '\t' : ' ';
identity = options.indentType === 'Tab' ? '\t' : ' ';
indentation = identity.repeat(options.indentCount);

@@ -131,0 +131,0 @@

@@ -17,3 +17,3 @@ # codegen-python-http.client

* `options` - options is an object which hsa following properties
* `indentType` - String denoting type of indentation for code snippet. eg: 'space', 'tab'
* `indentType` - String denoting type of indentation for code snippet. eg: 'Space', 'Tab'
* `indentCount` - Number of indentation characters to add per code level

@@ -31,3 +31,3 @@ * `trimRequestBody` - Trim request body fields

indentCount: 3,
indentType: 'space',
indentType: 'Space',
requestTimeout: 200,

@@ -34,0 +34,0 @@ trimRequestBody: true,

@@ -9,4 +9,4 @@ var _ = require('./lodash'),

* Used to parse the request headers
*
* @param {Object} request - postman SDK-request object
*
* @param {Object} request - postman SDK-request object
* @param {String} indentation - used for indenting snippet's structure

@@ -32,3 +32,3 @@ * @returns {String} - request headers in the desired format

* Used to return options which are specific to a particular plugin
*
*
* @returns {Array}

@@ -48,4 +48,4 @@ */

type: 'enum',
availableOptions: ['tab', 'space'],
default: 'space',
availableOptions: ['Tab', 'Space'],
default: 'Space',
description: 'Character used for indentation'

@@ -77,9 +77,9 @@ },

/**
* Used to convert the postman sdk-request object to python request snippet
*
* Used to convert the postman sdk-request object to python request snippet
*
* @param {Object} request - postman SDK-request object
* @param {Object} options
* @param {String} options.indentType - type of indentation eg: space / tab (default: space)
* @param {Number} options.indentCount - frequency of indent (default: 4 for indentType: space,
default: 1 for indentType: tab)
* @param {String} options.indentType - type of indentation eg: Space / Tab (default: Space)
* @param {Number} options.indentCount - frequency of indent (default: 4 for indentType: Space,
default: 1 for indentType: Tab)
* @param {Number} options.requestTimeout : time in milli-seconds after which request will bail out

@@ -105,3 +105,3 @@ (default: 0 -> never bail out)

identity = options.indentType === 'tab' ? '\t' : ' ';
identity = options.indentType === 'Tab' ? '\t' : ' ';
indentation = identity.repeat(options.indentCount);

@@ -108,0 +108,0 @@ snippet += 'import requests\n\n';

@@ -21,5 +21,5 @@ # Code-Gen: Postman SDK Request -> Python-Requests Snippet Converter

* `indentType` : can be `tab` or `space` (default: 'space')
* `indentType` : can be `Tab` or `Space` (default: 'Space')
* `indentCount` : Integer denoting the number of tabs/spaces required for indentation, range 0-8 (default : for indentType tab : 2, for indentType space : 4)
* `indentCount` : Integer denoting the number of tabs/spaces required for indentation, range 0-8 (default : for indentType Tab : 2, for indentType Space : 4)

@@ -41,3 +41,3 @@ * `requestTimeout` : Integer denoting time after which the request will bail out in milli-seconds (default: 0 -> never bail out)

var request = sdk.Request('https://www.google.com'),
options = {indentType: 'tab', indentCount: 4, followRediredirect: false, trimRequestBody: true, requestTimeout: 0};
options = {indentType: 'Tab', indentCount: 4, followRediredirect: false, trimRequestBody: true, requestTimeout: 0};

@@ -44,0 +44,0 @@ convert(request, options, function (err, snippet) {

@@ -41,4 +41,4 @@ var _ = require('./lodash'),

type: 'enum',
availableOptions: ['tab', 'space'],
default: 'space',
availableOptions: ['Tab', 'Space'],
default: 'Space',
description: 'Character used for indentation'

@@ -74,5 +74,5 @@ },

* @param {Object} options
* @param {String} options.indentType - type of indentation eg: space / tab (default: space)
* @param {Number} options.indentCount - frequency of indent (default: 4 for indentType: space,
default: 1 for indentType: tab)
* @param {String} options.indentType - type of indentation eg: Space / Tab (default: Space)
* @param {Number} options.indentCount - frequency of indent (default: 4 for indentType: Space,
default: 1 for indentType: Tab)
* @param {Number} options.requestTimeout : time in milli-seconds after which request will bail out

@@ -101,3 +101,3 @@ (default: 0 -> never bail out)

identity = options.indentType === 'tab' ? '\t' : ' ';
identity = options.indentType === 'Tab' ? '\t' : ' ';
indentation = identity.repeat(options.indentCount);

@@ -104,0 +104,0 @@ // concatenation and making up the final string

@@ -23,5 +23,5 @@ # Code-Gen: Postman SDK Request -> Ruby Snippet Converter

* `indentType` : can be `tab` or `space` (default: 'space')
* `indentType` : can be `Tab` or `Space` (default: 'Space')
* `indentCount` : Integer denoting the number of tabs/spaces required for indentation, range 0-8 (default : for indentType tab : 2, for indentType space : 4)
* `indentCount` : Integer denoting the number of tabs/spaces required for indentation, range 0-8 (default : for indentType Tab : 2, for indentType Space : 4)

@@ -39,3 +39,3 @@ * `trimRequestBody` : Trim request body fields (default: false)

var request = sdk.Request('http://www.google.com'),
options = {indentType: 'tab', indentCount: 4, trimRequestBody: true};
options = {indentType: 'Tab', indentCount: 4, trimRequestBody: true};

@@ -42,0 +42,0 @@ convert(request, options, function (err, snippet) {

@@ -51,4 +51,4 @@ var _ = require('./lodash'),

type: 'enum',
availableOptions: ['tab', 'space'],
default: 'space',
availableOptions: ['Tab', 'Space'],
default: 'Space',
description: 'Character used for indentation'

@@ -87,5 +87,5 @@ },

* @param {Object} options
* @param {String} options.indentType - type of indentation eg: space / tab (default: space)
* @param {Number} options.indentCount - frequency of indent (default: 4 for indentType: space,
default: 1 for indentType: tab)
* @param {String} options.indentType - type of indentation eg: Space / Tab (default: Space)
* @param {Number} options.indentCount - frequency of indent (default: 4 for indentType: Space,
default: 1 for indentType: Tab)
* @param {Number} options.requestTimeout : time in milli-seconds after which request will bail out

@@ -112,3 +112,3 @@ (default: 0 -> never bail out)

identity = options.indentType === 'tab' ? '\t' : ' ';
identity = options.indentType === 'Tab' ? '\t' : ' ';
indentation = identity.repeat(options.indentCount);

@@ -115,0 +115,0 @@ // concatenation and making up the final string

@@ -22,5 +22,5 @@ # Code-Gen: Postman SDK Request -> Shell-Wget Snippet Converter

* `indentType` : can be `tab` or `space` (default: 'space')
* `indentType` : can be `Tab` or `Space` (default: 'Space')
* `indentCount` : Integer denoting the number of tabs/spaces required for indentation, range 0-8 (default : for indentType tab : 2, for indentType space : 4)
* `indentCount` : Integer denoting the number of tabs/spaces required for indentation, range 0-8 (default : for indentType Tab : 2, for indentType Space : 4)

@@ -42,3 +42,3 @@ * `requestTimeout` : Integer denoting time after which the request will bail out in milli-seconds (default: 0 -> never bail out)

var request = sdk.Request('http://www.google.com'),
options = {indentType: 'tab', indentCount: 4, followRediredirect: false, trimRequestBody: true};
options = {indentType: 'Tab', indentCount: 4, followRediredirect: false, trimRequestBody: true};

@@ -45,0 +45,0 @@ convert(request, options, function (err, snippet) {

@@ -166,4 +166,4 @@ var _ = require('./lodash'),

type: 'enum',
availableOptions: ['tab', 'space'],
default: 'space',
availableOptions: ['Tab', 'Space'],
default: 'Space',
description: 'Character used for indentation'

@@ -202,5 +202,5 @@ },

* @param {Object} options - Options to tweak code snippet generated in Swift
* @param {String} options.indentType - type of indentation eg: space / tab (default: space)
* @param {Number} options.indentCount - frequency of indent (default: 4 for indentType: space,
default: 1 for indentType: tab)
* @param {String} options.indentType - type of indentation eg: Space / Tab (default: Space)
* @param {Number} options.indentCount - frequency of indent (default: 4 for indentType: Space,
default: 1 for indentType: Tab)
* @param {Number} options.requestTimeout - time in milli-seconds after which request will bail out

@@ -228,3 +228,3 @@ (default: 0 -> never bail out)

indent = options.indentType === 'tab' ? '\t' : ' ';
indent = options.indentType === 'Tab' ? '\t' : ' ';
indent = indent.repeat(options.indentCount);

@@ -231,0 +231,0 @@ timeout = options.requestTimeout;

@@ -17,3 +17,3 @@ # codegen-swift

* `options` - options is an object which hsa following properties
* `indentType` - String denoting type of indentation for code snippet. eg: 'space', 'tab'
* `indentType` - String denoting type of indentation for code snippet. eg: 'Space', 'Tab'
* `indentCount` - Number of indentation characters to add per code level

@@ -30,3 +30,3 @@ * `trimRequestBody` - Trim request body fields

indentCount: 3,
indentType: 'space',
indentType: 'Space',
requestTimeout: 200,

@@ -33,0 +33,0 @@ trimRequestBody: true

@@ -78,3 +78,3 @@ var sdk = require('postman-collection'),

* @param {Object} [options] - contains convert level options
* @param {Number} [options.indentType] - indentation based on tab or spaces
* @param {Number} [options.indentType] - indentation based on Tab or spaces
* @param {Number} [options.indentCount] - count/frequency of indentType

@@ -81,0 +81,0 @@ * @param {Number} [options.requestTimeout] : time in milli-seconds after which request will bail out

{
"name": "postman-code-generators",
"version": "0.0.10",
"version": "0.0.11",
"description": "Generates code snippets for a postman collection",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc