Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: complex remote reference is broken #90

Open
karupanerura opened this issue Nov 9, 2022 · 1 comment · May be fixed by #113
Open

Bug: complex remote reference is broken #90

karupanerura opened this issue Nov 9, 2022 · 1 comment · May be fixed by #113
Labels
Type: Bug Something isn't working

Comments

@karupanerura
Copy link
Contributor

karupanerura commented Nov 9, 2022

Steps To Reproduce

Apply this patch: @himenon/[email protected]: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.

@karupanerura karupanerura added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Nov 9, 2022
@karupanerura karupanerura changed the title Bug: Bug: complex remote reference is broken Nov 9, 2022
@Himenon Himenon removed the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Nov 15, 2022
@Himenon
Copy link
Owner

Himenon commented Nov 15, 2022

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

@Himenon Himenon added the Type: Bug Something isn't working label Nov 15, 2022
@Himenon Himenon linked a pull request Jun 23, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants