Skip to content

Commit

Permalink
Split schemas from DashboardList v2 (#318)
Browse files Browse the repository at this point in the history
* Update tests to use new dashboard list APIs

* Regenerate client from commit c23ab12 of spec repo

Co-authored-by: Thomas Hervé <thomas.herve@datadoghq.com>
Co-authored-by: Jiri Kuncar <jiri.kuncar@datadoghq.com>
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
  • Loading branch information
4 people authored May 29, 2020
1 parent 6a0e1f1 commit 44e7713
Show file tree
Hide file tree
Showing 23 changed files with 1,277 additions and 133 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.2.0",
"regenerated": "2020-05-28 16:27:47.023058",
"spec_repo_commit": "d87077d"
"regenerated": "2020-05-29 07:37:38.359191",
"spec_repo_commit": "c23ab12"
},
"v2": {
"apigentools_version": "1.2.0",
"regenerated": "2020-05-28 16:27:51.489443",
"spec_repo_commit": "d87077d"
"regenerated": "2020-05-29 07:37:43.691613",
"spec_repo_commit": "c23ab12"
}
}
}
12 changes: 12 additions & 0 deletions api/v2/datadog/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@ client.go
configuration.go
docs/APIErrorResponse.md
docs/Creator.md
docs/DashboardListAddItemsRequest.md
docs/DashboardListAddItemsResponse.md
docs/DashboardListDeleteItemsRequest.md
docs/DashboardListDeleteItemsResponse.md
docs/DashboardListItem.md
docs/DashboardListItemRequest.md
docs/DashboardListItemResponse.md
docs/DashboardListItems.md
docs/DashboardListUpdateItemsRequest.md
docs/DashboardListUpdateItemsResponse.md
docs/DashboardListsApi.md
docs/DashboardType.md
docs/Organization.md
Expand Down Expand Up @@ -93,10 +99,16 @@ go.mod
go.sum
model_api_error_response.go
model_creator.go
model_dashboard_list_add_items_request.go
model_dashboard_list_add_items_response.go
model_dashboard_list_delete_items_request.go
model_dashboard_list_delete_items_response.go
model_dashboard_list_item.go
model_dashboard_list_item_request.go
model_dashboard_list_item_response.go
model_dashboard_list_items.go
model_dashboard_list_update_items_request.go
model_dashboard_list_update_items_response.go
model_dashboard_type.go
model_organization.go
model_organization_attributes.go
Expand Down
6 changes: 6 additions & 0 deletions api/v2/datadog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,16 @@ Class | Method | HTTP request | Description

