The openapi3.Unmarshal function is currently not working.
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.
Here is a barebones example repo using the OpenAPI-Specification example API definition (the URL in Hugo’s docs is out of date) and the code examples in Hugo’s docs:
Running hugo server gives the error:
execute of template failed at <$api.Paths>: range can’t iterate over {map[] <nil> map[/pets:0xc000f8b8c0 /pets/{petId}:0xc000f8ba40]}
I ran into the same error when trying to work with other OpenAPI v3 definitions.