Skip to content

Commit

Permalink
Update agbot secure api swagger
Browse files Browse the repository at this point in the history
Signed-off-by: Le Zhang <[email protected]>
  • Loading branch information
LiilyZhang committed Oct 23, 2023
1 parent 17512f7 commit aa35979
Show file tree
Hide file tree
Showing 18 changed files with 620 additions and 552 deletions.
369 changes: 119 additions & 250 deletions agreementbot/secure_api.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions businesspolicy/business_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func (w BusinessPolicy) String() string {
w.SecretBinding)
}

// swagger:model
type ServiceRef struct {
Name string `json:"name"` // refers to a service definition in the exchange
Org string `json:"org,omitempty"` // the org holding the service definition
Expand Down
2 changes: 2 additions & 0 deletions common/pattern_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/open-horizon/anax/policy"
)

// swagger:model
type AbstractPatternFile interface {
GetOrg() string
GetServices() []exchange.ServiceReference
Expand Down Expand Up @@ -92,6 +93,7 @@ func (p *PatternFile) GetClusterNamespace() string {
return p.ClusterNamespace
}

// swagger:model
type ServiceReferenceFile struct {
ServiceURL string `json:"serviceUrl"` // refers to a service definition in the exchange
ServiceOrg string `json:"serviceOrgid"` // the org holding the service definition
Expand Down
1 change: 1 addition & 0 deletions common/service_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"golang.org/x/text/message"
)

// swagger:model
type AbstractServiceFile interface {
GetOrg() string
GetURL() string
Expand Down
2 changes: 2 additions & 0 deletions compcheck/comp_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func NewCompCheckError(err error, errCode int) *CompCheckError {
}

// The input format for the comptible check
// swagger:model
type CompCheck struct {
NodeId string `json:"node_id,omitempty"`
NodeArch string `json:"node_arch,omitempty"`
Expand Down Expand Up @@ -164,6 +165,7 @@ func NewCompCheckOutput(compatible bool, reason map[string]string, input *CompCh
}

// To store the resource (pattern, bp, services etc) used for compatibility check
// swagger:model
type CompCheckResource struct {
NodeId string `json:"node_id,omitempty"`
NodeArch string `json:"node_arch,omitempty"`
Expand Down
1 change: 1 addition & 0 deletions compcheck/policy_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
)

// The input format for the policy check
// swagger:model
type PolicyCheck struct {
NodeId string `json:"node_id,omitempty"`
NodeArch string `json:"node_arch,omitempty"`
Expand Down
1 change: 1 addition & 0 deletions compcheck/secretbinding_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
)

// The input format for the userinput check
// swagger:model
type SecretBindingCheck struct {
NodeId string `json:"node_id,omitempty"`
NodeArch string `json:"node_arch,omitempty"`
Expand Down
1 change: 1 addition & 0 deletions compcheck/userinput_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
)

// The input format for the userinput check
// swagger:model
type UserInputCheck struct {
NodeId string `json:"node_id,omitempty"`
NodeArch string `json:"node_arch,omitempty"`
Expand Down
Loading

0 comments on commit aa35979

Please sign in to comment.