fix(oas): handle new keys in circular reference patch (#9218)

Handle new keys in the circular references patch leading to undefined not being iterable error.
This commit is contained in:
Shahed Nasser
2024-09-22 15:44:23 +03:00
committed by GitHub
parent 6584e911e0
commit ba14d4341f

View File

@@ -240,7 +240,7 @@ ${hint}
const originalContent = await readYaml(redoclyConfigPath) as CircularReferenceConfig
Object.keys(recommendation).forEach((recKey) => {
originalContent.decorators["medusa/circular-patch"].schemas[recKey] = [
...originalContent.decorators["medusa/circular-patch"].schemas[recKey],
...(originalContent.decorators["medusa/circular-patch"].schemas[recKey] || []),
...recommendation[recKey]
]
})