Skip to content

Commit 6752ce2

Browse files
committed
Create an authenticated API example
This change creates a little program which shows how to perform JWT validation.
1 parent 53e6c3b commit 6752ce2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

oapi_validate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const UserDataKey = "oapi-codegen/user-data"
3434

3535
// This is an Echo middleware function which validates incoming HTTP requests
3636
// to make sure that they conform to the given OAPI 3.0 specification. When
37-
// OAPI validation failes on the request, we return an HTTP/400.
37+
// OAPI validation fails on the request, we return an HTTP/400.
3838

3939
// Create validator middleware from a YAML file path
4040
func OapiValidatorFromYamlFile(path string) (echo.MiddlewareFunc, error) {
@@ -88,7 +88,7 @@ func OapiRequestValidatorWithOptions(swagger *openapi3.T, options *Options) echo
8888
}
8989
}
9090

91-
// This function is called from the middleware above and actually does the work
91+
// ValidateRequestFromContext is called from the middleware above and actually does the work
9292
// of validating a request.
9393
func ValidateRequestFromContext(ctx echo.Context, router routers.Router, options *Options) error {
9494
req := ctx.Request()

0 commit comments

Comments
 (0)