Skip to content

Commit 483bd4a

Browse files
committed
fix for undefined, refs #8
1 parent ba715f3 commit 483bd4a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,8 @@ function transformShape(openapi,shape){
332332
recurse(shape,{},function(obj,key,state){
333333
if (key == 'shape') {
334334
obj["$ref"] = '#/definitions/'+obj[key];
335-
delete obj[key];
336335
checkDef(openapi,obj[key]);
336+
delete obj[key];
337337
}
338338
if (key == 'documentation') {
339339
obj.description = clean(obj.documentation);
@@ -483,7 +483,7 @@ function doit(methodUri,op,pi) {
483483
return ((e.name == name) && (e.in == 'path'));
484484
});
485485
if (!param) {
486-
console.warn('Missing path parameter '+match);
486+
//console.warn('Missing path parameter '+match);
487487
let nparam = {};
488488
nparam.name = name;
489489
nparam.type = 'string';
@@ -800,8 +800,8 @@ module.exports = {
800800
}
801801

802802
if (url.indexOf('?')>=0) {
803-
let hparams = url.split('?')[1].split('&');
804-
if (!path.parameters) path.parameters = [];
803+
let hparams = url.split('?')[1].split('&');
804+
if (!path.parameters) path.parameters = [];
805805
for (let p of hparams) {
806806
let param = {};
807807
param.name = p.split('=')[0];
@@ -813,7 +813,7 @@ module.exports = {
813813
param.enum = [val];
814814
}
815815
else param.allowEmptyValue = true;
816-
console.log('Hardcoded param',param.name);
816+
//console.log('Hardcoded param',param.name);
817817
action.parameters.push(param);
818818
}
819819
url = url.split('?')[0];

0 commit comments

Comments
 (0)