feat(openapi3): ServerURLTemplateError cluster for server URL template failures#1174
Closed
reuvenharrison wants to merge 1 commit into
Closed
feat(openapi3): ServerURLTemplateError cluster for server URL template failures#1174reuvenharrison wants to merge 1 commit into
reuvenharrison wants to merge 1 commit into
Conversation
…e failures
Converts three server URL template sites:
- mismatched { and }
- undeclared variables (template/Variables count mismatch)
- undeclared variables (declared name not in URL template)
Contributor
Author
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.
Adds a
ServerURLTemplateErrorcluster covering the three server URL template failure sites inServer.Validate.server.go:208*ServerURLMismatchedBraces{and}count differserver.go:212*ServerURLUndeclaredVariablesServer.Variablescountserver.go:218*ServerURLUndeclaredVariablesThe two undeclared-variables sites share a leaf because they share their
Error()string and represent the same defect from a consumer's perspective.The cluster carries
URL stringso callers don't have to parse the message to recover the offending template.Backward compat
Every converted site preserves its original
Error()string byte-for-byte.Tests
TestValidationError_ServerURLTemplateLeavescovers all three sites end-to-end.