Bump kin-openapi and make changes to OpenAPI validation - #1764
Merged
Conversation
Signed-off-by: Daniel Raper <daniel.raper@kaleido.io>
Signed-off-by: Daniel Raper <daniel.raper@kaleido.io>
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
EnriqueL8
reviewed
Jul 27, 2026
EnriqueL8
left a comment
Contributor
There was a problem hiding this comment.
Thanks Dan, important thing to address
| // is still uniquely dispatched by its HTTP method. Any other validation | ||
| // finding still fails as normal. | ||
| func validateOpenAPIDoc(doc *openapi3.T) error { | ||
| err := doc.Validate(context.Background(), openapi3.EnableMultiError()) |
Contributor
There was a problem hiding this comment.
Multi Error allows the validate to return all errors individually
|
|
||
| var remaining openapi3.MultiError | ||
| for _, e := range multi { | ||
| var conflictErr *openapi3.ConflictingPathsError |
Contributor
There was a problem hiding this comment.
I don't think we want to ignore all of these for the future, if we introduce new APIs we want to not use Conflicting Paths. So we should ignore this error for existing APIs where we cannot break consumers
Signed-off-by: Daniel Raper <daniel.raper@kaleido.io>
EnriqueL8
approved these changes
Jul 27, 2026
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.
Bumps kin-openapi to fix a CVE. This new version enforces a stricter OpenAPI 3 spec check than before: two path templates with the same shape can't use different parameter names. This causes validation to fail on two pre-existing routes - PUT /apis/{id} vs GET/DELETE /apis/{apiName}, and GET /identities/{iid} vs GET /identities/{did}. Changes have been made to OpenAPI validation to allow this.