-
-
Notifications
You must be signed in to change notification settings - Fork 1k
fix(deps): update module github.com/getkin/kin-openapi to v0.143.0 (go.mod) #2491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1329,6 +1329,15 @@ func pathItemSourceLine(pathItem *openapi3.PathItem) int { | |
| if pathItem == nil || pathItem.Origin == nil || pathItem.Origin.Key == nil { | ||
| return 0 | ||
| } | ||
| // kin-openapi >= v0.143.0 calls attachOriginToResolved for $ref-resolved | ||
| // path items, giving them an Origin from the *external* file rather than | ||
| // the base spec. Those line numbers are meaningless for base-spec | ||
| // declaration order, so treat them as unavailable (return 0), which lets | ||
| // the stable SortedMapKeys alphabetical order take over — matching the | ||
| // pre-v0.143.0 behaviour. | ||
| if pathItem.Ref != "" && !strings.HasPrefix(pathItem.Ref, "#") { | ||
| return 0 | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When a spec mixes inline paths with external path-item refs, this returns Knowledge Base Used: Codegen Pipeline Prompt To Fix With AIThis 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. |
||
| return pathItem.Origin.Key.Line | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.