Skip to content

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

Merged
mromaszewicz merged 3 commits into
mainfrom
renovate/go.mod/github.com-getkin-kin-openapi-0.x
Jul 21, 2026
Merged

fix(deps): update module github.com/getkin/kin-openapi to v0.143.0 (go.mod)#2491
mromaszewicz merged 3 commits into
mainfrom
renovate/go.mod/github.com-getkin-kin-openapi-0.x

Conversation

@renovate

@renovate renovate Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
github.com/getkin/kin-openapi v0.142.0v0.143.0 age confidence

Release Notes

getkin/kin-openapi (github.com/getkin/kin-openapi)

v0.143.0

Compare Source

What's Changed

New Contributors

Full Changelog: getkin/kin-openapi@v0.142.0...v0.143.0


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested a review from a team as a code owner July 21, 2026 15:15
@renovate renovate Bot added the dependencies Pull requests that update a dependency file label Jul 21, 2026
@socket-security

socket-security Bot commented Jul 21, 2026

Copy link
Copy Markdown

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.142.0 ⏵ v0.143.074 +1100100100100

View full report

@greptile-apps

greptile-apps Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates the kin-openapi dependency and adjusts path ordering for resolved refs.

  • Bumps github.com/getkin/kin-openapi to v0.143.0 in the root, examples, and internal test modules.
  • Refreshes the matching module checksums.
  • Adds a guard for external $ref path-item origins in operation ordering.

Confidence Score: 4/5

This is close, but the route ordering fix should be adjusted before merging.

  • Mixed inline and external path items can still be emitted in a different registration order.
  • Overlapping generated routes can match a different handler when external refs sort ahead of inline paths.

pkg/codegen/operations.go

Important Files Changed

Filename Overview
pkg/codegen/operations.go Adds handling for external path-item origin metadata during operation ordering.
go.mod Updates the root module to kin-openapi v0.143.0.
examples/go.mod Updates the examples module to kin-openapi v0.143.0.
internal/test/go.mod Updates the internal test module to kin-openapi v0.143.0.
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
pkg/codegen/operations.go:1340
**Mixed order sentinel**

When a spec mixes inline paths with external path-item refs, this returns `0` only for the external paths while inline paths keep positive source-line values. The registration sort then places every external path before every inline path, rather than falling back to the stable alphabetical order described here. For overlapping routes, that can still change which generated handler matches first after the dependency update.

Reviews (2): Last reviewed commit: "Fix path ordering" | Re-trigger Greptile

Comment thread go.mod
kin-openapi v0.143.0 removed StringMap and introduced attachOriginToResolved,
which re-attaches Origins to $ref-resolved path items using the *external*
file's origin tree. pathItemSourceLine was therefore returning line numbers
from the external file rather than the base spec, producing a different (and
non-reproducible across external file layouts) handler registration order.

Detect external $ref path items (Ref != "" and not an internal "#/..." ref)
and return 0, restoring the stable SortedMapKeys alphabetical fallback that
matched pre-v0.143.0 behaviour.

Closes: N/A
@renovate

renovate Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@mromaszewicz
mromaszewicz enabled auto-merge (squash) July 21, 2026 23:54
Comment thread pkg/codegen/operations.go
// pre-v0.143.0 behaviour.
if pathItem.Ref != "" && !strings.HasPrefix(pathItem.Ref, "#") {
return 0
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Mixed order sentinel

When a spec mixes inline paths with external path-item refs, this returns 0 only for the external paths while inline paths keep positive source-line values. The registration sort then places every external path before every inline path, rather than falling back to the stable alphabetical order described here. For overlapping routes, that can still change which generated handler matches first after the dependency update.

Knowledge Base Used: Codegen Pipeline

Prompt To Fix With AI
This is a comment left during a code review.
Path: pkg/codegen/operations.go
Line: 1340

Comment:
**Mixed order sentinel**

When a spec mixes inline paths with external path-item refs, this returns `0` only for the external paths while inline paths keep positive source-line values. The registration sort then places every external path before every inline path, rather than falling back to the stable alphabetical order described here. For overlapping routes, that can still change which generated handler matches first after the dependency update.

**Knowledge Base Used:** [Codegen Pipeline](https://app.greptile.com/oapi-codegen/-/custom-context/knowledge-base/oapi-codegen/oapi-codegen/-/docs/codegen-pipeline.md)

How can I resolve this? If you propose a fix, please make it concise.

@mromaszewicz
mromaszewicz merged commit d31f05b into main Jul 21, 2026
28 checks passed
@mromaszewicz
mromaszewicz deleted the renovate/go.mod/github.com-getkin-kin-openapi-0.x branch July 21, 2026 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant