mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Docs: update annotations API docs to include required field (#52644)
* Update annotations.md A minor change to include the required fields when creating a new annotation via the annotations API. The error message when fields are missing is not descriptive and there is no indication in the current documentation (that I can see anyway) that would indicate these fields are required. * Update annotations.md Update required json body fields to only include fields that are actually required. * Add required field in Swagger Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
This commit is contained in:
@@ -3,14 +3,15 @@ package dtos
|
||||
import "github.com/grafana/grafana/pkg/components/simplejson"
|
||||
|
||||
type PostAnnotationsCmd struct {
|
||||
DashboardId int64 `json:"dashboardId"`
|
||||
DashboardUID string `json:"dashboardUID,omitempty"`
|
||||
PanelId int64 `json:"panelId"`
|
||||
Time int64 `json:"time"`
|
||||
TimeEnd int64 `json:"timeEnd,omitempty"` // Optional
|
||||
Text string `json:"text"`
|
||||
Tags []string `json:"tags"`
|
||||
Data *simplejson.Json `json:"data"`
|
||||
DashboardId int64 `json:"dashboardId"`
|
||||
DashboardUID string `json:"dashboardUID,omitempty"`
|
||||
PanelId int64 `json:"panelId"`
|
||||
Time int64 `json:"time"`
|
||||
TimeEnd int64 `json:"timeEnd,omitempty"` // Optional
|
||||
// required: true
|
||||
Text string `json:"text"`
|
||||
Tags []string `json:"tags"`
|
||||
Data *simplejson.Json `json:"data"`
|
||||
}
|
||||
|
||||
type UpdateAnnotationsCmd struct {
|
||||
|
||||
Reference in New Issue
Block a user