Skip to content

Add API spec for severity modifiers automation pipelines - #4765

Open
api-clients-generation-pipeline[bot] wants to merge 1 commit into
masterfrom
datadog-api-spec/generated/6306
Open

Add API spec for severity modifiers automation pipelines#4765
api-clients-generation-pipeline[bot] wants to merge 1 commit into
masterfrom
datadog-api-spec/generated/6306

Conversation

@api-clients-generation-pipeline

Copy link
Copy Markdown
Contributor

Comment on lines +10920 to +11004
const body: DueDateRuleResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"DueDateRuleResponse"
) as DueDateRuleResponse;
return body;
}
if (response.httpStatusCode === 400 || response.httpStatusCode === 422) {
const bodyText = ObjectSerializer.parse(
await response.body.text(),
contentType
);
let body: JSONAPIErrorResponse;
try {
body = ObjectSerializer.deserialize(
bodyText,
"JSONAPIErrorResponse"
) as JSONAPIErrorResponse;
} catch (error) {
logger.debug(`Got error deserializing error: ${error}`);
throw new ApiException<JSONAPIErrorResponse>(
response.httpStatusCode,
bodyText
);
}
throw new ApiException<JSONAPIErrorResponse>(
response.httpStatusCode,
body
);
}
if (response.httpStatusCode === 403 || response.httpStatusCode === 429) {
const bodyText = ObjectSerializer.parse(
await response.body.text(),
contentType
);
let body: APIErrorResponse;
try {
body = ObjectSerializer.deserialize(
bodyText,
"APIErrorResponse"
) as APIErrorResponse;
} catch (error) {
logger.debug(`Got error deserializing error: ${error}`);
throw new ApiException<APIErrorResponse>(
response.httpStatusCode,
bodyText
);
}
throw new ApiException<APIErrorResponse>(response.httpStatusCode, body);
}

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

const body = (await response.body.text()) || "";
throw new ApiException<string>(
response.httpStatusCode,
'Unknown API Status Code!\nBody: "' + body + '"'
);
}

/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to createSecurityFindingsAutomationMuteRule
* @throws ApiException if the response code was not in [200, 299]
*/
public async createSecurityFindingsAutomationMuteRule(
response: ResponseContext
): Promise<MuteRuleResponse> {
const contentType = ObjectSerializer.normalizeMediaType(
response.headers["content-type"]
);
if (response.httpStatusCode === 201) {
const body: MuteRuleResponse = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"DueDateRuleResponse"
) as DueDateRuleResponse;
"MuteRuleResponse"
) as MuteRuleResponse;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no due date / mute rules change, it's just the git diff algorithm being confused about which lines were "moved" vs "added".

@BusyBeaver-42 BusyBeaver-42 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No diff unrelated to severity modifiers.

@api-clients-generation-pipeline
api-clients-generation-pipeline Bot force-pushed the datadog-api-spec/generated/6306 branch from adc1ba6 to c509281 Compare August 4, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant