mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +00:00
Correct comment block from openapi_v2.NewDocument to openapi_v2.ParseDocument
This commit is contained in:
parent
c691386fef
commit
97031da5e2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user