From 2cf30c3049d3c06864e57f0db5a13981386d71e8 Mon Sep 17 00:00:00 2001 From: Andreas Paul Date: Thu, 13 Jan 2022 11:57:24 +0100 Subject: [PATCH] fix recipe --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index abefc2f48..1a773fb1c 100644 --- a/README.md +++ b/README.md @@ -70,15 +70,16 @@ import ( "log" "net/http" + "github.com/getkin/kin-openapi/openapi3" "github.com/getkin/kin-openapi/openapi3filter" legacyrouter "github.com/getkin/kin-openapi/routers/legacy" ) func main() { ctx := context.Background() - loader := &openapi3.Loader{Context: ctx} + loader := openapi3.Loader{Context: ctx} doc, _ := loader.LoadFromFile("openapi3_spec.json") - _ := doc.Validate(ctx) + _ = doc.Validate(ctx) router, _ := legacyrouter.NewRouter(doc) httpReq, _ := http.NewRequest(http.MethodGet, "/items", nil)