Skip to content

Commit 89a8d5b

Browse files
authored
Merge pull request #4427 from LiilyZhang/zhangl/updateAgbotSwagger
Update swagger doc for agbot secure api
2 parents 2a6eecc + 69938bb commit 89a8d5b

File tree

12 files changed

+129
-572
lines changed

12 files changed

+129
-572
lines changed

agreementbot/secrets/secrets.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type AgbotSecrets interface {
5353
GetSecretMetadata(secretOrg, secretUser, secretNode, secretName string) (SecretMetadata, error)
5454
}
5555

56-
// SecretDetails The key value pair of one secret
56+
// SecretDetails The key value pair of one secret.
5757
// swagger:model SecretDetails
5858
type SecretDetails struct {
5959
// Key is the name of the secret

agreementbot/secure_api.go

Lines changed: 55 additions & 238 deletions
Large diffs are not rendered by default.

businesspolicy/business_policy.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313
const DEFAULT_MAX_AGREEMENT = 0
1414

1515
// BusinessPolicy the business policy
16-
// swagger:model
1716
type BusinessPolicy struct {
1817
Owner string `json:"owner,omitempty"`
1918
Label string `json:"label"`

common/pattern_file.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ type AbstractPatternFile interface {
1818
// PatternFile An implementation of AbstractPatternFile.
1919
//
2020
// It is used when reading json file the user gives us as an input to create the pattern
21-
// swagger:model
2221
type PatternFile struct {
2322
Name string `json:"name,omitempty"`
2423
Org string `json:"org,omitempty"` // optional

common/service_file.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ type AbstractServiceFile interface {
2727
// ServiceFile An implementation of AbstractServiceFile
2828
//
2929
// It is used when reading json file the user gives us as input to create the service
30-
// swagger:model
3130
type ServiceFile struct {
3231
Org string `json:"org"` // optional
3332
Label string `json:"label"`

compcheck/comp_check.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ func NewCompCheckError(err error, errCode int) *CompCheckError {
6060
}
6161
}
6262

63-
// The input format for the comptible check
63+
// The input format for the compatibility check.
64+
// swagger:model
6465
type CompCheck struct {
6566
NodeId string `json:"node_id,omitempty"`
6667
NodeArch string `json:"node_arch,omitempty"`
@@ -141,7 +142,7 @@ func (p *CompCheck) UnmarshalJSON(b []byte) error {
141142
return nil
142143
}
143144

144-
// CompCheckOutput The output format for the compatibility check
145+
// The output format for the compatibility check.
145146
// swagger:model
146147
type CompCheckOutput struct {
147148
Compatible bool `json:"compatible"`

compcheck/policy_check.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ import (
1616
"golang.org/x/text/message"
1717
)
1818

19-
// The input format for the policy check
19+
// The input format for the policy check.
20+
// swagger:model
2021
type PolicyCheck struct {
2122
NodeId string `json:"node_id,omitempty"`
2223
NodeArch string `json:"node_arch,omitempty"`

compcheck/secretbinding_check.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ import (
1515
"strings"
1616
)
1717

18-
// The input format for the userinput check
18+
// The input format for the secret binding check.
19+
// swagger:model
1920
type SecretBindingCheck struct {
2021
NodeId string `json:"node_id,omitempty"`
2122
NodeArch string `json:"node_arch,omitempty"`

compcheck/userinput_check.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ import (
1515
"strings"
1616
)
1717

18-
// The input format for the userinput check
18+
// The input format for the userinput check.
19+
// swagger:model
1920
type UserInputCheck struct {
2021
NodeId string `json:"node_id,omitempty"`
2122
NodeArch string `json:"node_arch,omitempty"`

0 commit comments

Comments
 (0)