@@ -16,7 +16,6 @@ const { formatDataPath, checkIsCorrectType, isKnownType } = require('./common/sc
16
16
openApiErr = require ( './error.js' ) ,
17
17
ajvValidationError = require ( './ajValidation/ajvValidationError' ) ,
18
18
utils = require ( './utils.js' ) ,
19
- defaultOptions = require ( '../lib/options.js' ) . getOptions ( 'use' ) ,
20
19
{ Node, Trie } = require ( './trie.js' ) ,
21
20
{ validateSchema } = require ( './ajValidation/ajvValidation' ) ,
22
21
inputValidation = require ( './30XUtils/inputValidation' ) ,
@@ -523,7 +522,6 @@ module.exports = {
523
522
* @returns {* } combined requestParams from operation and path params.
524
523
*/
525
524
getRequestParams : function ( operationParam , pathParam , components , options ) {
526
- options = _ . merge ( { } , defaultOptions , options ) ;
527
525
if ( ! Array . isArray ( operationParam ) ) {
528
526
operationParam = [ ] ;
529
527
}
@@ -579,7 +577,6 @@ module.exports = {
579
577
* @returns {Object } - The final object consists of the tree structure
580
578
*/
581
579
generateTrieFromPaths : function ( spec , options , fromWebhooks = false ) {
582
- options = _ . merge ( { } , defaultOptions , options ) ;
583
580
let concreteUtils = getConcreteSchemaUtils ( { type : 'json' , data : spec } ) ,
584
581
specComponentsAndUtils = {
585
582
concreteUtils
@@ -981,8 +978,6 @@ module.exports = {
981
978
* @returns {Array<object> } returns an array of sdk.Variable
982
979
*/
983
980
convertPathVariables : function ( type , providedPathVars , commonPathVars , components , options , schemaCache ) {
984
- options = _ . merge ( { } , defaultOptions , options ) ;
985
-
986
981
var variables = [ ] ;
987
982
// converting the base uri path variables, if any
988
983
// commonPathVars is an object for type = root/method
@@ -1036,7 +1031,6 @@ module.exports = {
1036
1031
*/
1037
1032
convertChildToItemGroup : function ( openapi , child , components , options ,
1038
1033
schemaCache , variableStore , fromWebhooks = false ) {
1039
- options = _ . merge ( { } , defaultOptions , options ) ;
1040
1034
1041
1035
var resource = child ,
1042
1036
itemGroup ,
@@ -1398,8 +1392,6 @@ module.exports = {
1398
1392
* @return {object } responseBody, contentType header needed
1399
1393
*/
1400
1394
convertToPmResponseBody : function ( contentObj , components , options , schemaCache ) {
1401
- options = _ . merge ( { } , defaultOptions , options ) ;
1402
-
1403
1395
var responseBody , cTypeHeader , hasComputedType , cTypes ,
1404
1396
isJsonLike = false ;
1405
1397
if ( ! contentObj ) {
@@ -1512,8 +1504,6 @@ module.exports = {
1512
1504
* @returns {* } first example in the input map type
1513
1505
*/
1514
1506
getExampleData : function ( exampleObj , components , options ) {
1515
- options = _ . merge ( { } , defaultOptions , options ) ;
1516
-
1517
1507
var example ,
1518
1508
exampleKey ;
1519
1509
@@ -1556,7 +1546,6 @@ module.exports = {
1556
1546
convertToPmBodyData : function ( bodyObj , requestType , contentType , parameterSourceOption ,
1557
1547
indentCharacter , components , options , schemaCache ) {
1558
1548
1559
- options = _ . merge ( { } , defaultOptions , options ) ;
1560
1549
var bodyData = '' ,
1561
1550
schemaFormat = SCHEMA_FORMATS . DEFAULT ,
1562
1551
schemaType ,
@@ -1672,7 +1661,6 @@ module.exports = {
1672
1661
* @returns {array } converted queryparam
1673
1662
*/
1674
1663
convertToPmQueryParameters : function ( param , requestType , components , options , schemaCache ) {
1675
- options = _ . merge ( { } , defaultOptions , options ) ;
1676
1664
var pmParams = [ ] ,
1677
1665
paramValue ,
1678
1666
resolveTo = this . resolveToExampleOrSchema ( requestType , options . requestParametersResolution ,
@@ -1848,8 +1836,6 @@ module.exports = {
1848
1836
* @returns {Object } instance of a Postman SDK Header
1849
1837
*/
1850
1838
convertToPmHeader : function ( header , requestType , parameterSource , components , options , schemaCache ) {
1851
- options = _ . merge ( { } , defaultOptions , options ) ;
1852
-
1853
1839
var fakeData ,
1854
1840
convertedHeader ,
1855
1841
reqHeader ,
@@ -1891,7 +1877,6 @@ module.exports = {
1891
1877
* @returns {Object } - Postman requestBody and Content-Type Header
1892
1878
*/
1893
1879
convertToPmBody : function ( requestBody , requestType , components , options , schemaCache ) {
1894
- options = _ . merge ( { } , defaultOptions , options ) ;
1895
1880
var contentObj , // content is required
1896
1881
bodyData ,
1897
1882
param ,
@@ -2175,7 +2160,6 @@ module.exports = {
2175
2160
* @returns {Object } postman response
2176
2161
*/
2177
2162
convertToPmResponse : function ( response , code , originalRequest , components , options , schemaCache ) {
2178
- options = _ . merge ( { } , defaultOptions , options ) ;
2179
2163
var responseHeaders = [ ] ,
2180
2164
previewLanguage = 'text' ,
2181
2165
responseBodyWrapper ,
@@ -2291,7 +2275,6 @@ module.exports = {
2291
2275
* @no -unit-tests
2292
2276
*/
2293
2277
getRefObject : function ( $ref , components , options ) {
2294
- options = _ . merge ( { } , defaultOptions , options ) ;
2295
2278
var refObj , savedSchema ;
2296
2279
2297
2280
if ( typeof $ref !== 'string' ) {
@@ -2461,7 +2444,6 @@ module.exports = {
2461
2444
*/
2462
2445
convertRequestToItem : function ( openapi , operationItem , components ,
2463
2446
options , schemaCache , variableStore , fromWebhooks = false ) {
2464
- options = _ . merge ( { } , defaultOptions , options ) ;
2465
2447
var reqName ,
2466
2448
pathVariables = openapi . baseUrlVariables ,
2467
2449
operation = operationItem . properties ,
@@ -2825,7 +2807,6 @@ module.exports = {
2825
2807
* @returns {* } array of all query params
2826
2808
*/
2827
2809
convertToPmQueryArray : function ( reqParams , requestType , components , options , schemaCache ) {
2828
- options = _ . merge ( { } , defaultOptions , options ) ;
2829
2810
let requestQueryParams = [ ] ;
2830
2811
_ . forEach ( reqParams . query , ( queryParam ) => {
2831
2812
this . convertToPmQueryParameters ( queryParam , requestType , components , options , schemaCache ) . forEach ( ( pmParam ) => {
0 commit comments