Skip to content

Commit b23f474

Browse files
steve-r-westdaveshanley
authored andcommitted
fix: correct small typos
1 parent af33dbb commit b23f474

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

errors/response_errors.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func ResponseCodeNotFound(op *v3.Operation, request *http.Request, code int) *Va
6464
ValidationSubType: helpers.ResponseBodyResponseCode,
6565
Message: fmt.Sprintf("%s operation request response code '%d' does not exist",
6666
request.Method, code),
67-
Reason: fmt.Sprintf("The reponse code '%d' of the %s request submitted has not "+
67+
Reason: fmt.Sprintf("The response code '%d' of the %s request submitted has not "+
6868
"been defined, it's an unknown type", code, request.Method),
6969
SpecLine: op.GoLow().Responses.KeyNode.Line,
7070
SpecCol: op.GoLow().Responses.KeyNode.Column,

errors/response_errors_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func TestResponseCodeNotFound(t *testing.T) {
154154
require.Equal(t, helpers.ResponseBodyValidation, err.ValidationType)
155155
require.Equal(t, helpers.ResponseBodyResponseCode, err.ValidationSubType)
156156
require.Contains(t, err.Message, "response code '404' does not exist")
157-
require.Contains(t, err.Reason, "The reponse code '404' of the DELETE request submitted has not been defined")
157+
require.Contains(t, err.Reason, "The response code '404' of the DELETE request submitted has not been defined")
158158
require.Equal(t, 22, err.SpecLine)
159159
require.Equal(t, 56, err.SpecCol)
160160
require.Equal(t, HowToFixInvalidResponseCode, err.HowToFix)

parameters/path_parameters_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1416,7 +1416,7 @@ paths:
14161416
assert.Len(t, errors, 0)
14171417
}
14181418

1419-
func TestNewValidator_MandatorydPathSegmentEmpty(t *testing.T) {
1419+
func TestNewValidator_MandatoryPathSegmentEmpty(t *testing.T) {
14201420
spec := `openapi: 3.1.0
14211421
servers:
14221422
- url: https://api.pb33f.io

schema_validation/validate_document_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func TestValidateDocument_Invalid31(t *testing.T) {
4848
assert.Len(t, errors[0].SchemaValidationErrors, 6)
4949
}
5050

51-
func TestValidateSchema_ValidateLicenseIndentifier(t *testing.T) {
51+
func TestValidateSchema_ValidateLicenseIdentifier(t *testing.T) {
5252
spec := `openapi: 3.1.0
5353
info:
5454
version: 1.0.0

validator.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,20 @@ type Validator interface {
3030
// ValidateHttpRequest will validate an *http.Request object against an OpenAPI 3+ document.
3131
// The path, query, cookie and header parameters and request body are validated.
3232
ValidateHttpRequest(request *http.Request) (bool, []*errors.ValidationError)
33-
// ValidateHttpRequestSync will validate an *http.Request object against an OpenAPI 3+ document syncronously and without spawning any goroutines.
33+
// ValidateHttpRequestSync will validate an *http.Request object against an OpenAPI 3+ document synchronously and without spawning any goroutines.
3434
// The path, query, cookie and header parameters and request body are validated.
3535
ValidateHttpRequestSync(request *http.Request) (bool, []*errors.ValidationError)
3636

3737
// ValidateHttpRequestWithPathItem will validate an *http.Request object against an OpenAPI 3+ document.
3838
// The path, query, cookie and header parameters and request body are validated.
3939
ValidateHttpRequestWithPathItem(request *http.Request, pathItem *v3.PathItem, pathValue string) (bool, []*errors.ValidationError)
4040

41-
// ValidateHttpRequestSyncWithPathItem will validate an *http.Request object against an OpenAPI 3+ document syncronously and without spawning any goroutines.
41+
// ValidateHttpRequestSyncWithPathItem will validate an *http.Request object against an OpenAPI 3+ document synchronously and without spawning any goroutines.
4242
// The path, query, cookie and header parameters and request body are validated.
4343
ValidateHttpRequestSyncWithPathItem(request *http.Request, pathItem *v3.PathItem, pathValue string) (bool, []*errors.ValidationError)
4444

4545
// ValidateHttpResponse will an *http.Response object against an OpenAPI 3+ document.
46-
// The response body is validated. The request is only used to extract the correct reponse from the spec.
46+
// The response body is validated. The request is only used to extract the correct response from the spec.
4747
ValidateHttpResponse(request *http.Request, response *http.Response) (bool, []*errors.ValidationError)
4848

4949
// ValidateHttpRequestResponse will validate both the *http.Request and *http.Response objects against an OpenAPI 3+ document.

0 commit comments

Comments
 (0)