fix: oas CLI to convert Windows paths to unix (#12254)
* fix: oas CLI to convert Windows paths to unix * Create tidy-pigs-heal.md * refactor: revert to isolate the issue * refactor: add back the change with logs * fix: remove external dependency
This commit is contained in:
1 parent
ad74ba2ca4
commit
71a9a7210c
2 files changed
+19
-8
No files matched your search
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/medusa-oas-cli": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: oas CLI to convert Windows paths to unix
|
||||||
@@ -179,14 +179,20 @@ async function getOASFromPaths(
|
|||||||
customBaseFile?: string
|
customBaseFile?: string
|
||||||
): Promise<OpenAPIObject> {
|
): Promise<OpenAPIObject> {
|
||||||
console.log(`🔵 Gathering custom OAS`)
|
console.log(`🔵 Gathering custom OAS`)
|
||||||
const gen = await swaggerInline(additionalPaths, {
|
const gen = await swaggerInline(
|
||||||
base:
|
additionalPaths.map((additionalPath) => {
|
||||||
customBaseFile ?? path.resolve(basePath, "oas", "default.oas.base.yaml"),
|
return additionalPath.replace(/\\/g, "/")
|
||||||
format: ".json",
|
}),
|
||||||
logger: (log) => {
|
{
|
||||||
console.log(log)
|
base:
|
||||||
},
|
customBaseFile ??
|
||||||
})
|
path.resolve(basePath, "oas", "default.oas.base.yaml"),
|
||||||
|
format: ".json",
|
||||||
|
logger: (log) => {
|
||||||
|
console.log(log)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
)
|
||||||
return (await OpenAPIParser.parse(JSON.parse(gen))) as OpenAPIObject
|
return (await OpenAPIParser.parse(JSON.parse(gen))) as OpenAPIObject
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user