The initial unmarshal seems to load the OpenAPI definition (it’s visible with debug.Dump), but attempting to iterate over the resulting data structure fails.
This worked prior to Hugo v0.121.0. The release notes for Hugo v0.121.0 state:
kin-openapi v0.122.0 has some minor breaking API changes which, from Hugo’s side of it, can be adapted by using the new .Map accessors if you get an error.
From the kin-openapi release notes (the link above):
openapi3.Paths went from map[string]*PathItem to a struct with an Extensions field and methods: Set, Value, Len, Map, and New*.