-
Notifications
You must be signed in to change notification settings - Fork 14
chore: Refactor SwaggerGen to support multiple values with the same path #145
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: dwertent <[email protected]>
Signed-off-by: dwertent <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just want to understand where normalising the path makes sense
@@ -116,7 +116,7 @@ func (sg *SwaggerGen) getPathItem(doc *openapi3.T, path string) *openapi3.PathIt | |||
if doc.Paths == nil { | |||
doc.Paths = &openapi3.Paths{} | |||
} | |||
pi := doc.Paths.Find(path) | |||
pi := doc.Paths.Value(path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just being careful with this, as it would affect all the swagger documents generated from now on
Is there a scenario where normalising does make sense? I tried to find the history in the kin-openapi
repo and it seems that it was there from the original commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, we can wait for a response here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circling back to this issue, I tested it (back in the day) and it worked.
@dwertent Could you take a look at this one so we can close it? |
Signed-off-by: David Wertenteil <[email protected]>
This PR offers an alternative solution to the issue addressed in this PR. Rather than modifying the API, we've adjusted the behavior of the Swagger generation to ensure the value is no longer ignored.