(methodUri,op,pi)
| 540 | } |
| 541 | |
| 542 | function doit(methodUri,op,pi) { |
| 543 | methodUri.replace(/(\{.+?\})/g,function(match,group1){ |
| 544 | let name = match.replace('{','').replace('}',''); |
| 545 | let param = (op.parameters||[]).concat(pi.parameters||[]).find(function(e,i,a){ |
| 546 | return ((e.name == name) && (e.in == 'path')); |
| 547 | }); |
| 548 | if (!param) { |
| 549 | //console.warn('Missing path parameter '+match); |
| 550 | let nparam = {}; |
| 551 | nparam.name = name; |
| 552 | nparam.in = 'path'; |
| 553 | nparam.required = true; |
| 554 | nparam.schema = { type: 'string' }; |
| 555 | op.parameters.push(nparam); // correct for missing path parameters (2?) |
| 556 | } |
| 557 | return match; |
| 558 | }); |
| 559 | } |
| 560 | |
| 561 | function fillInMissingPathParameters(openapi) { |
| 562 | for (let p in openapi.paths) { |
no outgoing calls
no test coverage detected