fix(oas): support additional props, fix circular references patch, and other fixes (#9213)
* chore(oas): support additional props, fix circular references patch, and other fixes * fix description * description fixes
This commit is contained in:
@@ -16,6 +16,7 @@ decorators:
|
||||
- ProductCategoryResponse
|
||||
AdminShippingOption:
|
||||
- AdminShippingOption
|
||||
- AdminServiceZone
|
||||
AdminProductCategory:
|
||||
- AdminProductCategory
|
||||
- AdminProduct
|
||||
@@ -41,6 +42,8 @@ decorators:
|
||||
AdminTaxRegion:
|
||||
- AdminTaxRegion
|
||||
- AdminTaxRate
|
||||
AdminInventoryLevel:
|
||||
- AdminInventoryItem
|
||||
theme:
|
||||
openapi:
|
||||
theme:
|
||||
|
||||
@@ -238,10 +238,13 @@ ${hint}
|
||||
`
|
||||
const redoclyConfigPath = path.join(basePath, "redocly", "redocly-config.yaml")
|
||||
const originalContent = await readYaml(redoclyConfigPath) as CircularReferenceConfig
|
||||
originalContent.decorators["medusa/circular-patch"].schemas = Object.assign(
|
||||
originalContent.decorators["medusa/circular-patch"].schemas,
|
||||
recommendation
|
||||
)
|
||||
Object.keys(recommendation).forEach((recKey) => {
|
||||
originalContent.decorators["medusa/circular-patch"].schemas[recKey] = [
|
||||
...originalContent.decorators["medusa/circular-patch"].schemas[recKey],
|
||||
...recommendation[recKey]
|
||||
]
|
||||
})
|
||||
|
||||
await writeYaml(redoclyConfigPath, jsonObjectToYamlString(originalContent))
|
||||
console.log(`🟡 Added the following unhandled circular references to redocly-config.ts:` + hintMessage)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user