mirror of
https://github.com/portainer/portainer.git
synced 2025-07-25 08:19: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:
parent
d911c50f1b
commit
dd808bb7bd
111 changed files with 376 additions and 376 deletions
|
@ -12,13 +12,13 @@ import (
|
|||
)
|
||||
|
||||
type endpointGroupCreatePayload struct {
|
||||
// Endpoint group name
|
||||
Name string `validate:"required" example:"my-endpoint-group"`
|
||||
// Endpoint group description
|
||||
// Environment(Endpoint) group name
|
||||
Name string `validate:"required" example:"my-environment-group"`
|
||||
// Environment(Endpoint) group description
|
||||
Description string `example:"description"`
|
||||
// List of endpoint identifiers that will be part of this group
|
||||
// List of environment(endpoint) identifiers that will be part of this group
|
||||
AssociatedEndpoints []portainer.EndpointID `example:"1,3"`
|
||||
// List of tag identifiers to which this endpoint group is associated
|
||||
// List of tag identifiers to which this environment(endpoint) group is associated
|
||||
TagIDs []portainer.TagID `example:"1,2"`
|
||||
}
|
||||
|
||||
|
@ -32,14 +32,14 @@ func (payload *endpointGroupCreatePayload) Validate(r *http.Request) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// @summary Create an Endpoint Group
|
||||
// @description Create a new endpoint group.
|
||||
// @summary Create an Environment(Endpoint) Group
|
||||
// @description Create a new environment(endpoint) group.
|
||||
// @description **Access policy**: administrator
|
||||
// @tags endpoint_groups
|
||||
// @security jwt
|
||||
// @accept json
|
||||
// @produce json
|
||||
// @param body body endpointGroupCreatePayload true "Endpoint Group details"
|
||||
// @param body body endpointGroupCreatePayload true "Environment(Endpoint) Group details"
|
||||
// @success 200 {object} portainer.EndpointGroup "Success"
|
||||
// @failure 400 "Invalid request"
|
||||
// @failure 500 "Server error"
|
||||
|
|
|
@ -12,8 +12,8 @@ import (
|
|||
)
|
||||
|
||||
// @id EndpointGroupDelete
|
||||
// @summary Remove an endpoint group
|
||||
// @description Remove an endpoint group.
|
||||
// @summary Remove an environment(endpoint) group
|
||||
// @description Remove an environment(endpoint) group.
|
||||
// @description **Access policy**: administrator
|
||||
// @tags endpoint_groups
|
||||
// @security jwt
|
||||
|
|
|
@ -11,13 +11,13 @@ import (
|
|||
)
|
||||
|
||||
// @id EndpointGroupAddEndpoint
|
||||
// @summary Add an endpoint to an endpoint group
|
||||
// @description Add an endpoint to an endpoint group
|
||||
// @summary Add an environment(endpoint) to an environment(endpoint) group
|
||||
// @description Add an environment(endpoint) to an environment(endpoint) group
|
||||
// @description **Access policy**: administrator
|
||||
// @tags endpoint_groups
|
||||
// @security jwt
|
||||
// @param id path int true "EndpointGroup identifier"
|
||||
// @param endpointId path int true "Endpoint identifier"
|
||||
// @param endpointId path int true "Environment(Endpoint) identifier"
|
||||
// @success 204 "Success"
|
||||
// @failure 400 "Invalid request"
|
||||
// @failure 404 "EndpointGroup not found"
|
||||
|
|
|
@ -11,12 +11,12 @@ import (
|
|||
)
|
||||
|
||||
// @id EndpointGroupDeleteEndpoint
|
||||
// @summary Removes endpoint from an endpoint group
|
||||
// @summary Removes environment(endpoint) from an environment(endpoint) group
|
||||
// @description **Access policy**: administrator
|
||||
// @tags endpoint_groups
|
||||
// @security jwt
|
||||
// @param id path int true "EndpointGroup identifier"
|
||||
// @param endpointId path int true "Endpoint identifier"
|
||||
// @param endpointId path int true "Environment(Endpoint) identifier"
|
||||
// @success 204 "Success"
|
||||
// @failure 400 "Invalid request"
|
||||
// @failure 404 "EndpointGroup not found"
|
||||
|
|
|
@ -10,14 +10,14 @@ import (
|
|||
"github.com/portainer/portainer/api/bolt/errors"
|
||||
)
|
||||
|
||||
// @summary Inspect an Endpoint group
|
||||
// @description Retrieve details abont an endpoint group.
|
||||
// @summary Inspect an Environment(Endpoint) group
|
||||
// @description Retrieve details abont an environment(endpoint) group.
|
||||
// @description **Access policy**: administrator
|
||||
// @tags endpoint_groups
|
||||
// @security jwt
|
||||
// @accept json
|
||||
// @produce json
|
||||
// @param id path int true "Endpoint group identifier"
|
||||
// @param id path int true "Environment(Endpoint) group identifier"
|
||||
// @success 200 {object} portainer.EndpointGroup "Success"
|
||||
// @failure 400 "Invalid request"
|
||||
// @failure 404 "EndpointGroup not found"
|
||||
|
|
|
@ -9,15 +9,15 @@ import (
|
|||
)
|
||||
|
||||
// @id EndpointGroupList
|
||||
// @summary List Endpoint groups
|
||||
// @description List all endpoint groups based on the current user authorizations. Will
|
||||
// @description return all endpoint groups if using an administrator account otherwise it will
|
||||
// @description only return authorized endpoint groups.
|
||||
// @summary List Environment(Endpoint) groups
|
||||
// @description List all environment(endpoint) groups based on the current user authorizations. Will
|
||||
// @description return all environment(endpoint) groups if using an administrator account otherwise it will
|
||||
// @description only return authorized environment(endpoint) groups.
|
||||
// @description **Access policy**: restricted
|
||||
// @tags endpoint_groups
|
||||
// @security jwt
|
||||
// @produce json
|
||||
// @success 200 {array} portainer.EndpointGroup "Endpoint group"
|
||||
// @success 200 {array} portainer.EndpointGroup "Environment(Endpoint) group"
|
||||
// @failure 500 "Server error"
|
||||
// @router /endpoint_groups [get]
|
||||
func (handler *Handler) endpointGroupList(w http.ResponseWriter, r *http.Request) *httperror.HandlerError {
|
||||
|
|
|
@ -13,11 +13,11 @@ import (
|
|||
)
|
||||
|
||||
type endpointGroupUpdatePayload struct {
|
||||
// Endpoint group name
|
||||
Name string `example:"my-endpoint-group"`
|
||||
// Endpoint group description
|
||||
// Environment(Endpoint) group name
|
||||
Name string `example:"my-environment-group"`
|
||||
// Environment(Endpoint) group description
|
||||
Description string `example:"description"`
|
||||
// List of tag identifiers associated to the endpoint group
|
||||
// List of tag identifiers associated to the environment(endpoint) group
|
||||
TagIDs []portainer.TagID `example:"3,4"`
|
||||
UserAccessPolicies portainer.UserAccessPolicies
|
||||
TeamAccessPolicies portainer.TeamAccessPolicies
|
||||
|
@ -28,8 +28,8 @@ func (payload *endpointGroupUpdatePayload) Validate(r *http.Request) error {
|
|||
}
|
||||
|
||||
// @id EndpointGroupUpdate
|
||||
// @summary Update an endpoint group
|
||||
// @description Update an endpoint group.
|
||||
// @summary Update an environment(endpoint) group
|
||||
// @description Update an environment(endpoint) group.
|
||||
// @description **Access policy**: administrator
|
||||
// @tags endpoint_groups
|
||||
// @security jwt
|
||||
|
|
|
@ -10,14 +10,14 @@ import (
|
|||
"github.com/portainer/portainer/api/http/security"
|
||||
)
|
||||
|
||||
// Handler is the HTTP handler used to handle endpoint group operations.
|
||||
// Handler is the HTTP handler used to handle environment(endpoint) group operations.
|
||||
type Handler struct {
|
||||
*mux.Router
|
||||
AuthorizationService *authorization.Service
|
||||
DataStore portainer.DataStore
|
||||
}
|
||||
|
||||
// NewHandler creates a handler to manage endpoint group operations.
|
||||
// NewHandler creates a handler to manage environment(endpoint) group operations.
|
||||
func NewHandler(bouncer *security.RequestBouncer) *Handler {
|
||||
h := &Handler{
|
||||
Router: mux.NewRouter(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue