It seems that the API exported by golang-github-getkin-kin-openapi-devel changed out from under Hugo. the README.md from golang-github-getkin-kin-openapi-devel contains: Sub-v0 breaking API changes v0.61.0 * Renamed `openapi2.Swagger` to `openapi2.T`. * Renamed `openapi2conv.FromV3Swagger` to `openapi2conv.FromV3`. * Renamed `openapi2conv.ToV3Swagger` to `openapi2conv.ToV3`. * Renamed `openapi3.LoadSwaggerFromData` to `openapi3.LoadFromData`. * Renamed `openapi3.LoadSwaggerFromDataWithPath` to `openapi3.LoadFromDataWithPath`. * Renamed `openapi3.LoadSwaggerFromFile` to `openapi3.LoadFromFile`. * Renamed `openapi3.LoadSwaggerFromURI` to `openapi3.LoadFromURI`. * Renamed `openapi3.NewSwaggerLoader` to `openapi3.NewLoader`. * Renamed `openapi3.Swagger` to `openapi3.T`. * Renamed `openapi3.SwaggerLoader` to `openapi3.Loader`. * Renamed `openapi3filter.ValidationHandler.SwaggerFile` to `openapi3filter.ValidationHandler.File`. * Renamed `routers.Route.Swagger` to `routers.Route.Spec`. This adds a patch to make use of the new name T. Signed-off-by: W. Michael Petullo <mike@flyn.org>
38 lines
1.0 KiB
Diff
38 lines
1.0 KiB
Diff
diff -u --recursive hugo-0.80.0-vanilla/tpl/openapi/openapi3/openapi3.go hugo-0.80.0/tpl/openapi/openapi3/openapi3.go
|
|
--- hugo-0.80.0-vanilla/tpl/openapi/openapi3/openapi3.go 2020-12-31 07:36:35.000000000 -0600
|
|
+++ hugo-0.80.0/tpl/openapi/openapi3/openapi3.go 2021-09-29 16:23:36.914066659 -0500
|
|
@@ -48,7 +48,7 @@
|
|
deps *deps.Deps
|
|
}
|
|
|
|
-func (ns *Namespace) Unmarshal(r resource.UnmarshableResource) (*kopenapi3.Swagger, error) {
|
|
+func (ns *Namespace) Unmarshal(r resource.UnmarshableResource) (*kopenapi3.T, error) {
|
|
key := r.Key()
|
|
if key == "" {
|
|
return nil, errors.New("no Key set in Resource")
|
|
@@ -71,7 +71,7 @@
|
|
return nil, err
|
|
}
|
|
|
|
- s := &kopenapi3.Swagger{}
|
|
+ s := &kopenapi3.T{}
|
|
switch f {
|
|
case metadecoders.YAML:
|
|
err = gyaml.Unmarshal(b, s)
|
|
@@ -82,7 +82,7 @@
|
|
return nil, err
|
|
}
|
|
|
|
- err = kopenapi3.NewSwaggerLoader().ResolveRefsIn(s, nil)
|
|
+ err = kopenapi3.NewLoader().ResolveRefsIn(s, nil)
|
|
|
|
return s, err
|
|
})
|
|
@@ -90,5 +90,5 @@
|
|
return nil, err
|
|
}
|
|
|
|
- return v.(*kopenapi3.Swagger), nil
|
|
+ return v.(*kopenapi3.T), nil
|
|
}
|