-
-
Notifications
You must be signed in to change notification settings - Fork 511
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
Type error: Type alias ‘XXX’ circularly references itself. #1987
Comments
Hello Guys, |
@bondars1995 are you able to create a failing test case? |
@mrlubos sure, I've create test stand for you, just clone repo and follow instructions |
@bondars95 thanks! How do you generate that OpenAPI spec? I am trying to understand what kind of types generate that output |
@mrlubos as mentioned in package.json |
@mrlubos and error is coming when compiling generated files with typescript |
@mrlubos did you have any chance to have a look into it? |
@bondars95 not yet, because it's not clear to me:
|
@mrlubos openapi spec created manually |
@bondars95 did it work on any of the previous versions? What result would you expect? |
@mrlubos I didn't check, but I suppose I will get same error, just wanted to check if it can be fixed somehow from your side. |
@bondars95 please refer to my earlier messages |
@mrlubos I've got your point here, we need type descriminator for generating java classes |
@mrlubos in my case let's say expected behaviour would be having PaymentMethod generated without having reference to CardPaymentMethod not to cause circular reference
it obviously can be achieved by removing discrimantor, but this causes other issues |
When generating typescript objects for such configuration getting error on lint check.
Command used for generation:
npx openapi-typescript-codegen --input ./generated/payment.yml --exportServices=false --exportCore=false
The text was updated successfully, but these errors were encountered: