debian-forge-composer/vendor/github.com/speakeasy-api/openapi-overlay/pkg/loader/overlay.go
Sanne Raymaekers b2700903ae go.mod: bump github.com/getkin/kin-openapi to v0.131.0
As deepmap/oapi-codegen didn't work with this newer version, upgrade to
oapi-codegen/oapi-codegen v2.

Mitigating CVE-2025-30153
2025-03-26 11:13:14 +01:00

17 lines
388 B
Go

package loader
import (
"fmt"
"github.com/speakeasy-api/openapi-overlay/pkg/overlay"
)
// LoadOverlay is a tool for loading and parsing an overlay file from the file
// system.
func LoadOverlay(path string) (*overlay.Overlay, error) {
o, err := overlay.Parse(path)
if err != nil {
return nil, fmt.Errorf("failed to parse overlay from path %q: %w", path, err)
}
return o, nil
}