@@ -14,20 +14,20 @@ import (
14
14
logutil "kusionstack.io/kusion/pkg/server/util/logging"
15
15
)
16
16
17
- // @Id createVariable
18
- // @Summary Create variable
19
- // @Description Create a new variable
20
- // @Tags variable
21
- // @Accept json
22
- // @Produce json
23
- // @Param variable body request.CreateVariableSetRequest true "Created variable"
24
- // @Success 200 {object} entity.Variable "Success"
25
- // @Failure 400 {object} error "Bad Request"
26
- // @Failure 401 {object} error "Unauthorized"
27
- // @Failure 429 {object} error "Too Many Requests"
28
- // @Failure 404 {object} error "Not Found"
29
- // @Failure 500 {object} error "Internal Server Error"
30
- // @Router /api/v1/variables [post]
17
+ // @Id createVariable
18
+ // @Summary Create variable
19
+ // @Description Create a new variable
20
+ // @Tags variable
21
+ // @Accept json
22
+ // @Produce json
23
+ // @Param variable body request.CreateVariableSetRequest true "Created variable"
24
+ // @Success 200 {object} entity.Variable "Success"
25
+ // @Failure 400 {object} error "Bad Request"
26
+ // @Failure 401 {object} error "Unauthorized"
27
+ // @Failure 429 {object} error "Too Many Requests"
28
+ // @Failure 404 {object} error "Not Found"
29
+ // @Failure 500 {object} error "Internal Server Error"
30
+ // @Router /api/v1/variables [post]
31
31
func (h * Handler ) CreateVariable () http.HandlerFunc {
32
32
return func (w http.ResponseWriter , r * http.Request ) {
33
33
// Getting stuff from context.
@@ -48,19 +48,19 @@ func (h *Handler) CreateVariable() http.HandlerFunc {
48
48
}
49
49
}
50
50
51
- // @Id deleteVariable
52
- // @Summary Delete variable
53
- // @Description Delete a specified variable with fqn
54
- // @Tags variable
55
- // @Produce json
56
- // @Param fqn path string true "Variable Fqn"
57
- // @Success 200 {object} string "Success"
58
- // @Failure 400 {object} error "Bad Request"
59
- // @Failure 401 {object} error "Unauthorized"
60
- // @Failure 429 {object} error "Too Many Requests"
61
- // @Failure 404 {object} error "Not Found"
62
- // @Failure 500 {object} error "Internal Server Error"
63
- // @Router /api/v1/variables/{fqn} [delete]
51
+ // @Id deleteVariable
52
+ // @Summary Delete variable
53
+ // @Description Delete a specified variable with fqn
54
+ // @Tags variable
55
+ // @Produce json
56
+ // @Param fqn path string true "Variable Fqn"
57
+ // @Success 200 {object} string "Success"
58
+ // @Failure 400 {object} error "Bad Request"
59
+ // @Failure 401 {object} error "Unauthorized"
60
+ // @Failure 429 {object} error "Too Many Requests"
61
+ // @Failure 404 {object} error "Not Found"
62
+ // @Failure 500 {object} error "Internal Server Error"
63
+ // @Router /api/v1/variables/{fqn} [delete]
64
64
func (h * Handler ) DeleteVariable () http.HandlerFunc {
65
65
return func (w http.ResponseWriter , r * http.Request ) {
66
66
// Getting stuff from context.
@@ -76,21 +76,21 @@ func (h *Handler) DeleteVariable() http.HandlerFunc {
76
76
}
77
77
}
78
78
79
- // @Id updateVariable
80
- // @Summary Update variable
81
- // @Description Update the specified variable
82
- // @Tags variable
83
- // @Accept json
84
- // @Produce json
85
- // @Param fqn path string true "Variable Fqn"
86
- // @Param variable body request.UpdateVariableRequest true "Updated Variable"
87
- // @Success 200 {object} entity.Variable "Success"
88
- // @Failure 400 {object} error "Bad Request"
89
- // @Failure 401 {object} error "Unauthorized"
90
- // @Failure 429 {object} error "Too Many Requests"
91
- // @Failure 404 {object} error "Not Found"
92
- // @Failure 500 {object} error "Internal Server Error"
93
- // @Router /api/v1/variables/{fqn} [put]
79
+ // @Id updateVariable
80
+ // @Summary Update variable
81
+ // @Description Update the specified variable
82
+ // @Tags variable
83
+ // @Accept json
84
+ // @Produce json
85
+ // @Param fqn path string true "Variable Fqn"
86
+ // @Param variable body request.UpdateVariableRequest true "Updated Variable"
87
+ // @Success 200 {object} entity.Variable "Success"
88
+ // @Failure 400 {object} error "Bad Request"
89
+ // @Failure 401 {object} error "Unauthorized"
90
+ // @Failure 429 {object} error "Too Many Requests"
91
+ // @Failure 404 {object} error "Not Found"
92
+ // @Failure 500 {object} error "Internal Server Error"
93
+ // @Router /api/v1/variables/{fqn} [put]
94
94
func (h * Handler ) UpdateVariable () http.HandlerFunc {
95
95
return func (w http.ResponseWriter , r * http.Request ) {
96
96
// Getting stuff from context.
@@ -114,19 +114,19 @@ func (h *Handler) UpdateVariable() http.HandlerFunc {
114
114
}
115
115
}
116
116
117
- // @Id getVariable
118
- // @Summary Get variable
119
- // @Description Get variable by variable fqn
120
- // @Tags variable
121
- // @Produce json
122
- // @Param fqn path string true "Variable Fqn"
123
- // @Success 200 {object} entity.Variable "Success"
124
- // @Failure 400 {object} error "Bad Request"
125
- // @Failure 401 {object} error "Unauthorized"
126
- // @Failure 429 {object} error "Too Many Requests"
127
- // @Failure 404 {object} error "Not Found"
128
- // @Failure 500 {object} error "Internal Server Error"
129
- // @Router /api/v1/variables/{fqn} [get]
117
+ // @Id getVariable
118
+ // @Summary Get variable
119
+ // @Description Get variable by variable fqn
120
+ // @Tags variable
121
+ // @Produce json
122
+ // @Param fqn path string true "Variable Fqn"
123
+ // @Success 200 {object} entity.Variable "Success"
124
+ // @Failure 400 {object} error "Bad Request"
125
+ // @Failure 401 {object} error "Unauthorized"
126
+ // @Failure 429 {object} error "Too Many Requests"
127
+ // @Failure 404 {object} error "Not Found"
128
+ // @Failure 500 {object} error "Internal Server Error"
129
+ // @Router /api/v1/variables/{fqn} [get]
130
130
func (h * Handler ) GetVariable () http.HandlerFunc {
131
131
return func (w http.ResponseWriter , r * http.Request ) {
132
132
// Getting stuff from context.
@@ -142,19 +142,19 @@ func (h *Handler) GetVariable() http.HandlerFunc {
142
142
}
143
143
}
144
144
145
- // @Id listVariables
146
- // @Summary List variables
147
- // @Description List variables
148
- // @Tags variable
149
- // @Produce json
150
- // @Param variable body request.ListVariableSetRequest true "Variable labels to filter variables by."
151
- // @Success 200 {object} entity.VariableLabelsListResult "Success"
152
- // @Failure 400 {object} error "Bad Request"
153
- // @Failure 401 {object} error "Unauthorized"
154
- // @Failure 429 {object} error "Too Many Requests"
155
- // @Failure 404 {object} error "Not Found"
156
- // @Failure 500 {object} error "Internal Server Error"
157
- // @Router /api/v1/variables [get]
145
+ // @Id listVariables
146
+ // @Summary List variables
147
+ // @Description List variables
148
+ // @Tags variable
149
+ // @Produce json
150
+ // @Param variable body request.ListVariableSetRequest true "Variable labels to filter variables by."
151
+ // @Success 200 {object} entity.VariableLabelsListResult "Success"
152
+ // @Failure 400 {object} error "Bad Request"
153
+ // @Failure 401 {object} error "Unauthorized"
154
+ // @Failure 429 {object} error "Too Many Requests"
155
+ // @Failure 404 {object} error "Not Found"
156
+ // @Failure 500 {object} error "Internal Server Error"
157
+ // @Router /api/v1/variables [get]
158
158
func (h * Handler ) ListVariables () http.HandlerFunc {
159
159
return func (w http.ResponseWriter , r * http.Request ) {
160
160
// Getting stuff from context.
0 commit comments