Add API for Variables (#29520)

close #27801

---------

Co-authored-by: silverwind <me@silverwind.io>
(cherry picked from commit 62b073e6f31645e446c7e8d6b5a506f61b47924e)

Conflicts:
	- modules/util/util.go
          Trivial resolution, only picking the newly introduced function
	- routers/api/v1/swagger/options.go
          Trivial resolution. We don't have UserBadges, don't pick that part.
	- templates/swagger/v1_json.tmpl
          Regenerated.
This commit is contained in:
sillyguodong 2024-03-29 04:40:35 +08:00 committed by Gergely Nagy
parent 473b90da53
commit 16696a42f5
No known key found for this signature in database
16 changed files with 2102 additions and 74 deletions

View file

@ -18,3 +18,17 @@ type swaggerResponseSecret struct {
// in:body
Body api.Secret `json:"body"`
}
// ActionVariable
// swagger:response ActionVariable
type swaggerResponseActionVariable struct {
// in:body
Body api.ActionVariable `json:"body"`
}
// VariableList
// swagger:response VariableList
type swaggerResponseVariableList struct {
// in:body
Body []api.ActionVariable `json:"body"`
}

View file

@ -199,4 +199,10 @@ type swaggerParameterBodies struct {
// in:body
CreateOrUpdateSecretOption api.CreateOrUpdateSecretOption
// in:body
CreateVariableOption api.CreateVariableOption
// in:body
UpdateVariableOption api.UpdateVariableOption
}