mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
Fixed incorrect usage of id field in sdk.variable and used key
This commit is contained in:
@@ -418,7 +418,7 @@ module.exports = {
|
||||
_.forOwn(serverVariables, (value, key) => {
|
||||
let description = this.getParameterDescription(value);
|
||||
variables.push(new sdk.Variable({
|
||||
id: key,
|
||||
key: key,
|
||||
value: value.default || '',
|
||||
description: description
|
||||
}));
|
||||
@@ -426,7 +426,7 @@ module.exports = {
|
||||
}
|
||||
if (keyName) {
|
||||
variables.push(new sdk.Variable({
|
||||
id: keyName,
|
||||
key: keyName,
|
||||
value: serverUrl,
|
||||
type: 'string'
|
||||
}));
|
||||
@@ -2128,7 +2128,7 @@ module.exports = {
|
||||
convertedPathVar = _.get(this.convertParamsWithStyle(element, fakedData, PARAMETER_SOURCE.REQUEST,
|
||||
components, schemaCache, options), '[0]', {});
|
||||
|
||||
variableStore[element.name] = _.assign(convertedPathVar, { id: element.name, type: 'collection' });
|
||||
variableStore[element.name] = _.assign(convertedPathVar, { key: element.name, type: 'collection' });
|
||||
}
|
||||
});
|
||||
// accounting for the overriding of the root level and path level servers object if present at the operation level
|
||||
@@ -2159,7 +2159,7 @@ module.exports = {
|
||||
sanitizeResult.collectionVars.forEach((element) => {
|
||||
if (!variableStore[element.name]) {
|
||||
variableStore[element.name] = {
|
||||
id: element.name,
|
||||
key: element.name,
|
||||
value: element.value || '',
|
||||
description: element.description,
|
||||
type: 'collection'
|
||||
|
||||
Reference in New Issue
Block a user