hugo icon indicating copy to clipboard operation
hugo copied to clipboard

Support loading external files in OpenAPI

Open mwaterous opened this issue 4 years ago • 10 comments

Regarding the updates made in 0.74.0: https://gohugo.io/news/0.74.0-relnotes/

The current implementation doesn't appear to allow isExternalRefsAllowed to be configured anywhere and it is false by default. This causes any attempt to unmarshal an openapi spec using external references to fail: https://github.com/getkin/kin-openapi/blob/9b9280d707773bb764ec07ac7363248d8240343d/openapi3/swagger_loader.go#L67

This could be a really fantastic feature for some of us building documentation sites in Hugo based on the OpenAPI spec, but due to the above, it's at present only useful for smaller and non-complex openapi specifications.

Could this either be set to true by default when initializing the kin-openapi library, or could this be designed so that we can set it to true in config.toml or somewhere else that makes sense?

mwaterous avatar Dec 17 '20 16:12 mwaterous