Closed michael-valdron closed 1 year ago
Hrm, what commit are you running for the openapi generator? The code seems to still be there at HEAD:
Though it is possible that something has changed.
Switching generators generally involves major API changes which don't work for our library. We're in the midst of switching to typescript-fetch
anyway.
Hrm, what commit are you running for the openapi generator? The code seems to still be there at HEAD:
Though it is possible that something has changed.
We were running off of a3aef4de7a1d5dab72021aa282fffd8bc8a022ca
for a while now, since late 2021, but now we are trying to update to the latest commit, currently b32dcd6dc9c1c0c4fcf227c9539ae9ff0530b936
, to apply the fix for #236. This change is what produced the error in this issue.
Switching generators generally involves major API changes which don't work for our library. We're in the midst of switching to
typescript-fetch
anyway.
I did try to switch the script to use typescript-fetch.sh
but as of writing this script does not yet build our generated typescript classes successfully.
There should be two commits, one for this repo (which should be safe to update) and one for the openapi repo, e.g. this is our settings file for the main client:
https://github.com/kubernetes-client/javascript/blob/master/settings#L33
Admitedly I haven't regenerated in a while, so I should test that and make sure it's still working.
Thanks @brendandburns for your help! I did some further investigating using what you have provided me here and found the culprit to be the opposite of what I first thought.
It seems that before v5.x
of the openapi generator typescript
did not exist in the resources directory . The default revision in typescript.sh
is v4.0.3
which explains the build error I got.
Setting OPENAPI_GENERATOR_COMMIT
in our automation to the latest one with a change v6.3.0
seems to have worked for us.
Should there be a bump in the default revision within typescript.sh
since typescript
did not exist till v5.0.0
?
Glad you got it working! Yes, we'd gladly take a PR to bump the revision in typescript.sh so that someone doesn't hit this again in the future.
While working on a fix for devfile/api#1036 that includes the fix for #236, I came across the following error:
It seems that the name for
typescript
is missing from the generators list and possibly outdated. I have created a folk https://github.com/michael-valdron/kubernetes-client-gen/tree/ts-class-fix that changes the config class name fromtypescript
totypescript-node
, this seems to have worked in my use case.If this is an appropriate fix for this I can create a PR from this folk.