diff --git a/provider/internal/java/provider.go b/provider/internal/java/provider.go index 0547fcdb..2b2535eb 100644 --- a/provider/internal/java/provider.go +++ b/provider/internal/java/provider.go @@ -112,10 +112,12 @@ func (p *javaProvider) Capabilities() []provider.Capability { caps = append(caps, refCap) } if p.hasMaven { - caps = append(caps, provider.Capability{ - Name: "dependency", - Input: openapi3.SchemaOrRef{}, - }) + depCap, err := provider.ToProviderCap(r, p.Log, provider.DependencyConditionCap{}, "dependency") + if err != nil { + p.Log.Error(err, "this is not goinag to be cool if it fails") + } else { + caps = append(caps, depCap) + } } return caps } diff --git a/provider/provider.go b/provider/provider.go index f9196931..2d2dbd50 100644 --- a/provider/provider.go +++ b/provider/provider.go @@ -528,15 +528,19 @@ func templateCondition(condition []byte, ctx map[string]engine.ChainTemplate) ([ return []byte(s), nil } -// TODO where should this go -type DependencyCondition struct { - Upperbound string - Lowerbound string - Name string +type DependencyConditionCap struct { + Upperbound string `json:"upperbound,omitempty"` + Lowerbound string `json:"lowerbound,omitempty"` + Name string `json:"name"` // NameRegex will be a valid go regex that will be used to // search the name of a given dependency. // Examples include kubernetes* or jakarta-.*-2.2. - NameRegex string + NameRegex string `json:"name_regex,omitempty"` +} + +// TODO where should this go +type DependencyCondition struct { + DependencyConditionCap Client Client }