langgenius/dify · error · Error
Duplicate console API path after FastOpenAPI merge: ${contra
Error message
Duplicate console API path after FastOpenAPI merge: ${contractPath} What it means
Error "Duplicate console API path after FastOpenAPI merge: ${contractPath}" thrown in langgenius/dify.
Source
Thrown at packages/contracts/openapi-ts.api.config.ts:282
const normalizeApiSwagger = (document: SwaggerDocument) => {
normalizeOpaqueContractResponses(document)
filterContractOperations(document)
addOperationIds(document)
return document
}
const mergeFastOpenApiConsoleSwagger = (document: SwaggerDocument) => {
const fastOpenApiDocument = readApiSwagger(fastOpenApiConsoleSpecFilename)
const targetPaths = (document.paths ??= {})
for (const [routePath, pathItem] of Object.entries(fastOpenApiDocument.paths ?? {})) {
const contractPath = routePath.startsWith(fastOpenApiConsolePathPrefix)
? routePath.slice(fastOpenApiConsolePathPrefix.length) || '/'
: routePath
if (targetPaths[contractPath])
throw new Error(`Duplicate console API path after FastOpenAPI merge: ${contractPath}`)
targetPaths[contractPath] = pathItem
}
const targetSchemas = getDocumentSchemas(document)
const sourceSchemas = getDocumentSchemas(fastOpenApiDocument)
for (const [schemaName, schema] of Object.entries(sourceSchemas)) {
if (targetSchemas[schemaName])
throw new Error(`Duplicate console API schema after FastOpenAPI merge: ${schemaName}`)
targetSchemas[schemaName] = schema
}
return document
}
const topLevelPathSegment = (routePath: string) => {
return routePath.split('/').filter(Boolean)[0] ?? 'root'View on GitHub (pinned to ef8544b173)
When it happens
Trigger: Thrown at packages/contracts/openapi-ts.api.config.ts:282 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/0933ae40a4b01568.
Report an issue: GitHub.