Closed collink closed 3 months ago
@7nohe @seriouslag I saw that there's a couple-week-old PR open for bumping the @hey-api/openapi-ts
version, but this one bumps it to the current version. I was able to build and generate correctly without any major changes (just some type-related tweaks). Thanks again for the lib!
@collink Sorry for the late reply. I would appreciate it if you could resolve the conflicts.
@collink Sorry for the late reply. I would appreciate it if you could resolve the conflicts.
@7nohe no problem! All done 😄
I noticed that after updating to 1.4.1, that enums were being spit out next to the types instead of namespaced like previously. After some digging, I found that this was a
@hey-api/openapi-ts
issue which was resolved this week with a PR and the release ofv0.52.0
.This PR does the following:
@hey-api/openapi-ts
fromv0.45.1
=>v0.52.0
ts-morph
fromv22.0.0
=>v23.0.0
typescript
fromv5.3.3
=>v5.5.4
Looks like a huge diff, but it's almost entirely
pnpm-lock.json
, which we can just leave if you like, or you could re-run so that maybe the diff is smaller?Why is this change important? The issue is that if you have enums defined in your OAPI YAML,
@hey-api/openapi-ts
(prior to v0.52.0) is depositing the TS enums directly next to the types, so you end up with enums that look like this:Before this change (and with this PR), that would look more like this:
It's SO much less ambiguous to be able to use
Job.status.DONE
in my code thanstatus6.DONE
. 😅