From 97031da5e298eabc49d39b92e3dcdebebd45e111 Mon Sep 17 00:00:00 2001 From: Mohamed chiheb Ben jemaa Date: Sun, 13 Jun 2021 18:03:09 +0100 Subject: [PATCH] Correct comment block from openapi_v2.NewDocument to openapi_v2.ParseDocument --- .../cmd/applyconfiguration-gen/generators/openapi.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staging/src/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/openapi.go b/staging/src/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/openapi.go index 46f659036be..9a12d0587fe 100644 --- a/staging/src/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/openapi.go +++ b/staging/src/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/openapi.go @@ -98,7 +98,7 @@ var emptyModels = &typeModels{ } func toValidatedModels(openAPISchema *spec.Swagger) (utilproto.Models, error) { - // openapi_v2.NewDocument only accepts a yaml.MapSlice + // openapi_v2.ParseDocument only accepts a []byte of the JSON or YAML file to be parsed. // so we do an inefficient marshal back to json and then read it back in as yaml // but get the benefit of running the models through utilproto.NewOpenAPIData to // validate all the references between types