Merge pull request #4567 from mvgmb/master

Add support for remote OpenAPI schema
This commit is contained in:
Kubernetes Prow Robot
2022-05-10 11:01:43 -07:00
committed by GitHub
3 changed files with 65 additions and 5 deletions

View File

@@ -6,7 +6,6 @@ package target
import (
"encoding/json"
"fmt"
"path/filepath"
"strings"
"github.com/pkg/errors"
@@ -481,9 +480,8 @@ func (kt *KustTarget) accumulateDirectory(
subKt.kustomization.BuildMetadata = kt.kustomization.BuildMetadata
subKt.origin = kt.origin
var bytes []byte
path := ldr.Root()
if openApiPath, exists := subKt.Kustomization().OpenAPI["path"]; exists {
bytes, err = ldr.Load(filepath.Join(path, openApiPath))
bytes, err = ldr.Load(openApiPath)
if err != nil {
return nil, err
}