Skip to content

Commit 324e03c

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit afb48804 of spec repo
1 parent 438baab commit 324e03c

20 files changed

+861
-12
lines changed

.apigentools-info

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2023-10-10 07:51:57.967909",
8-
"spec_repo_commit": "6482b048"
7+
"regenerated": "2023-10-10 13:47:29.129078",
8+
"spec_repo_commit": "afb48804"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2023-10-10 07:51:57.983541",
13-
"spec_repo_commit": "6482b048"
12+
"regenerated": "2023-10-10 13:47:29.143556",
13+
"spec_repo_commit": "afb48804"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+179
Original file line numberDiff line numberDiff line change
@@ -14994,18 +14994,21 @@ components:
1499414994
- $ref: '#/components/schemas/ServiceDefinitionV1'
1499514995
- $ref: '#/components/schemas/ServiceDefinitionV2'
1499614996
- $ref: '#/components/schemas/ServiceDefinitionV2Dot1'
14997+
- $ref: '#/components/schemas/ServiceDefinitionV2Dot2'
1499714998
type: object
1499814999
ServiceDefinitionSchemaVersions:
1499915000
description: Schema versions
1500015001
enum:
1500115002
- v1
1500215003
- v2
1500315004
- v2.1
15005+
- v2.2
1500415006
type: string
1500515007
x-enum-varnames:
1500615008
- V1
1500715009
- V2
1500815010
- V2_1
15011+
- V2_2
1500915012
ServiceDefinitionV1:
1501015013
deprecated: true
1501115014
description: Deprecated - Service definition V1 for providing additional service
@@ -15466,6 +15469,181 @@ components:
1546615469
type: string
1546715470
x-enum-varnames:
1546815471
- V2_1
15472+
ServiceDefinitionV2Dot2:
15473+
description: Service definition v2.2 for providing service metadata and integrations.
15474+
properties:
15475+
application:
15476+
description: Identifier for a group of related services serving a product
15477+
feature, which the service is a part of.
15478+
example: my-app
15479+
type: string
15480+
contacts:
15481+
description: A list of contacts related to the services.
15482+
items:
15483+
$ref: '#/components/schemas/ServiceDefinitionV2Dot2Contact'
15484+
type: array
15485+
dd-service:
15486+
description: Unique identifier of the service. Must be unique across all
15487+
services and is used to match with a service in Datadog.
15488+
example: my-service
15489+
type: string
15490+
description:
15491+
description: A short description of the service.
15492+
example: My service description
15493+
type: string
15494+
extensions:
15495+
additionalProperties: {}
15496+
description: Extensions to v2.2 schema.
15497+
example:
15498+
myorg/extension: extensionValue
15499+
type: object
15500+
integrations:
15501+
$ref: '#/components/schemas/ServiceDefinitionV2Dot2Integrations'
15502+
langauges:
15503+
description: 'The service''s programming language. Datadog recognizes the
15504+
following languages: `dotnet`, `go`, `java`, `js`, `php`, `python`, `ruby`,
15505+
and `c++`.'
15506+
example:
15507+
- dotnet
15508+
- go
15509+
- java
15510+
- js
15511+
- php
15512+
- python
15513+
- ruby
15514+
- c++
15515+
items:
15516+
type: string
15517+
type: array
15518+
lifecycle:
15519+
description: The current life cycle phase of the service.
15520+
example: sandbox
15521+
type: string
15522+
links:
15523+
description: A list of links related to the services.
15524+
items:
15525+
$ref: '#/components/schemas/ServiceDefinitionV2Dot2Link'
15526+
type: array
15527+
schema-version:
15528+
$ref: '#/components/schemas/ServiceDefinitionV2Dot2Version'
15529+
service-type:
15530+
description: 'The type of service. Datadog recognizes the following service
15531+
types: `database`, `cache`, `function`, `web`, `browser`, and `mobile`.'
15532+
example: web
15533+
type: string
15534+
tags:
15535+
description: A set of custom tags.
15536+
example:
15537+
- my:tag
15538+
- service:tag
15539+
items:
15540+
type: string
15541+
type: array
15542+
team:
15543+
description: Team that owns the service. It is used to locate a team defined
15544+
in Datadog Teams if it exists.
15545+
example: my-team
15546+
type: string
15547+
tier:
15548+
description: Importance of the service.
15549+
example: High
15550+
type: string
15551+
required:
15552+
- schema-version
15553+
- dd-service
15554+
type: object
15555+
ServiceDefinitionV2Dot2Contact:
15556+
description: Service owner's contacts information.
15557+
properties:
15558+
contact:
15559+
description: Contact value.
15560+
example: https://teams.microsoft.com/myteam
15561+
type: string
15562+
name:
15563+
description: Contact Name.
15564+
example: My team channel
15565+
type: string
15566+
type:
15567+
description: 'Contact type. Datadog recognizes the following types: `email`,
15568+
`slack`, and `microsoft-teams`.'
15569+
example: slack
15570+
type: string
15571+
required:
15572+
- type
15573+
- contact
15574+
type: object
15575+
ServiceDefinitionV2Dot2Integrations:
15576+
description: Third party integrations that Datadog supports.
15577+
properties:
15578+
opsgenie:
15579+
$ref: '#/components/schemas/ServiceDefinitionV2Dot2Opsgenie'
15580+
pagerduty:
15581+
$ref: '#/components/schemas/ServiceDefinitionV2Dot2Pagerduty'
15582+
type: object
15583+
ServiceDefinitionV2Dot2Link:
15584+
description: Service's external links.
15585+
properties:
15586+
name:
15587+
description: Link name.
15588+
example: Runbook
15589+
type: string
15590+
provider:
15591+
description: Link provider.
15592+
example: Github
15593+
type: string
15594+
type:
15595+
description: 'Link type. Datadog recognizes the following types: `runbook`,
15596+
`doc`, `repo`, `dashboard`, and `other`.'
15597+
example: runbook
15598+
type: string
15599+
url:
15600+
description: Link URL.
15601+
example: https://my-runbook
15602+
type: string
15603+
required:
15604+
- name
15605+
- type
15606+
- url
15607+
type: object
15608+
ServiceDefinitionV2Dot2Opsgenie:
15609+
description: Opsgenie integration for the service.
15610+
properties:
15611+
region:
15612+
$ref: '#/components/schemas/ServiceDefinitionV2Dot2OpsgenieRegion'
15613+
service-url:
15614+
description: Opsgenie service url.
15615+
example: https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000
15616+
type: string
15617+
required:
15618+
- service-url
15619+
type: object
15620+
ServiceDefinitionV2Dot2OpsgenieRegion:
15621+
description: Opsgenie instance region.
15622+
enum:
15623+
- US
15624+
- EU
15625+
example: US
15626+
type: string
15627+
x-enum-varnames:
15628+
- US
15629+
- EU
15630+
ServiceDefinitionV2Dot2Pagerduty:
15631+
description: PagerDuty integration for the service.
15632+
properties:
15633+
service-url:
15634+
description: PagerDuty service url.
15635+
example: https://my-org.pagerduty.com/service-directory/PMyService
15636+
type: string
15637+
type: object
15638+
ServiceDefinitionV2Dot2Version:
15639+
default: v2.2
15640+
description: Schema version being used.
15641+
enum:
15642+
- v2.2
15643+
example: v2.2
15644+
type: string
15645+
x-enum-varnames:
15646+
- V2_2
1546915647
ServiceDefinitionV2Email:
1547015648
description: Service owner's email.
1547115649
properties:
@@ -15649,6 +15827,7 @@ components:
1564915827
ServiceDefinitionsCreateRequest:
1565015828
description: Create service definitions request.
1565115829
oneOf:
15830+
- $ref: '#/components/schemas/ServiceDefinitionV2Dot2'
1565215831
- $ref: '#/components/schemas/ServiceDefinitionV2Dot1'
1565315832
- $ref: '#/components/schemas/ServiceDefinitionV2'
1565415833
- $ref: '#/components/schemas/ServiceDefinitionRaw'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2023-10-06T18:44:31.430Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{
2+
"log": {
3+
"_recordingName": "Service Definition/Create or update service definition using schema v2-2 returns \"CREATED\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "9fecc08ce646b6f022342c5a3e0f60ee",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 801,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 586,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"contacts\":[{\"contact\":\"contact@datadoghq.com\",\"name\":\"Team Email\",\"type\":\"email\"}],\"dd-service\":\"service-testcreateorupdateservicedefinitionusingschemav22returnscreatedresponse1696617871\",\"extensions\":{\"myorgextension\":\"extensionvalue\"},\"integrations\":{\"opsgenie\":{\"region\":\"US\",\"service-url\":\"https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000\"},\"pagerduty\":{\"service-url\":\"https://my-org.pagerduty.com/service-directory/PMyService\"}},\"links\":[{\"name\":\"Runbook\",\"type\":\"runbook\",\"url\":\"https://my-runbook\"},{\"name\":\"Source Code\",\"provider\":\"GitHub\",\"type\":\"repo\",\"url\":\"https://github.com/DataDog/schema\"},{\"name\":\"Architecture\",\"provider\":\"Gigoogle drivetHub\",\"type\":\"doc\",\"url\":\"https://my-runbook\"}],\"schema-version\":\"v2.2\",\"tags\":[\"my:tag\",\"service:tag\"],\"team\":\"my-team\"}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/services/definitions"
39+
},
40+
"response": {
41+
"bodySize": 1061,
42+
"content": {
43+
"mimeType": "application/json",
44+
"size": 1061,
45+
"text": "{\"data\":[{\"type\":\"service-definition\",\"attributes\":{\"meta\":{\"last-modified-time\":\"2023-10-06T18:44:32.076834625Z\",\"github-html-url\":\"\",\"ingestion-source\":\"api\",\"origin\":\"unknown\",\"origin-detail\":\"\",\"warnings\":[],\"ingested-schema-version\":\"v2.2\"},\"schema\":{\"schema-version\":\"v2.2\",\"dd-service\":\"service-testcreateorupdateservicedefinitionusingschemav22returnscreatedresponse1696617871\",\"team\":\"my-team\",\"contacts\":[{\"name\":\"Team Email\",\"type\":\"email\",\"contact\":\"contact@datadoghq.com\"}],\"links\":[{\"name\":\"Runbook\",\"type\":\"runbook\",\"url\":\"https://my-runbook\"},{\"name\":\"Source Code\",\"type\":\"repo\",\"provider\":\"GitHub\",\"url\":\"https://github.com/DataDog/schema\"},{\"name\":\"Architecture\",\"type\":\"doc\",\"provider\":\"Gigoogle drivetHub\",\"url\":\"https://my-runbook\"}],\"tags\":[\"my:tag\",\"service:tag\"],\"integrations\":{\"pagerduty\":{\"service-url\":\"https://my-org.pagerduty.com/service-directory/PMyService\"},\"opsgenie\":{\"service-url\":\"https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000\",\"region\":\"US\"}},\"extensions\":{\"myorgextension\":\"extensionvalue\"}}}}]}\n"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/json"
52+
}
53+
],
54+
"headersSize": 657,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2023-10-06T18:44:31.992Z",
61+
"time": 97
62+
},
63+
{
64+
"_id": "da8b7ea8fd5632368dc01b71951fcebb",
65+
"_order": 0,
66+
"cache": {},
67+
"request": {
68+
"bodySize": 0,
69+
"cookies": [],
70+
"headers": [
71+
{
72+
"_fromType": "array",
73+
"name": "accept",
74+
"value": "*/*"
75+
}
76+
],
77+
"headersSize": 603,
78+
"httpVersion": "HTTP/1.1",
79+
"method": "DELETE",
80+
"queryString": [],
81+
"url": "https://api.datadoghq.com/api/v2/services/definitions/service-testcreateorupdateservicedefinitionusingschemav22returnscreatedresponse1696617871"
82+
},
83+
"response": {
84+
"bodySize": 46,
85+
"content": {
86+
"mimeType": "application/json",
87+
"size": 46,
88+
"text": "{\"errors\":[\"Not Found\"],\"error_details\":[{}]}\n"
89+
},
90+
"cookies": [],
91+
"headers": [
92+
{
93+
"name": "content-type",
94+
"value": "application/json"
95+
}
96+
],
97+
"headersSize": 655,
98+
"httpVersion": "HTTP/1.1",
99+
"redirectURL": "",
100+
"status": 404,
101+
"statusText": "Not Found"
102+
},
103+
"startedDateTime": "2023-10-06T18:44:32.098Z",
104+
"time": 214
105+
}
106+
],
107+
"pages": [],
108+
"version": "1.2"
109+
}
110+
}

