Open eliw00d opened 1 year ago
I found https://github.com/OpenAPITools/openapi-generator/issues/14611 which pointed out that the instanceOf errors would go away by downgrading to 6.0.0. I tried that and it does get rid of those errors, but I am still left with the spread types errors.
I also downgraded to 5.4.0 and no longer see this issues, so at least there is a workaround.
@eliw00d I think I have a fix for this on this PR: https://github.com/OpenAPITools/openapi-generator/pull/18154.
Can you test using that branch to see if your problem is fixed?
@eliw00d I think I have a fix for this on this PR: #18154.
Can you test using that branch to see if your problem is fixed?
I tried building from your branch but got:
Failed to execute goal org.fortasoft:gradle-maven-plugin:1.0.8:invoke (default) on project openapi-generator-gradle-plugin-mvn-wrapper: org.gradle.tooling.BuildException: Could not execute build using Gradle distribution 'https://services.gradle.org/distributions/gradle-4.7-bin.zip'
Which, according to the docs, there is no solution for.
Bug Report Checklist
Description
My CLI:
My Schema:
Error that happens because certain files are expecting to use
instanceOfMyEnum
- which does not exist:Error that happens because certain files are expecting to spread the result of
MyEnumFromJSONTyped(json, true)
:openapi-generator version
TS2305 errors occur on: >=6.1.0 TS2698 errors occur on >=6.0.0
Neither occur on 5.4.0.
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Related issues/PRs
Suggest a fix