fix: change SwaggerGen to support multiple values with the same path#145
Merged
EnriqueL8 merged 3 commits intohyperledger:mainfrom Jul 3, 2025
Merged
fix: change SwaggerGen to support multiple values with the same path#145EnriqueL8 merged 3 commits intohyperledger:mainfrom
EnriqueL8 merged 3 commits intohyperledger:mainfrom
Conversation
Signed-off-by: dwertent <david.wertenteil@kaleido.io>
EnriqueL8
reviewed
Aug 16, 2024
Signed-off-by: dwertent <david.wertenteil@kaleido.io>
EnriqueL8
reviewed
Aug 16, 2024
Contributor
EnriqueL8
left a comment
There was a problem hiding this comment.
Just want to understand where normalising the path makes sense
| doc.Paths = &openapi3.Paths{} | ||
| } | ||
| pi := doc.Paths.Find(path) | ||
| pi := doc.Paths.Value(path) |
Contributor
There was a problem hiding this comment.
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
Contributor
Author
There was a problem hiding this comment.
Circling back to this issue, I tested it (back in the day) and it worked.
Contributor
|
@dwertent Could you take a look at this one so we can close it? |
Signed-off-by: David Wertenteil <david.wertenteil@kaleido.io>
EnriqueL8
approved these changes
Jul 2, 2025
Contributor
EnriqueL8
left a comment
There was a problem hiding this comment.
Looks good - we need to be careful when pulling this into other repos and make sure the changes are correct
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.