Skip to content

Commit

Permalink
sort enabled operations (#1905)
Browse files Browse the repository at this point in the history
* sort enabled operations

* pre-commit fixes

---------

Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
  • Loading branch information
amaskara-dd and ci.datadog-api-spec authored Nov 12, 2024
1 parent 01520fe commit f2bfc1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .generator/src/generator/templates/example.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as fs from "fs";
import { client, {{ version }} } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
{%- for operation in context._enable_operations %}
{%- for operation in context._enable_operations|sort %}
configuration.unstableOperations["{{ version }}.{{ operation|untitle_case }}"] = true;
{%- endfor %}
const apiInstance = new {{ version }}.{{ context.api_instance.name }}Api(configuration);
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/security-monitoring/CancelHistoricalJob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
configuration.unstableOperations["v2.runHistoricalJob"] = true;
configuration.unstableOperations["v2.cancelHistoricalJob"] = true;
configuration.unstableOperations["v2.runHistoricalJob"] = true;
const apiInstance = new v2.SecurityMonitoringApi(configuration);

// there is a valid "historical_job" in the system
Expand Down

0 comments on commit f2bfc1d

Please sign in to comment.