- [APIErrorResponse](docs/APIErrorResponse.md)
- [Creator](docs/Creator.md)
- [DashboardListAddItemsRequest](docs/DashboardListAddItemsRequest.md)
- [DashboardListAddItemsResponse](docs/DashboardListAddItemsResponse.md)
- [DashboardListDeleteItemsRequest](docs/DashboardListDeleteItemsRequest.md)
- [DashboardListDeleteItemsResponse](docs/DashboardListDeleteItemsResponse.md)
- [DashboardListItem](docs/DashboardListItem.md)
- [DashboardListItemRequest](docs/DashboardListItemRequest.md)
- [DashboardListItemResponse](docs/DashboardListItemResponse.md)
- [DashboardListItems](docs/DashboardListItems.md)
- [DashboardListUpdateItemsRequest](docs/DashboardListUpdateItemsRequest.md)
- [DashboardListUpdateItemsResponse](docs/DashboardListUpdateItemsResponse.md)
- [DashboardType](docs/DashboardType.md)
- [Organization](docs/Organization.md)
- [OrganizationAttributes](docs/OrganizationAttributes.md)
Expand Down
168 changes: 100 additions & 68 deletions api/v2/datadog/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ security:
appKeyAuth: []
tags:
- description: |-
[Interact with your dashboard lists](https://docs.datadoghq.com/monitors/downtimes)
through the API to make it easier to organize, find, and share all of your dashboards
with your team and organization.
Interact with your dashboard lists through the API to make it easier to
organize, find, and share all of your dashboards with your team and
organization.
name: Dashboard Lists
- description: |-
The Roles API is used to create and manage Datadog roles, what
Expand Down Expand Up @@ -71,7 +71,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/DashboardListItems'
$ref: '#/components/schemas/DashboardListDeleteItemsRequest'
description: Dashboards to delete from the dashboard list.
required: true
responses:
Expand Down Expand Up @@ -155,7 +155,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/DashboardListItems'
$ref: '#/components/schemas/DashboardListAddItemsRequest'
description: Dashboards to add to the dashboard list.
required: true
responses:
Expand Down Expand Up @@ -204,15 +204,15 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/DashboardListItems'
$ref: '#/components/schemas/DashboardListUpdateItemsRequest'
description: New dashboards of the dashboard list.
required: true
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/DashboardListItems'
$ref: '#/components/schemas/DashboardListUpdateItemsResponse'
description: OK
"400":
content:
Expand Down Expand Up @@ -1444,82 +1444,56 @@ components:
description: Name of the creator.
type: string
type: object
DashboardListAddItemsRequest:
description: Request containing a list of dashboards to add.
example:
dashboards:
- id: q5j-nti-fv6
- id: q5j-nti-fv6
properties:
dashboards:
description: List of dashboards to add the dashboard list.
items:
$ref: '#/components/schemas/DashboardListItemRequest'
type: array
type: object
DashboardListAddItemsResponse:
description: Response containing a list of added dashboards.
example:
added_dashboards_to_list:
- is_favorite: true
author:
name: name
handle: handle
email: email
created: 2000-01-23T04:56:07.000+00:00
is_shared: true
popularity: 0
icon: icon
modified: 2000-01-23T04:56:07.000+00:00
is_read_only: true
id: id
title: title
url: url
- is_favorite: true
author:
name: name
handle: handle
email: email
created: 2000-01-23T04:56:07.000+00:00
is_shared: true
popularity: 0
icon: icon
modified: 2000-01-23T04:56:07.000+00:00
is_read_only: true
id: id
title: title
url: url
- id: q5j-nti-fv6
- id: q5j-nti-fv6
properties:
added_dashboards_to_list:
description: List of dashboards added to the dashboard list.
items:
$ref: '#/components/schemas/DashboardListItem'
$ref: '#/components/schemas/DashboardListItemResponse'
type: array
type: object
DashboardListDeleteItemsRequest:
description: Request containing a list of dashboards to delete.
example:
dashboards:
- id: q5j-nti-fv6
- id: q5j-nti-fv6
properties:
dashboards:
description: List of dashboards to delete from the dashboard list.
items:
$ref: '#/components/schemas/DashboardListItemRequest'
type: array
type: object
DashboardListDeleteItemsResponse:
description: Response containing a list of deleted dashboards.
example:
deleted_dashboards_from_list:
- is_favorite: true
author:
name: name
handle: handle
email: email
created: 2000-01-23T04:56:07.000+00:00
is_shared: true
popularity: 0
icon: icon
modified: 2000-01-23T04:56:07.000+00:00
is_read_only: true
id: id
title: title
url: url
- is_favorite: true
author:
name: name
handle: handle
email: email
created: 2000-01-23T04:56:07.000+00:00
is_shared: true
popularity: 0
icon: icon
modified: 2000-01-23T04:56:07.000+00:00
is_read_only: true
id: id
title: title
url: url
- id: q5j-nti-fv6
- id: q5j-nti-fv6
properties:
deleted_dashboards_from_list:
description: List of dashboards deleted from the dashboard list.
items:
$ref: '#/components/schemas/DashboardListItem'
$ref: '#/components/schemas/DashboardListItemResponse'
type: array
type: object
DashboardListItem:
Expand All @@ -1536,7 +1510,7 @@ components:
icon: icon
modified: 2000-01-23T04:56:07.000+00:00
is_read_only: true
id: id
id: q5j-nti-fv6
title: title
url: url
properties:
Expand All @@ -1553,6 +1527,7 @@ components:
type: string
id:
description: ID of the dashboard.
example: q5j-nti-fv6
type: string
is_favorite:
description: Whether or not the dashboard is in the favorites.
Expand Down Expand Up @@ -1591,6 +1566,37 @@ components:
- id
- type
type: object
DashboardListItemRequest:
description: A dashboard within a list.
example:
id: q5j-nti-fv6
properties:
id:
description: ID of the dashboard.
example: q5j-nti-fv6
type: string
type:
$ref: '#/components/schemas/DashboardType'
required:
- id
- type
type: object
DashboardListItemResponse:
description: A dashboard within a list.
example:
id: q5j-nti-fv6
properties:
id:
description: ID of the dashboard.
example: q5j-nti-fv6
readOnly: true
type: string
type:
$ref: '#/components/schemas/DashboardType'
required:
- id
- type
type: object
DashboardListItems:
description: Dashboards within a list.
example:
Expand All @@ -1607,7 +1613,7 @@ components:
icon: icon
modified: 2000-01-23T04:56:07.000+00:00
is_read_only: true
id: id
id: q5j-nti-fv6
title: title
url: url
- is_favorite: true
Expand All @@ -1621,7 +1627,7 @@ components:
icon: icon
modified: 2000-01-23T04:56:07.000+00:00
is_read_only: true
id: id
id: q5j-nti-fv6
title: title
url: url
properties:
Expand All @@ -1638,6 +1644,32 @@ components:
required:
- dashboards
type: object
DashboardListUpdateItemsRequest:
description: Request containing the list of dashboards to update to.
example:
dashboards:
- id: q5j-nti-fv6
- id: q5j-nti-fv6
properties:
dashboards:
description: List of dashboards to update the dashboard list to.
items:
$ref: '#/components/schemas/DashboardListItemRequest'
type: array
type: object
DashboardListUpdateItemsResponse:
description: Response containing a list of updated dashboards.
example:
dashboards:
- id: q5j-nti-fv6
- id: q5j-nti-fv6
properties:
dashboards:
description: List of dashboards in the dashboard list.
items:
$ref: '#/components/schemas/DashboardListItemResponse'
type: array
type: object
DashboardType:
description: The type of the dashboard.
enum:
Expand Down
18 changes: 9 additions & 9 deletions api/v2/datadog/api_dashboard_lists.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 44e7713

Please sign in to comment.