openapi-typescript-code-generator
openapi-typescript-code-generator copied to clipboard
Bug: complex remote reference is broken
Steps To Reproduce
Apply this patch: https://github.com/Himenon/openapi-typescript-code-generator/compare/%40himenon/openapi-typescript-code-generator%400.19.1...karupanerura:openapi-typescript-code-generator:test/add-broken-case
pnpm build
pnpm run test:code:gen
The current behavior
Generate Code : test/code/typedef-with-template/ref-access.ts
/Users/karupanerura/src/github.com/karupanerura/openapi-typescript-code-generator/src/internal/OpenApiTools/TypeNodeContext.ts:99
const findSchemaByPathArray = (
^
RangeError: Maximum call stack size exceeded
at findSchemaByPathArray (/Users/kenta.sato/src/github.com/karupanerura/openapi-typescript-code-generator/src/internal/OpenApiTools/TypeNodeContext.ts:99:33)
at findSchemaByPathArray (/Users/kenta.sato/src/github.com/karupanerura/openapi-typescript-code-generator/src/internal/OpenApiTools/TypeNodeContext.ts:105:14)
at findSchemaByPathArray (/Users/kenta.sato/src/github.com/karupanerura/openapi-typescript-code-generator/src/internal/OpenApiTools/TypeNodeContext.ts:105:14)
at findSchemaByPathArray (/Users/kenta.sato/src/github.com/karupanerura/openapi-typescript-code-generator/src/internal/OpenApiTools/TypeNodeContext.ts:105:14)
at findSchemaByPathArray (/Users/kenta.sato/src/github.com/karupanerura/openapi-typescript-code-generator/src/internal/OpenApiTools/TypeNodeContext.ts:105:14)
at findSchemaByPathArray (/Users/kenta.sato/src/github.com/karupanerura/openapi-typescript-code-generator/src/internal/OpenApiTools/TypeNodeContext.ts:105:14)
at findSchemaByPathArray (/Users/kenta.sato/src/github.com/karupanerura/openapi-typescript-code-generator/src/internal/OpenApiTools/TypeNodeContext.ts:105:14)
at findSchemaByPathArray (/Users/kenta.sato/src/github.com/karupanerura/openapi-typescript-code-generator/src/internal/OpenApiTools/TypeNodeContext.ts:105:14)
at findSchemaByPathArray (/Users/kenta.sato/src/github.com/karupanerura/openapi-typescript-code-generator/src/internal/OpenApiTools/TypeNodeContext.ts:105:14)
at findSchemaByPathArray (/Users/kenta.sato/src/github.com/karupanerura/openapi-typescript-code-generator/src/internal/OpenApiTools/TypeNodeContext.ts:105:14)
The expected behavior
Accept this reference.
Thanks for the bug report. It's going to take me a while longer to get this fixed as I haven't had a lot of time lately.
@karupanerura