Skip to content

Commit

Permalink
Regenerate client from commit 9f80a9c5 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Oct 12, 2022
1 parent e67abd7 commit f68ceba
Show file tree
Hide file tree
Showing 14 changed files with 70 additions and 68 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.6.4",
"regenerated": "2022-10-11 16:21:59.043800",
"spec_repo_commit": "c90265b2"
"regenerated": "2022-10-12 15:56:49.073582",
"spec_repo_commit": "9f80a9c5"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2022-10-11 16:21:59.066264",
"spec_repo_commit": "c90265b2"
"regenerated": "2022-10-12 15:56:49.085696",
"spec_repo_commit": "9f80a9c5"
}
}
}
34 changes: 17 additions & 17 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8379,6 +8379,15 @@ components:
required:
- data
type: object
ServiceDefinitionCreateResponse:
description: Create service definitions response.
properties:
data:
description: Create service definitions response payload.
items:
$ref: '#/components/schemas/ServiceDefinitionData'
type: array
type: object
ServiceDefinitionData:
description: Service definition data.
properties:
Expand All @@ -8402,15 +8411,6 @@ components:
data:
$ref: '#/components/schemas/ServiceDefinitionData'
type: object
ServiceDefinitionListResponse:
description: Get service definitions response.
properties:
data:
description: Get service definitions response payload.
items:
$ref: '#/components/schemas/ServiceDefinitionData'
type: array
type: object
ServiceDefinitionMeta:
description: Metadata about a service definition.
properties:
Expand Down Expand Up @@ -8490,7 +8490,7 @@ components:
format: email
type: string
slack:
description: "Service owner\u2019s slack channel."
description: "Service owner\u2019s Slack channel."
example: https://yourcompany.slack.com/archives/channel123
type: string
ServiceDefinitionV1Info:
Expand Down Expand Up @@ -8526,7 +8526,7 @@ components:
description: Org related information about the service.
properties:
application:
description: App feature for which this service supports.
description: App feature this service supports.
example: E-Commerce
type: string
team:
Expand All @@ -8535,7 +8535,7 @@ components:
type: string
type: object
ServiceDefinitionV1Pagerduty:
description: PagerDuty service url for the service.
description: PagerDuty service URL for the service.
example: https://my-org.pagerduty.com/service-directory/PMyService
type: string
ServiceDefinitionV1Resource:
Expand Down Expand Up @@ -8588,7 +8588,7 @@ components:
example: v1
type: string
x-enum-varnames:
- v1
- V1
ServiceDefinitionV2:
description: Service definition V2 for providing service metadata and integrations.
properties:
Expand Down Expand Up @@ -8794,7 +8794,7 @@ components:
- url
type: object
ServiceDefinitionV2Slack:
description: Service owner's slack channel.
description: Service owner's Slack channel.
properties:
contact:
description: Slack Channel.
Expand Down Expand Up @@ -8832,7 +8832,7 @@ components:
oneOf:
- $ref: '#/components/schemas/ServiceDefinitionV2'
- $ref: '#/components/schemas/ServiceDefinitionRaw'
ServiceDefinitionsCreateResponse:
ServiceDefinitionsListResponse:
description: Create service definitions response.
properties:
data:
Expand Down Expand Up @@ -14400,7 +14400,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceDefinitionsCreateResponse'
$ref: '#/components/schemas/ServiceDefinitionsListResponse'
description: OK
'403':
$ref: '#/components/responses/ForbiddenResponse'
Expand All @@ -14424,7 +14424,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/ServiceDefinitionListResponse'
$ref: '#/components/schemas/ServiceDefinitionCreateResponse'
description: CREATED
'400':
$ref: '#/components/responses/BadRequestResponse'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ const params: v2.ServiceDefinitionApiCreateOrUpdateServiceDefinitionsRequest = {
url: "https://gdrive/mydoc",
},
],
extensions: {},
extensions: {
myorgextension: "extensionvalue",
},
integrations: {
opsgenie: {
region: "US",
Expand Down Expand Up @@ -56,7 +58,7 @@ const params: v2.ServiceDefinitionApiCreateOrUpdateServiceDefinitionsRequest = {

apiInstance
.createOrUpdateServiceDefinitions(params)
.then((data: v2.ServiceDefinitionListResponse) => {
.then((data: v2.ServiceDefinitionCreateResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/service-definition/ListServiceDefinitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const apiInstance = new v2.ServiceDefinitionApi(configuration);

apiInstance
.listServiceDefinitions()
.then((data: v2.ServiceDefinitionsCreateResponse) => {
.then((data: v2.ServiceDefinitionsListResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
Expand Down
52 changes: 26 additions & 26 deletions packages/datadog-api-client-v2/apis/ServiceDefinitionApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import { ObjectSerializer } from "../models/ObjectSerializer";
import { ApiException } from "../../datadog-api-client-common/exception";

import { APIErrorResponse } from "../models/APIErrorResponse";
import { ServiceDefinitionCreateResponse } from "../models/ServiceDefinitionCreateResponse";
import { ServiceDefinitionGetResponse } from "../models/ServiceDefinitionGetResponse";
import { ServiceDefinitionListResponse } from "../models/ServiceDefinitionListResponse";
import { ServiceDefinitionsCreateRequest } from "../models/ServiceDefinitionsCreateRequest";
import { ServiceDefinitionsCreateResponse } from "../models/ServiceDefinitionsCreateResponse";
import { ServiceDefinitionsListResponse } from "../models/ServiceDefinitionsListResponse";

export class ServiceDefinitionApiRequestFactory extends BaseAPIRequestFactory {
public async createOrUpdateServiceDefinitions(
Expand Down Expand Up @@ -176,15 +176,16 @@ export class ServiceDefinitionApiResponseProcessor {
*/
public async createOrUpdateServiceDefinitions(
response: ResponseContext
): Promise<ServiceDefinitionListResponse> {
): Promise<ServiceDefinitionCreateResponse> {
const contentType = ObjectSerializer.normalizeMediaType(
response.headers["content-type"]
);
if (response.httpStatusCode == 200) {
const body: ServiceDefinitionListResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"ServiceDefinitionListResponse"
) as ServiceDefinitionListResponse;
const body: ServiceDefinitionCreateResponse =
ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"ServiceDefinitionCreateResponse"
) as ServiceDefinitionCreateResponse;
return body;
}
if (
Expand Down Expand Up @@ -215,11 +216,12 @@ export class ServiceDefinitionApiResponseProcessor {

// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: ServiceDefinitionListResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"ServiceDefinitionListResponse",
""
) as ServiceDefinitionListResponse;
const body: ServiceDefinitionCreateResponse =
ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"ServiceDefinitionCreateResponse",
""
) as ServiceDefinitionCreateResponse;
return body;
}

Expand Down Expand Up @@ -362,16 +364,15 @@ export class ServiceDefinitionApiResponseProcessor {
*/
public async listServiceDefinitions(
response: ResponseContext
): Promise<ServiceDefinitionsCreateResponse> {
): Promise<ServiceDefinitionsListResponse> {
const contentType = ObjectSerializer.normalizeMediaType(
response.headers["content-type"]
);
if (response.httpStatusCode == 200) {
const body: ServiceDefinitionsCreateResponse =
ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"ServiceDefinitionsCreateResponse"
) as ServiceDefinitionsCreateResponse;
const body: ServiceDefinitionsListResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"ServiceDefinitionsListResponse"
) as ServiceDefinitionsListResponse;
return body;
}
if (response.httpStatusCode == 403 || response.httpStatusCode == 429) {
Expand All @@ -397,12 +398,11 @@ export class ServiceDefinitionApiResponseProcessor {

// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: ServiceDefinitionsCreateResponse =
ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"ServiceDefinitionsCreateResponse",
""
) as ServiceDefinitionsCreateResponse;
const body: ServiceDefinitionsListResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"ServiceDefinitionsListResponse",
""
) as ServiceDefinitionsListResponse;
return body;
}

Expand Down Expand Up @@ -462,7 +462,7 @@ export class ServiceDefinitionApi {
public createOrUpdateServiceDefinitions(
param: ServiceDefinitionApiCreateOrUpdateServiceDefinitionsRequest,
options?: Configuration
): Promise<ServiceDefinitionListResponse> {
): Promise<ServiceDefinitionCreateResponse> {
const requestContextPromise =
this.requestFactory.createOrUpdateServiceDefinitions(param.body, options);
return requestContextPromise.then((requestContext) => {
Expand Down Expand Up @@ -526,7 +526,7 @@ export class ServiceDefinitionApi {
*/
public listServiceDefinitions(
options?: Configuration
): Promise<ServiceDefinitionsCreateResponse> {
): Promise<ServiceDefinitionsListResponse> {
const requestContextPromise =
this.requestFactory.listServiceDefinitions(options);
return requestContextPromise.then((requestContext) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/datadog-api-client-v2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -753,14 +753,14 @@ export { SecurityMonitoringTriageUser } from "./models/SecurityMonitoringTriageU
export { ServiceAccountCreateAttributes } from "./models/ServiceAccountCreateAttributes";
export { ServiceAccountCreateData } from "./models/ServiceAccountCreateData";
export { ServiceAccountCreateRequest } from "./models/ServiceAccountCreateRequest";
export { ServiceDefinitionCreateResponse } from "./models/ServiceDefinitionCreateResponse";
export { ServiceDefinitionData } from "./models/ServiceDefinitionData";
export { ServiceDefinitionDataAttributes } from "./models/ServiceDefinitionDataAttributes";
export { ServiceDefinitionGetResponse } from "./models/ServiceDefinitionGetResponse";
export { ServiceDefinitionListResponse } from "./models/ServiceDefinitionListResponse";
export { ServiceDefinitionMeta } from "./models/ServiceDefinitionMeta";
export { ServiceDefinitionSchema } from "./models/ServiceDefinitionSchema";
export { ServiceDefinitionsCreateRequest } from "./models/ServiceDefinitionsCreateRequest";
export { ServiceDefinitionsCreateResponse } from "./models/ServiceDefinitionsCreateResponse";
export { ServiceDefinitionsListResponse } from "./models/ServiceDefinitionsListResponse";
export { ServiceDefinitionV1 } from "./models/ServiceDefinitionV1";
export { ServiceDefinitionV1Contact } from "./models/ServiceDefinitionV1Contact";
export { ServiceDefinitionV1Info } from "./models/ServiceDefinitionV1Info";
Expand Down
8 changes: 4 additions & 4 deletions packages/datadog-api-client-v2/models/ObjectSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,10 +396,10 @@ import { SecurityMonitoringTriageUser } from "./SecurityMonitoringTriageUser";
import { ServiceAccountCreateAttributes } from "./ServiceAccountCreateAttributes";
import { ServiceAccountCreateData } from "./ServiceAccountCreateData";
import { ServiceAccountCreateRequest } from "./ServiceAccountCreateRequest";
import { ServiceDefinitionCreateResponse } from "./ServiceDefinitionCreateResponse";
import { ServiceDefinitionData } from "./ServiceDefinitionData";
import { ServiceDefinitionDataAttributes } from "./ServiceDefinitionDataAttributes";
import { ServiceDefinitionGetResponse } from "./ServiceDefinitionGetResponse";
import { ServiceDefinitionListResponse } from "./ServiceDefinitionListResponse";
import { ServiceDefinitionMeta } from "./ServiceDefinitionMeta";
import { ServiceDefinitionV1 } from "./ServiceDefinitionV1";
import { ServiceDefinitionV1Contact } from "./ServiceDefinitionV1Contact";
Expand All @@ -415,7 +415,7 @@ import { ServiceDefinitionV2Link } from "./ServiceDefinitionV2Link";
import { ServiceDefinitionV2Opsgenie } from "./ServiceDefinitionV2Opsgenie";
import { ServiceDefinitionV2Repo } from "./ServiceDefinitionV2Repo";
import { ServiceDefinitionV2Slack } from "./ServiceDefinitionV2Slack";
import { ServiceDefinitionsCreateResponse } from "./ServiceDefinitionsCreateResponse";
import { ServiceDefinitionsListResponse } from "./ServiceDefinitionsListResponse";
import { UsageApplicationSecurityMonitoringResponse } from "./UsageApplicationSecurityMonitoringResponse";
import { UsageAttributesObject } from "./UsageAttributesObject";
import { UsageDataObject } from "./UsageDataObject";
Expand Down Expand Up @@ -1162,10 +1162,10 @@ const typeMap: { [index: string]: any } = {
ServiceAccountCreateAttributes: ServiceAccountCreateAttributes,
ServiceAccountCreateData: ServiceAccountCreateData,
ServiceAccountCreateRequest: ServiceAccountCreateRequest,
ServiceDefinitionCreateResponse: ServiceDefinitionCreateResponse,
ServiceDefinitionData: ServiceDefinitionData,
ServiceDefinitionDataAttributes: ServiceDefinitionDataAttributes,
ServiceDefinitionGetResponse: ServiceDefinitionGetResponse,
ServiceDefinitionListResponse: ServiceDefinitionListResponse,
ServiceDefinitionMeta: ServiceDefinitionMeta,
ServiceDefinitionV1: ServiceDefinitionV1,
ServiceDefinitionV1Contact: ServiceDefinitionV1Contact,
Expand All @@ -1181,7 +1181,7 @@ const typeMap: { [index: string]: any } = {
ServiceDefinitionV2Opsgenie: ServiceDefinitionV2Opsgenie,
ServiceDefinitionV2Repo: ServiceDefinitionV2Repo,
ServiceDefinitionV2Slack: ServiceDefinitionV2Slack,
ServiceDefinitionsCreateResponse: ServiceDefinitionsCreateResponse,
ServiceDefinitionsListResponse: ServiceDefinitionsListResponse,
UsageApplicationSecurityMonitoringResponse:
UsageApplicationSecurityMonitoringResponse,
UsageAttributesObject: UsageAttributesObject,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import { ServiceDefinitionData } from "./ServiceDefinitionData";
import { AttributeTypeMap } from "../../datadog-api-client-common/util";

/**
* Get service definitions response.
* Create service definitions response.
*/
export class ServiceDefinitionListResponse {
export class ServiceDefinitionCreateResponse {
/**
* Get service definitions response payload.
* Create service definitions response payload.
*/
"data"?: Array<ServiceDefinitionData>;

Expand All @@ -35,7 +35,7 @@ export class ServiceDefinitionListResponse {
* @ignore
*/
static getAttributeTypeMap(): AttributeTypeMap {
return ServiceDefinitionListResponse.attributeTypeMap;
return ServiceDefinitionCreateResponse.attributeTypeMap;
}

public constructor() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class ServiceDefinitionV1Contact {
*/
"email"?: string;
/**
* Service owner’s slack channel.
* Service owner’s Slack channel.
*/
"slack"?: string;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util";
*/
export class ServiceDefinitionV1Integrations {
/**
* PagerDuty service url for the service.
* PagerDuty service URL for the service.
*/
"pagerduty"?: string;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util";
*/
export class ServiceDefinitionV1Org {
/**
* App feature for which this service supports.
* App feature this service supports.
*/
"application"?: string;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
* Copyright 2020-Present Datadog, Inc.
*/

export type ServiceDefinitionV1Version = typeof v1;
export const v1 = "v1";
export type ServiceDefinitionV1Version = typeof V1;
export const V1 = "v1";
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ServiceDefinitionV2SlackType } from "./ServiceDefinitionV2SlackType";
import { AttributeTypeMap } from "../../datadog-api-client-common/util";

/**
* Service owner's slack channel.
* Service owner's Slack channel.
*/
export class ServiceDefinitionV2Slack {
/**
Expand Down
Loading

0 comments on commit f68ceba

Please sign in to comment.