Skip to content

fix(deps): update module github.com/getkin/kin-openapi to v0.134.0 (go.mod)#2295

Merged
jamietanna merged 3 commits intooapi-codegen:mainfrom
ilia-rassadin-rn:fix/kin-openapi-0.134-mapping-ref-type
Mar 18, 2026
Merged

fix(deps): update module github.com/getkin/kin-openapi to v0.134.0 (go.mod)#2295
jamietanna merged 3 commits intooapi-codegen:mainfrom
ilia-rassadin-rn:fix/kin-openapi-0.134-mapping-ref-type

Conversation

@ilia-rassadin-rn
Copy link
Copy Markdown
Contributor

In kin-openapi v0.134.0, Discriminator.Mapping changed from map[string]string to StringMap[MappingRef], where MappingRef is type MappingRef SchemaRef (a struct with a Ref string field). See getkin/kin-openapi#1108

This caused a compile error in generateUnion where v (MappingRef) was compared directly against element.Ref (string). Fix by comparing v.Ref instead.

Bump kin-openapi dependency to v0.134.0.

In kin-openapi v0.134.0, Discriminator.Mapping changed from
map[string]string to StringMap[MappingRef], where MappingRef is
type MappingRef SchemaRef (a struct with a Ref string field).

This caused a compile error in generateUnion where v (MappingRef) was
compared directly against element.Ref (string). Fix by comparing
v.Ref instead.

Bump kin-openapi dependency to v0.134.0.
@ilia-rassadin-rn ilia-rassadin-rn requested a review from a team as a code owner March 16, 2026 11:25
@socket-security
Copy link
Copy Markdown

socket-security bot commented Mar 16, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgithub.com/​getkin/​kin-openapi@​v0.133.0 ⏵ v0.134.074 +1100100100100

View full report

@corani
Copy link
Copy Markdown
Contributor

corani commented Mar 18, 2026

This would fix #2292, which is currently blocking us from upgrading github.com/getkin/kin-openapi to v0.134.0 in our projects. A patch release for oapi-codegen containing this change would be highly appreciated!

@jamietanna
Copy link
Copy Markdown
Member

Please can you make sure you've updated all the references?

Replaces #2292

@jamietanna
Copy link
Copy Markdown
Member

We likely won't do a patch release due to changes already on main, but it'll be possible for folks to pin to main's commits until the next release

@jamietanna jamietanna changed the title fix: support kin-openapi v0.134.0 MappingRef type change fix(deps): update module github.com/getkin/kin-openapi to v0.134.0 (go.mod) Mar 18, 2026
@jamietanna jamietanna enabled auto-merge (squash) March 18, 2026 12:36
@jamietanna jamietanna merged commit 00a90b7 into oapi-codegen:main Mar 18, 2026
17 checks passed
@ilia-rassadin-rn
Copy link
Copy Markdown
Contributor Author

Thanks!

@sonasingh46
Copy link
Copy Markdown
Contributor

Thank you for the fix. Just hit this issue and reached here.

@corani
Copy link
Copy Markdown
Contributor

corani commented Mar 20, 2026

We likely won't do a patch release due to changes already on main, but it'll be possible for folks to pin to main's commits until the next release

Do you have any idea when the next release would be?

@jamietanna
Copy link
Copy Markdown
Member

No plans - companies sponsoring us to be able to put more time towards a release schedule would be appreciated!

https://github.com/oapi-codegen/oapi-codegen?tab=readme-ov-file#pinning-to-commits

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.

4 participants