API: Make Swagger specification more consistent (#50576)
* Fix swagger generation targer using mac Validate using the swagger binarry instead of the docker container * API: Make swagger specification more consistent Fix operation parameter ordering
This commit is contained in:
@@ -333,7 +333,7 @@ import (
|
||||
// 404: notFoundError
|
||||
// 500: internalServerError
|
||||
|
||||
// swagger:parameters updateDatasourceByID deleteDatasourceByID getDatasourceByID datasourceProxyGETcalls datasourceProxyPOSTcalls datasourceProxyDELETEcalls
|
||||
// swagger:parameters updateDatasourceByID datasourceProxyDELETEcalls
|
||||
// swagger:parameters checkDatasourceHealthByID fetchDatasourceResourcesByID
|
||||
type DatasourceID struct {
|
||||
// in:path
|
||||
@@ -341,7 +341,31 @@ type DatasourceID struct {
|
||||
DatasourceID string `json:"id"`
|
||||
}
|
||||
|
||||
// swagger:parameters updateDatasourceByUID deleteDatasourceByUID getDatasourceByUID datasourceProxyGETByUIDcalls datasourceProxyPOSTByUIDcalls datasourceProxyDELETEByUIDcalls
|
||||
// swagger:parameters deleteDatasourceByID
|
||||
type DeleteDatasourceByIDParams struct {
|
||||
// in:path
|
||||
// required:true
|
||||
DatasourceID string `json:"id"`
|
||||
}
|
||||
|
||||
// swagger:parameters getDatasourceByID
|
||||
type GetDatasourceByIDParams struct {
|
||||
// in:path
|
||||
// required:true
|
||||
DatasourceID string `json:"id"`
|
||||
}
|
||||
|
||||
// swagger:parameters datasourceProxyGETcalls
|
||||
type DatasourceProxyGETcallsParams struct {
|
||||
// in:path
|
||||
// required:true
|
||||
DatasourceProxyRoute string `json:"datasource_proxy_route"`
|
||||
// in:path
|
||||
// required:true
|
||||
DatasourceID string `json:"id"`
|
||||
}
|
||||
|
||||
// swagger:parameters datasourceProxyDELETEByUIDcalls
|
||||
// swagger:parameters checkDatasourceHealth fetchDatasourceResources
|
||||
type DatasourceUID struct {
|
||||
// in:path
|
||||
@@ -349,15 +373,53 @@ type DatasourceUID struct {
|
||||
DatasourceUID string `json:"uid"`
|
||||
}
|
||||
|
||||
// swagger:parameters getDatasourceByName deleteDatasourceByName getDatasourceIdByName
|
||||
type DatasourceName struct {
|
||||
// swagger:parameters deleteDatasourceByUID
|
||||
type DeleteDatasourceByUIDParams struct {
|
||||
// in:path
|
||||
// required:true
|
||||
DatasourceUID string `json:"uid"`
|
||||
}
|
||||
|
||||
// swagger:parameters getDatasourceByUID
|
||||
type GetDatasourceByUIDParams struct {
|
||||
// in:path
|
||||
// required:true
|
||||
DatasourceUID string `json:"uid"`
|
||||
}
|
||||
|
||||
// swagger:parameters datasourceProxyGETByUIDcalls
|
||||
type DatasourceProxyGETByUIDcallsParams struct {
|
||||
// in:path
|
||||
// required:true
|
||||
DatasourceProxyRoute string `json:"datasource_proxy_route"`
|
||||
// in:path
|
||||
// required:true
|
||||
DatasourceUID string `json:"uid"`
|
||||
}
|
||||
|
||||
// swagger:parameters getDatasourceByName
|
||||
type GetDatasourceByNameParams struct {
|
||||
// in:path
|
||||
// required:true
|
||||
DatasourceName string `json:"name"`
|
||||
}
|
||||
|
||||
// swagger:parameters datasourceProxyGETcalls datasourceProxyPOSTcalls datasourceProxyDELETEcalls datasourceProxyGETByUIDcalls
|
||||
// swagger:parameters datasourceProxyPOSTByUIDcalls datasourceProxyDELETEByUIDcalls
|
||||
// swagger:parameters deleteDatasourceByName
|
||||
type DeleteDatasourceByNameParams struct {
|
||||
// in:path
|
||||
// required:true
|
||||
DatasourceName string `json:"name"`
|
||||
}
|
||||
|
||||
// swagger:parameters getDatasourceIdByName
|
||||
type GetDatasourceIdByNameParams struct {
|
||||
// in:path
|
||||
// required:true
|
||||
DatasourceName string `json:"name"`
|
||||
}
|
||||
|
||||
// swagger:parameters datasourceProxyDELETEcalls
|
||||
// swagger:parameters datasourceProxyDELETEByUIDcalls
|
||||
// swagger:parameters fetchDatasourceResources fetchDatasourceResourcesByID
|
||||
type DatasourceProxyRouteParam struct {
|
||||
// in:path
|
||||
@@ -366,24 +428,56 @@ type DatasourceProxyRouteParam struct {
|
||||
}
|
||||
|
||||
// swagger:parameters datasourceProxyPOSTcalls
|
||||
type DatasourceProxyParam struct {
|
||||
type DatasourceProxyPOSTcallsParams struct {
|
||||
// in:body
|
||||
// required:true
|
||||
DatasourceProxyParam interface{}
|
||||
// in:path
|
||||
// required:true
|
||||
DatasourceProxyRoute string `json:"datasource_proxy_route"`
|
||||
// in:path
|
||||
// required:true
|
||||
DatasourceID string `json:"id"`
|
||||
}
|
||||
|
||||
// swagger:parameters datasourceProxyPOSTByUIDcalls
|
||||
type DatasourceProxyPOSTByUIDcallsParams struct {
|
||||
// in:body
|
||||
// required:true
|
||||
DatasourceProxyParam interface{}
|
||||
// in:path
|
||||
// required:true
|
||||
DatasourceProxyRoute string `json:"datasource_proxy_route"`
|
||||
// in:path
|
||||
// required:true
|
||||
DatasourceUID string `json:"uid"`
|
||||
}
|
||||
|
||||
// swagger:parameters addDatasource
|
||||
type AddDatasourceParam struct {
|
||||
type AddDatasourceParams struct {
|
||||
// in:body
|
||||
// required:true
|
||||
Body models.AddDataSourceCommand
|
||||
}
|
||||
|
||||
// swagger:parameters updateDatasourceByID updateDatasourceByUID
|
||||
type UpdateDatasource struct {
|
||||
// swagger:parameters updateDatasourceByID
|
||||
type UpdateDatasourceParams struct {
|
||||
// in:body
|
||||
// required:true
|
||||
Body models.UpdateDataSourceCommand
|
||||
// in:path
|
||||
// required:true
|
||||
DatasourceID string `json:"id"`
|
||||
}
|
||||
|
||||
// swagger:parameters updateDatasourceByUID
|
||||
type UpdateDatasourceByUIDParams struct {
|
||||
// in:body
|
||||
// required:true
|
||||
Body models.UpdateDataSourceCommand
|
||||
// in:path
|
||||
// required:true
|
||||
DatasourceUID string `json:"uid"`
|
||||
}
|
||||
|
||||
// swagger:response getDatasourcesResponse
|
||||
|
||||
Reference in New Issue
Block a user