We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The reason for this change: #850
openapi3filter/validate_request_test.go
We are waiting for the error minimum string length is 17, but there is no error.
minimum string length is 17
func TestValidateRequestInvalidStringLength(t *testing.T) { const spec = ` openapi: 3.0.0 info: title: 'Validator' version: 0.0.1 paths: /tech: post: requestBody: content: application/json: schema: type: object properties: vehicle: $ref: "#/components/schemas/Vehicle" responses: '200': description: Ok components: schemas: Vehicle: type: object properties: identifiers: type: object properties: vin: type: string minLength: 17 maxLength: 17 body: type: string minLength: 7 maxLength: 15 anyOf: - required: [ vin ] - required: [ body ] ` body := strings.NewReader(`{"vehicle":{"identifiers":{"vin":"BAD"}}}`) req, err := http.NewRequest(http.MethodPost, "/tech", body) require.NoError(t, err) req.Header.Add("Content-Type", "application/json") router := setupTestRouter(t, spec) route, pathParams, err := router.FindRoute(req) require.NoError(t, err) err = ValidateRequest(context.Background(), &RequestValidationInput{ Request: req, PathParams: pathParams, Route: route, QueryParams: req.URL.Query(), }) require.ErrorContains(t, err, "minimum string length is 17") }
Similar properties are similarly not validated. minLength is taken as an example.
minLength
The text was updated successfully, but these errors were encountered:
anyOf
allOf
oneOf
Successfully merging a pull request may close this issue.
The reason for this change: #850
Test case (add in
openapi3filter/validate_request_test.go
):We are waiting for the error
minimum string length is 17
, but there is no error.Similar properties are similarly not validated.
minLength
is taken as an example.The text was updated successfully, but these errors were encountered: