1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-21 14:29:40 +02:00

fix(swagger): fix swagger api docs endpoint(s) rename to environment(s) EE-1661 (#5629)

* fix swagger api docs endpoint(s) rename to environment(s)
This commit is contained in:
Richard Wei 2021-09-20 12:14:22 +12:00 committed by GitHub
parent d911c50f1b
commit dd808bb7bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
111 changed files with 376 additions and 376 deletions

View file

@ -21,7 +21,7 @@ import (
type updateComposeStackPayload struct {
// New content of the Stack file
StackFileContent string `example:"version: 3\n services:\n web:\n image:nginx"`
// A list of environment variables used during stack deployment
// A list of environment(endpoint) variables used during stack deployment
Env []portainer.Pair
}
@ -35,7 +35,7 @@ func (payload *updateComposeStackPayload) Validate(r *http.Request) error {
type updateSwarmStackPayload struct {
// New content of the Stack file
StackFileContent string `example:"version: 3\n services:\n web:\n image:nginx"`
// A list of environment variables used during stack deployment
// A list of environment(endpoint) variables used during stack deployment
Env []portainer.Pair
// Prune services that are no longer referenced (only available for Swarm stacks)
Prune bool `example:"true"`
@ -57,7 +57,7 @@ func (payload *updateSwarmStackPayload) Validate(r *http.Request) error {
// @accept json
// @produce json
// @param id path int true "Stack identifier"
// @param endpointId query int false "Stacks created before version 1.18.0 might not have an associated endpoint identifier. Use this optional parameter to set the endpoint identifier used by the stack."
// @param endpointId query int false "Stacks created before version 1.18.0 might not have an associated environment(endpoint) identifier. Use this optional parameter to set the environment(endpoint) identifier used by the stack."
// @param body body updateSwarmStackPayload true "Stack details"
// @success 200 {object} portainer.Stack "Success"
// @failure 400 "Invalid request"
@ -79,8 +79,8 @@ func (handler *Handler) stackUpdate(w http.ResponseWriter, r *http.Request) *htt
}
// TODO: this is a work-around for stacks created with Portainer version >= 1.17.1
// The EndpointID property is not available for these stacks, this API endpoint
// can use the optional EndpointID query parameter to associate a valid endpoint identifier to the stack.
// The EndpointID property is not available for these stacks, this API environment(endpoint)
// can use the optional EndpointID query parameter to associate a valid environment(endpoint) identifier to the stack.
endpointID, err := request.RetrieveNumericQueryParameter(r, "endpointId", true)
if err != nil {
return &httperror.HandlerError{StatusCode: http.StatusBadRequest, Message: "Invalid query parameter: endpointId", Err: err}