* API: Using go-swagger for extracting OpenAPI specification from source code
* Merge Grafana Alerting spec
* Include enterprise endpoints (if enabled)
* Serve SwaggerUI under feature flag
* Fix building dev docker images
* Configure swaggerUI
* Add missing json tags
Co-authored-by: Ying WANG <ying.wang@grafana.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
(cherry picked from commit 35fe58de37)
This commit is contained in:
committed by
GitHub
parent
c6a58003d1
commit
08ad99c36e
@@ -0,0 +1,37 @@
|
||||
package definitions
|
||||
|
||||
import "github.com/grafana/grafana/pkg/api/dtos"
|
||||
|
||||
// swagger:route GET /user/preferences user_preferences getUserPreferences
|
||||
//
|
||||
// Get user preferences.
|
||||
//
|
||||
// Responses:
|
||||
// 200: getPreferencesResponse
|
||||
// 401: unauthorisedError
|
||||
// 500: internalServerError
|
||||
|
||||
// swagger:route PUT /user/preferences user_preferences updateUserPreferences
|
||||
//
|
||||
// Update user preferences.
|
||||
//
|
||||
// Omitting a key (`theme`, `homeDashboardId`, `timezone`) will cause the current value to be replaced with the system default value.
|
||||
//
|
||||
// Responses:
|
||||
// 200: okResponse
|
||||
// 400: badRequestError
|
||||
// 401: unauthorisedError
|
||||
// 500: internalServerError
|
||||
|
||||
// swagger:parameters updateUserPreferences updateOrgPreferences updateTeamPreferences
|
||||
type UpdateUserPreferencesParam struct {
|
||||
// in:body
|
||||
// required:true
|
||||
Body dtos.UpdatePrefsCmd `json:"body"`
|
||||
}
|
||||
|
||||
// swagger:response getPreferencesResponse
|
||||
type GetPreferencesResponse struct {
|
||||
// in:body
|
||||
Body dtos.Prefs `json:"body"`
|
||||
}
|
||||
Reference in New Issue
Block a user