examples/v2/service-definition/CreateOrUpdateServiceDefinitions.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ const params: v2.ServiceDefinitionApiCreateOrUpdateServiceDefinitionsRequest = {
1212
application: "my-app",
1313
contacts: [
1414
{
15-
contact: "contact@datadoghq.com",
16-
name: "Team Email",
17-
type: "email",
15+
contact: "https://teams.microsoft.com/myteam",
16+
name: "My team channel",
17+
type: "slack",
1818
},
1919
],
2020
ddService: "my-service",
@@ -32,6 +32,7 @@ const params: v2.ServiceDefinitionApiCreateOrUpdateServiceDefinitionsRequest = {
3232
serviceUrl: "https://my-org.pagerduty.com/service-directory/PMyService",
3333
},
3434
},
35+
langauges: ["dotnet", "go", "java", "js", "php", "python", "ruby", "c++"],
3536
lifecycle: "sandbox",
3637
links: [
3738
{
@@ -41,7 +42,8 @@ const params: v2.ServiceDefinitionApiCreateOrUpdateServiceDefinitionsRequest = {
4142
url: "https://my-runbook",
4243
},
4344
],
44-
schemaVersion: "v2.1",
45+
schemaVersion: "v2.2",
46+
serviceType: "web",
4547
tags: ["my:tag", "service:tag"],
4648
team: "my-team",
4749
tier: "High",

0 commit comments

Comments
 (0)