langgenius/dify · error · Error
Invalid enterprise OpenAPI document: ${enterpriseOpenApiPath
Error message
Invalid enterprise OpenAPI document: ${enterpriseOpenApiPath} What it means
Error "Invalid enterprise OpenAPI document: ${enterpriseOpenApiPath}" thrown in langgenius/dify.
Source
Thrown at packages/contracts/openapi-ts.enterprise.config.ts:270
if (!isOpenApiSchema(propertySchema)) return
promoteInlineEnumSchema(
schemas,
schemaName,
properties,
propertyName,
propertySchema,
valuesToSchemaKey,
)
})
})
}
const normalizeEnterpriseOpenApi = () => {
const openApi = loadOpenApiYaml(fs.readFileSync(enterpriseOpenApiPath, 'utf8'))
if (!openApi || typeof openApi !== 'object' || Array.isArray(openApi))
throw new Error(`Invalid enterprise OpenAPI document: ${enterpriseOpenApiPath}`)
const document = openApi as OpenApiDocument
const paths = document.paths ?? {}
document.paths = Object.fromEntries(
Object.entries(paths)
.filter(([routePath]) => isConsoleApiPath(routePath))
.map(([routePath, pathItem]) => {
if (!isObject(pathItem)) return [stripConsoleApiPrefix(routePath), pathItem]
return [stripConsoleApiPrefix(routePath), stripSchemaLessResponseOperations(pathItem)]
})
.filter(([, pathItem]) => !isObject(pathItem) || Object.keys(pathItem).length > 0),
)
promoteReusableEnumSchemasForHeyApi(document)
return documentView on GitHub (pinned to ef8544b173)
When it happens
Trigger: Thrown at packages/contracts/openapi-ts.enterprise.config.ts:270 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of langgenius/dify@ef8544b173 (2026-08-12).
Data as JSON: /api/errors/bf706f6c13e5d0d2.
Report an issue: GitHub.