Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Service Catalog support service definition schema v2.2 #1364

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
@@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2023-10-10 07:51:57.967909",
"spec_repo_commit": "6482b048"
"regenerated": "2023-10-10 13:47:29.129078",
"spec_repo_commit": "afb48804"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-10-10 07:51:57.983541",
"spec_repo_commit": "6482b048"
"regenerated": "2023-10-10 13:47:29.143556",
"spec_repo_commit": "afb48804"
}
}
}
179 changes: 179 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
@@ -14994,18 +14994,21 @@ components:
- $ref: '#/components/schemas/ServiceDefinitionV1'
- $ref: '#/components/schemas/ServiceDefinitionV2'
- $ref: '#/components/schemas/ServiceDefinitionV2Dot1'
- $ref: '#/components/schemas/ServiceDefinitionV2Dot2'
type: object
ServiceDefinitionSchemaVersions:
description: Schema versions
enum:
- v1
- v2
- v2.1
- v2.2
type: string
x-enum-varnames:
- V1
- V2
- V2_1
- V2_2
ServiceDefinitionV1:
deprecated: true
description: Deprecated - Service definition V1 for providing additional service
@@ -15466,6 +15469,181 @@ components:
type: string
x-enum-varnames:
- V2_1
ServiceDefinitionV2Dot2:
description: Service definition v2.2 for providing service metadata and integrations.
properties:
application:
description: Identifier for a group of related services serving a product
feature, which the service is a part of.
example: my-app
type: string
contacts:
description: A list of contacts related to the services.
items:
$ref: '#/components/schemas/ServiceDefinitionV2Dot2Contact'
type: array
dd-service:
description: Unique identifier of the service. Must be unique across all
services and is used to match with a service in Datadog.
example: my-service
type: string
description:
description: A short description of the service.
example: My service description
type: string
extensions:
additionalProperties: {}
description: Extensions to v2.2 schema.
example:
myorg/extension: extensionValue
type: object
integrations:
$ref: '#/components/schemas/ServiceDefinitionV2Dot2Integrations'
langauges:
description: 'The service''s programming language. Datadog recognizes the
following languages: `dotnet`, `go`, `java`, `js`, `php`, `python`, `ruby`,
and `c++`.'
example:
- dotnet
- go
- java
- js
- php
- python
- ruby
- c++
items:
type: string
type: array
lifecycle:
description: The current life cycle phase of the service.
example: sandbox
type: string
links:
description: A list of links related to the services.
items:
$ref: '#/components/schemas/ServiceDefinitionV2Dot2Link'
type: array
schema-version:
$ref: '#/components/schemas/ServiceDefinitionV2Dot2Version'
service-type:
description: 'The type of service. Datadog recognizes the following service
types: `database`, `cache`, `function`, `web`, `browser`, and `mobile`.'
example: web
type: string
tags:
description: A set of custom tags.
example:
- my:tag
- service:tag
items:
type: string
type: array
team:
description: Team that owns the service. It is used to locate a team defined
in Datadog Teams if it exists.
example: my-team
type: string
tier:
description: Importance of the service.
example: High
type: string
required:
- schema-version
- dd-service
type: object
ServiceDefinitionV2Dot2Contact:
description: Service owner's contacts information.
properties:
contact:
description: Contact value.
example: https://teams.microsoft.com/myteam
type: string
name:
description: Contact Name.
example: My team channel
type: string
type:
description: 'Contact type. Datadog recognizes the following types: `email`,
`slack`, and `microsoft-teams`.'
example: slack
type: string
required:
- type
- contact
type: object
ServiceDefinitionV2Dot2Integrations:
description: Third party integrations that Datadog supports.
properties:
opsgenie:
$ref: '#/components/schemas/ServiceDefinitionV2Dot2Opsgenie'
pagerduty:
$ref: '#/components/schemas/ServiceDefinitionV2Dot2Pagerduty'
type: object
ServiceDefinitionV2Dot2Link:
description: Service's external links.
properties:
name:
description: Link name.
example: Runbook
type: string
provider:
description: Link provider.
example: Github
type: string
type:
description: 'Link type. Datadog recognizes the following types: `runbook`,
`doc`, `repo`, `dashboard`, and `other`.'
example: runbook
type: string
url:
description: Link URL.
example: https://my-runbook
type: string
required:
- name
- type
- url
type: object
ServiceDefinitionV2Dot2Opsgenie:
description: Opsgenie integration for the service.
properties:
region:
$ref: '#/components/schemas/ServiceDefinitionV2Dot2OpsgenieRegion'
service-url:
description: Opsgenie service url.
example: https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000
type: string
required:
- service-url
type: object
ServiceDefinitionV2Dot2OpsgenieRegion:
description: Opsgenie instance region.
enum:
- US
- EU
example: US
type: string
x-enum-varnames:
- US
- EU
ServiceDefinitionV2Dot2Pagerduty:
description: PagerDuty integration for the service.
properties:
service-url:
description: PagerDuty service url.
example: https://my-org.pagerduty.com/service-directory/PMyService
type: string
type: object
ServiceDefinitionV2Dot2Version:
default: v2.2
description: Schema version being used.
enum:
- v2.2
example: v2.2
type: string
x-enum-varnames:
- V2_2
ServiceDefinitionV2Email:
description: Service owner's email.
properties:
@@ -15649,6 +15827,7 @@ components:
ServiceDefinitionsCreateRequest:
description: Create service definitions request.
oneOf:
- $ref: '#/components/schemas/ServiceDefinitionV2Dot2'
- $ref: '#/components/schemas/ServiceDefinitionV2Dot1'
- $ref: '#/components/schemas/ServiceDefinitionV2'
- $ref: '#/components/schemas/ServiceDefinitionRaw'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"2023-10-06T18:44:31.430Z"
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"log": {
"_recordingName": "Service Definition/Create or update service definition using schema v2-2 returns \"CREATED\" response",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
"version": "6.0.5"
},
"entries": [
{
"_id": "9fecc08ce646b6f022342c5a3e0f60ee",
"_order": 0,
"cache": {},
"request": {
"bodySize": 801,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "application/json"
},
{
"_fromType": "array",
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 586,
"httpVersion": "HTTP/1.1",
"method": "POST",
"postData": {
"mimeType": "application/json",
"params": [],
"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\"}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v2/services/definitions"
},
"response": {
"bodySize": 1061,
"content": {
"mimeType": "application/json",
"size": 1061,
"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"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 657,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2023-10-06T18:44:31.992Z",
"time": 97
},
{
"_id": "da8b7ea8fd5632368dc01b71951fcebb",
"_order": 0,
"cache": {},
"request": {
"bodySize": 0,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "*/*"
}
],
"headersSize": 603,
"httpVersion": "HTTP/1.1",
"method": "DELETE",
"queryString": [],
"url": "https://api.datadoghq.com/api/v2/services/definitions/service-testcreateorupdateservicedefinitionusingschemav22returnscreatedresponse1696617871"
},
"response": {
"bodySize": 46,
"content": {
"mimeType": "application/json",
"size": 46,
"text": "{\"errors\":[\"Not Found\"],\"error_details\":[{}]}\n"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 655,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 404,
"statusText": "Not Found"
},
"startedDateTime": "2023-10-06T18:44:32.098Z",
"time": 214
}
],
"pages": [],
"version": "1.2"
}
}
Original file line number Diff line number Diff line change
@@ -12,9 +12,9 @@ const params: v2.ServiceDefinitionApiCreateOrUpdateServiceDefinitionsRequest = {
application: "my-app",
contacts: [
{
contact: "contact@datadoghq.com",
name: "Team Email",
type: "email",
contact: "https://teams.microsoft.com/myteam",
name: "My team channel",
type: "slack",
},
],
ddService: "my-service",
@@ -32,6 +32,7 @@ const params: v2.ServiceDefinitionApiCreateOrUpdateServiceDefinitionsRequest = {
serviceUrl: "https://my-org.pagerduty.com/service-directory/PMyService",
},
},
langauges: ["dotnet", "go", "java", "js", "php", "python", "ruby", "c++"],
lifecycle: "sandbox",
links: [
{
@@ -41,7 +42,8 @@ const params: v2.ServiceDefinitionApiCreateOrUpdateServiceDefinitionsRequest = {
url: "https://my-runbook",
},
],
schemaVersion: "v2.1",
schemaVersion: "v2.2",
serviceType: "web",
tags: ["my:tag", "service:tag"],
team: "my-team",
tier: "High",
Loading