docs(settings): update api docs
This commit is contained in:
@@ -10,14 +10,16 @@ import (
|
||||
httperror "github.com/portainer/portainer/pkg/libhttp/error"
|
||||
)
|
||||
|
||||
// @id settingsInspect
|
||||
// @summary Retrieve Portainer settings
|
||||
// @description Retrieve settings. Will returns settings based on the user role.
|
||||
// @description **Access policy**: authenticated
|
||||
// @id SettingsInspect
|
||||
// @summary Retrieve the settings of the Portainer instance
|
||||
// @description Get the settings of the Portainer instance. Will return either all the settings or a subset of settings based on the user role.
|
||||
// @description **Access policy**: Authenticated user.
|
||||
// @tags settings
|
||||
// @security ApiKeyAuth || jwt
|
||||
// @produce json
|
||||
// @success 200 {object} settingsInspectResponse "Success"
|
||||
// @failure 500 "Server error"
|
||||
// @success 200 {object} settingsInspectResponse "The settings object"
|
||||
// @failure 401 "Unauthorized access or operation not allowed."
|
||||
// @failure 500 "Server error occurred while attempting to retrieve the settings."
|
||||
// @router /settings [get]
|
||||
func (handler *Handler) settingsInspect(w http.ResponseWriter, r *http.Request) *httperror.HandlerError {
|
||||
var roleBasedResponse interface{}
|
||||
|
||||
@@ -8,13 +8,12 @@ import (
|
||||
)
|
||||
|
||||
// @id SettingsPublic
|
||||
// @summary Retrieve Portainer public settings
|
||||
// @description Retrieve public settings. Returns a small set of settings that are not reserved to administrators only.
|
||||
// @description **Access policy**: public
|
||||
// @summary Retrieve the public settings of the Portainer instance
|
||||
// @description Get the settings of the Portainer instance. Will return only a subset of settings.
|
||||
// @tags settings
|
||||
// @produce json
|
||||
// @success 200 {object} publicSettingsResponse "Success"
|
||||
// @failure 500 "Server error"
|
||||
// @success 200 {object} publicSettingsResponse "The settings object"
|
||||
// @failure 500 "Server error occurred while attempting to retrieve the settings."
|
||||
// @router /settings/public [get]
|
||||
func (handler *Handler) settingsPublic(w http.ResponseWriter, r *http.Request) *httperror.HandlerError {
|
||||
settings, err := handler.DataStore.Settings().Settings()
|
||||
|
||||
Reference in New Issue
Block a user