Skip to content

Commit e45a82b

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add meta and source fields to JSONAPIErrorItem (#1973)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 0e43d75 commit e45a82b

File tree

6 files changed

+116
-4
lines changed

6 files changed

+116
-4
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
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": "2025-01-06 18:09:35.371091",
8-
"spec_repo_commit": "c020103f"
7+
"regenerated": "2025-01-06 19:03:11.356485",
8+
"spec_repo_commit": "b56ea2d7"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-01-06 18:09:35.385957",
13-
"spec_repo_commit": "c020103f"
12+
"regenerated": "2025-01-06 19:03:11.371812",
13+
"spec_repo_commit": "b56ea2d7"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15109,6 +15109,12 @@ components:
1510915109
the error.
1511015110
example: Missing required attribute in body
1511115111
type: string
15112+
meta:
15113+
additionalProperties: {}
15114+
description: Non-standard meta-information about the error
15115+
type: object
15116+
source:
15117+
$ref: '#/components/schemas/JSONAPIErrorItemSource'
1511215118
status:
1511315119
description: Status code of the response.
1511415120
example: '400'
@@ -15118,6 +15124,24 @@ components:
1511815124
example: Bad Request
1511915125
type: string
1512015126
type: object
15127+
JSONAPIErrorItemSource:
15128+
description: References to the source of the error.
15129+
properties:
15130+
header:
15131+
description: A string indicating the name of a single request header which
15132+
caused the error.
15133+
example: Authorization
15134+
type: string
15135+
parameter:
15136+
description: A string indicating which URI query parameter caused the error.
15137+
example: limit
15138+
type: string
15139+
pointer:
15140+
description: A JSON pointer to the value in the request document that caused
15141+
the error.
15142+
example: /data/attributes/title
15143+
type: string
15144+
type: object
1512115145
JSONAPIErrorResponse:
1512215146
description: API error response.
1512315147
properties:

packages/datadog-api-client-v2/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,6 +1510,7 @@ export { JobCreateResponseData } from "./models/JobCreateResponseData";
15101510
export { JobDefinition } from "./models/JobDefinition";
15111511
export { JobDefinitionFromRule } from "./models/JobDefinitionFromRule";
15121512
export { JSONAPIErrorItem } from "./models/JSONAPIErrorItem";
1513+
export { JSONAPIErrorItemSource } from "./models/JSONAPIErrorItemSource";
15131514
export { JSONAPIErrorResponse } from "./models/JSONAPIErrorResponse";
15141515
export { LeakedKey } from "./models/LeakedKey";
15151516
export { LeakedKeyAttributes } from "./models/LeakedKeyAttributes";

packages/datadog-api-client-v2/models/JSONAPIErrorItem.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* This product includes software developed at Datadog (https://www.datadoghq.com/).
44
* Copyright 2020-Present Datadog, Inc.
55
*/
6+
import { JSONAPIErrorItemSource } from "./JSONAPIErrorItemSource";
67

78
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
89

@@ -14,6 +15,14 @@ export class JSONAPIErrorItem {
1415
* A human-readable explanation specific to this occurrence of the error.
1516
*/
1617
"detail"?: string;
18+
/**
19+
* Non-standard meta-information about the error
20+
*/
21+
"meta"?: { [key: string]: any };
22+
/**
23+
* References to the source of the error.
24+
*/
25+
"source"?: JSONAPIErrorItemSource;
1726
/**
1827
* Status code of the response.
1928
*/
@@ -43,6 +52,14 @@ export class JSONAPIErrorItem {
4352
baseName: "detail",
4453
type: "string",
4554
},
55+
meta: {
56+
baseName: "meta",
57+
type: "{ [key: string]: any; }",
58+
},
59+
source: {
60+
baseName: "source",
61+
type: "JSONAPIErrorItemSource",
62+
},
4663
status: {
4764
baseName: "status",
4865
type: "string",
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/**
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2020-Present Datadog, Inc.
5+
*/
6+
7+
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
8+
9+
/**
10+
* References to the source of the error.
11+
*/
12+
export class JSONAPIErrorItemSource {
13+
/**
14+
* A string indicating the name of a single request header which caused the error.
15+
*/
16+
"header"?: string;
17+
/**
18+
* A string indicating which URI query parameter caused the error.
19+
*/
20+
"parameter"?: string;
21+
/**
22+
* A JSON pointer to the value in the request document that caused the error.
23+
*/
24+
"pointer"?: string;
25+
26+
/**
27+
* A container for additional, undeclared properties.
28+
* This is a holder for any undeclared properties as specified with
29+
* the 'additionalProperties' keyword in the OAS document.
30+
*/
31+
"additionalProperties"?: { [key: string]: any };
32+
33+
/**
34+
* @ignore
35+
*/
36+
"_unparsed"?: boolean;
37+
38+
/**
39+
* @ignore
40+
*/
41+
static readonly attributeTypeMap: AttributeTypeMap = {
42+
header: {
43+
baseName: "header",
44+
type: "string",
45+
},
46+
parameter: {
47+
baseName: "parameter",
48+
type: "string",
49+
},
50+
pointer: {
51+
baseName: "pointer",
52+
type: "string",
53+
},
54+
additionalProperties: {
55+
baseName: "additionalProperties",
56+
type: "any",
57+
},
58+
};
59+
60+
/**
61+
* @ignore
62+
*/
63+
static getAttributeTypeMap(): AttributeTypeMap {
64+
return JSONAPIErrorItemSource.attributeTypeMap;
65+
}
66+
67+
public constructor() {}
68+
}

packages/datadog-api-client-v2/models/ObjectSerializer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,7 @@ import { InputSchemaDataAttributesParametersItemsDataAttributes } from "./InputS
686686
import { IntakePayloadAccepted } from "./IntakePayloadAccepted";
687687
import { InterfaceAttributes } from "./InterfaceAttributes";
688688
import { JSONAPIErrorItem } from "./JSONAPIErrorItem";
689+
import { JSONAPIErrorItemSource } from "./JSONAPIErrorItemSource";
689690
import { JSONAPIErrorResponse } from "./JSONAPIErrorResponse";
690691
import { JiraIntegrationMetadata } from "./JiraIntegrationMetadata";
691692
import { JiraIntegrationMetadataIssuesItem } from "./JiraIntegrationMetadataIssuesItem";
@@ -3057,6 +3058,7 @@ const typeMap: { [index: string]: any } = {
30573058
IntakePayloadAccepted: IntakePayloadAccepted,
30583059
InterfaceAttributes: InterfaceAttributes,
30593060
JSONAPIErrorItem: JSONAPIErrorItem,
3061+
JSONAPIErrorItemSource: JSONAPIErrorItemSource,
30603062
JSONAPIErrorResponse: JSONAPIErrorResponse,
30613063
JiraIntegrationMetadata: JiraIntegrationMetadata,
30623064
JiraIntegrationMetadataIssuesItem: JiraIntegrationMetadataIssuesItem,

0 commit comments

Comments
 (0)