Swagger: Fix getLibraryElementByName response (#78221)
It returns an array of library elements, not a single one. This has been tested by generating the OpenAPI client and using it in Terraform
This commit is contained in:
@@ -270,7 +270,7 @@ func (l *LibraryElementService) getConnectionsHandler(c *contextmodel.ReqContext
|
||||
// Returns a library element with the given name.
|
||||
//
|
||||
// Responses:
|
||||
// 200: getLibraryElementResponse
|
||||
// 200: getLibraryElementArrayResponse
|
||||
// 401: unauthorisedError
|
||||
// 404: notFoundError
|
||||
// 500: internalServerError
|
||||
@@ -448,6 +448,12 @@ type GetLibraryElementResponse struct {
|
||||
Body model.LibraryElementResponse `json:"body"`
|
||||
}
|
||||
|
||||
// swagger:response getLibraryElementArrayResponse
|
||||
type GetLibraryElementArrayResponse struct {
|
||||
// in: body
|
||||
Body model.LibraryElementArrayResponse `json:"body"`
|
||||
}
|
||||
|
||||
// swagger:response getLibraryElementConnectionsResponse
|
||||
type GetLibraryElementConnectionsResponse struct {
|
||||
// in: body
|
||||
|
||||
Reference in New Issue
Block a user