(swaggerJSON)
| 47 | }; |
| 48 | |
| 49 | const cleanupAbsolutePaths = (swaggerJSON) => { |
| 50 | const jsonString = JSON.stringify(swaggerJSON); |
| 51 | |
| 52 | const cleanedString = jsonString.replace( |
| 53 | /"\$ref":\s*"#\/definitions\/import\([^)]+\)\.([^"]+)"/g, |
| 54 | '"$ref": "#/definitions/$1"', |
| 55 | ); |
| 56 | |
| 57 | return JSON.parse(cleanedString); |
| 58 | }; |
| 59 | |
| 60 | const buildOpenAPI = async ( |
| 61 | externalHTTPRoutes = [], |