Skip to content

fix(gen): wrong package name on external types#1500

Merged
ernado merged 2 commits intoogen-go:mainfrom
viz-org:fix/wrong-package-name
Sep 16, 2025
Merged

fix(gen): wrong package name on external types#1500
ernado merged 2 commits intoogen-go:mainfrom
viz-org:fix/wrong-package-name

Conversation

@abemedia
Copy link
Contributor

@abemedia abemedia commented Jul 16, 2025

The external type was using the base of the package path as package name, thus generating broken code where the name of the package did not match that (e.g. versioned packages where the base is v2).

This PR fixes that by loading the actual package name while loading the type.

Closes #1495

@abemedia abemedia marked this pull request as ready for review July 16, 2025 17:49
@abemedia abemedia force-pushed the fix/wrong-package-name branch from c5c1b5b to da30dfc Compare July 16, 2025 17:54
@abemedia
Copy link
Contributor Author

@tdakkota friendly ping

@abemedia
Copy link
Contributor Author

@ernado @tdakkota @shadowspore any chance of getting this in?

@ernado ernado merged commit cb50471 into ogen-go:main Sep 16, 2025
15 checks passed
@abemedia abemedia deleted the fix/wrong-package-name branch September 17, 2025 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gen: module version is not taken into account in package name by x-ogen-type

2 participants