You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using parameter validation, I encountered an issue where validation errors for earlier string-type fields in the parameters are being overwritten by the results of later field validations.
Upon reviewing the source code, I noticed that in the formatJsonSchemaValidationError method, the validationErrors object is reinitialized each time, which causes the validation errors in ValidateQueryParamsWithPathItem to be overwritten consistently.
I believe this could potentially be a bug.
The code I have questions about is located in the query_parameters.go file at line 121.
case helpers.String:
validationErrors = v.validateSimpleParam(sch, ef, ef, params[p])
And I think the correct logic is that:
case helpers.String:
validationErrors = append(validationErrors, v.validateSimpleParam(sch, ef, ef, params[p])...)
The text was updated successfully, but these errors were encountered:
version:github.com/pb33f/libopenapi-validator v0.1.0
When using parameter validation, I encountered an issue where validation errors for earlier string-type fields in the parameters are being overwritten by the results of later field validations.
Upon reviewing the source code, I noticed that in the
formatJsonSchemaValidationError
method, thevalidationErrors
object is reinitialized each time, which causes the validation errors inValidateQueryParamsWithPathItem
to be overwritten consistently.I believe this could potentially be a bug.
The code I have questions about is located in the query_parameters.go file at line 121.
And I think the correct logic is that:
The text was updated successfully, but these errors were encountered: