Skip to content

Commit 6f57f34

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 62732bd of spec repo
1 parent 1fc45f1 commit 6f57f34

26 files changed

Lines changed: 2849 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 531 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Delete an OAuth2 client scopes restriction returns "No Content" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.delete_scopes_restriction".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::OAuth2ClientPublicAPI.new
8+
api_instance.delete_scopes_restriction("fafa8e1c-36a5-11f0-a83d-da7ad0900001")
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Get an OAuth2 client scopes restriction returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.get_scopes_restriction".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::OAuth2ClientPublicAPI.new
8+
p api_instance.get_scopes_restriction("fafa8e1c-36a5-11f0-a83d-da7ad0900001")
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Register an OAuth2 client returns "Created" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.register_o_auth_client".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::OAuth2ClientPublicAPI.new
8+
9+
body = DatadogAPIClient::V2::OAuthClientRegistrationRequest.new({
10+
client_name: "Example MCP Client",
11+
client_uri: "https://example.com",
12+
grant_types: [
13+
DatadogAPIClient::V2::OAuthClientRegistrationGrantType::AUTHORIZATION_CODE,
14+
DatadogAPIClient::V2::OAuthClientRegistrationGrantType::REFRESH_TOKEN,
15+
],
16+
jwks_uri: "https://example.com/.well-known/jwks.json",
17+
logo_uri: "https://example.com/logo.png",
18+
policy_uri: "https://example.com/privacy",
19+
redirect_uris: [
20+
"https://example.com/oauth/callback",
21+
],
22+
response_types: [
23+
DatadogAPIClient::V2::OAuthClientRegistrationResponseType::CODE,
24+
],
25+
scope: "openid profile",
26+
token_endpoint_auth_method: "none",
27+
tos_uri: "https://example.com/tos",
28+
})
29+
p api_instance.register_o_auth_client(body)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Upsert an OAuth2 client scopes restriction returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.upsert_scopes_restriction".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::OAuth2ClientPublicAPI.new
8+
9+
body = DatadogAPIClient::V2::UpsertOAuthScopesRestrictionRequest.new({
10+
data: DatadogAPIClient::V2::UpsertOAuthScopesRestrictionData.new({
11+
attributes: DatadogAPIClient::V2::UpsertOAuthScopesRestrictionDataAttributes.new({
12+
oidc_scopes: [
13+
DatadogAPIClient::V2::OAuthOidcScope::OPENID,
14+
DatadogAPIClient::V2::OAuthOidcScope::EMAIL,
15+
],
16+
permission_scopes: [
17+
"dashboards_read",
18+
"metrics_read",
19+
],
20+
}),
21+
type: DatadogAPIClient::V2::UpsertOAuthScopesRestrictionType::UPSERT_SCOPES_RESTRICTION,
22+
}),
23+
})
24+
p api_instance.upsert_scopes_restriction("fafa8e1c-36a5-11f0-a83d-da7ad0900001", body)

features/scenarios_model_mapping.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3875,6 +3875,19 @@
38753875
"tags" => "String",
38763876
"limit" => "Integer",
38773877
},
3878+
"v2.DeleteScopesRestriction" => {
3879+
"client_uuid" => "UUID",
3880+
},
3881+
"v2.GetScopesRestriction" => {
3882+
"client_uuid" => "UUID",
3883+
},
3884+
"v2.UpsertScopesRestriction" => {
3885+
"client_uuid" => "UUID",
3886+
"body" => "UpsertOAuthScopesRestrictionRequest",
3887+
},
3888+
"v2.RegisterOAuthClient" => {
3889+
"body" => "OAuthClientRegistrationRequest",
3890+
},
38783891
"v2.ListPipelines" => {
38793892
"page_size" => "Integer",
38803893
"page_number" => "Integer",
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
@endpoint(oauth2-client-public) @endpoint(oauth2-client-public-v2)
2+
Feature: OAuth2 Client Public
3+
Configure OAuth2 clients for Datadog. Supports RFC 7591 Dynamic Client
4+
Registration and management of OAuth2 client scopes restrictions.
5+
6+
Background:
7+
Given a valid "apiKeyAuth" key in the system
8+
And a valid "appKeyAuth" key in the system
9+
And an instance of "OAuth2ClientPublic" API
10+
11+
@generated @skip @team:DataDog/delegated-auth-login
12+
Scenario: Delete an OAuth2 client scopes restriction returns "Bad Request" response
13+
Given operation "DeleteScopesRestriction" enabled
14+
And new "DeleteScopesRestriction" request
15+
And request contains "client_uuid" parameter from "REPLACE.ME"
16+
When the request is sent
17+
Then the response status is 400 Bad Request
18+
19+
@generated @skip @team:DataDog/delegated-auth-login
20+
Scenario: Delete an OAuth2 client scopes restriction returns "No Content" response
21+
Given operation "DeleteScopesRestriction" enabled
22+
And new "DeleteScopesRestriction" request
23+
And request contains "client_uuid" parameter from "REPLACE.ME"
24+
When the request is sent
25+
Then the response status is 204 No Content
26+
27+
@generated @skip @team:DataDog/delegated-auth-login
28+
Scenario: Delete an OAuth2 client scopes restriction returns "Not Found" response
29+
Given operation "DeleteScopesRestriction" enabled
30+
And new "DeleteScopesRestriction" request
31+
And request contains "client_uuid" parameter from "REPLACE.ME"
32+
When the request is sent
33+
Then the response status is 404 Not Found
34+
35+
@generated @skip @team:DataDog/delegated-auth-login
36+
Scenario: Get an OAuth2 client scopes restriction returns "Bad Request" response
37+
Given operation "GetScopesRestriction" enabled
38+
And new "GetScopesRestriction" request
39+
And request contains "client_uuid" parameter from "REPLACE.ME"
40+
When the request is sent
41+
Then the response status is 400 Bad Request
42+
43+
@generated @skip @team:DataDog/delegated-auth-login
44+
Scenario: Get an OAuth2 client scopes restriction returns "Not Found" response
45+
Given operation "GetScopesRestriction" enabled
46+
And new "GetScopesRestriction" request
47+
And request contains "client_uuid" parameter from "REPLACE.ME"
48+
When the request is sent
49+
Then the response status is 404 Not Found
50+
51+
@generated @skip @team:DataDog/delegated-auth-login
52+
Scenario: Get an OAuth2 client scopes restriction returns "OK" response
53+
Given operation "GetScopesRestriction" enabled
54+
And new "GetScopesRestriction" request
55+
And request contains "client_uuid" parameter from "REPLACE.ME"
56+
When the request is sent
57+
Then the response status is 200 OK
58+
59+
@generated @skip @team:DataDog/delegated-auth-login
60+
Scenario: Register an OAuth2 client returns "Bad Request" response
61+
Given operation "RegisterOAuthClient" enabled
62+
And new "RegisterOAuthClient" request
63+
And body with value {"client_name": "Example MCP Client", "client_uri": "https://example.com", "grant_types": ["authorization_code", "refresh_token"], "jwks_uri": "https://example.com/.well-known/jwks.json", "logo_uri": "https://example.com/logo.png", "policy_uri": "https://example.com/privacy", "redirect_uris": ["https://example.com/oauth/callback"], "response_types": ["code"], "scope": "openid profile", "token_endpoint_auth_method": "none", "tos_uri": "https://example.com/tos"}
64+
When the request is sent
65+
Then the response status is 400 Bad Request
66+
67+
@generated @skip @team:DataDog/delegated-auth-login
68+
Scenario: Register an OAuth2 client returns "Created" response
69+
Given operation "RegisterOAuthClient" enabled
70+
And new "RegisterOAuthClient" request
71+
And body with value {"client_name": "Example MCP Client", "client_uri": "https://example.com", "grant_types": ["authorization_code", "refresh_token"], "jwks_uri": "https://example.com/.well-known/jwks.json", "logo_uri": "https://example.com/logo.png", "policy_uri": "https://example.com/privacy", "redirect_uris": ["https://example.com/oauth/callback"], "response_types": ["code"], "scope": "openid profile", "token_endpoint_auth_method": "none", "tos_uri": "https://example.com/tos"}
72+
When the request is sent
73+
Then the response status is 201 Created
74+
75+
@generated @skip @team:DataDog/delegated-auth-login
76+
Scenario: Upsert an OAuth2 client scopes restriction returns "Bad Request" response
77+
Given operation "UpsertScopesRestriction" enabled
78+
And new "UpsertScopesRestriction" request
79+
And request contains "client_uuid" parameter from "REPLACE.ME"
80+
And body with value {"data": {"attributes": {"oidc_scopes": ["openid", "email"], "permission_scopes": ["dashboards_read", "metrics_read"]}, "type": "upsert_scopes_restriction"}}
81+
When the request is sent
82+
Then the response status is 400 Bad Request
83+
84+
@generated @skip @team:DataDog/delegated-auth-login
85+
Scenario: Upsert an OAuth2 client scopes restriction returns "Not Found" response
86+
Given operation "UpsertScopesRestriction" enabled
87+
And new "UpsertScopesRestriction" request
88+
And request contains "client_uuid" parameter from "REPLACE.ME"
89+
And body with value {"data": {"attributes": {"oidc_scopes": ["openid", "email"], "permission_scopes": ["dashboards_read", "metrics_read"]}, "type": "upsert_scopes_restriction"}}
90+
When the request is sent
91+
Then the response status is 404 Not Found
92+
93+
@generated @skip @team:DataDog/delegated-auth-login
94+
Scenario: Upsert an OAuth2 client scopes restriction returns "OK" response
95+
Given operation "UpsertScopesRestriction" enabled
96+
And new "UpsertScopesRestriction" request
97+
And request contains "client_uuid" parameter from "REPLACE.ME"
98+
And body with value {"data": {"attributes": {"oidc_scopes": ["openid", "email"], "permission_scopes": ["dashboards_read", "metrics_read"]}, "type": "upsert_scopes_restriction"}}
99+
When the request is sent
100+
Then the response status is 200 OK

features/v2/undo.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4666,6 +4666,30 @@
46664666
"type": "safe"
46674667
}
46684668
},
4669+
"DeleteScopesRestriction": {
4670+
"tag": "OAuth2 Client Public",
4671+
"undo": {
4672+
"type": "idempotent"
4673+
}
4674+
},
4675+
"GetScopesRestriction": {
4676+
"tag": "OAuth2 Client Public",
4677+
"undo": {
4678+
"type": "safe"
4679+
}
4680+
},
4681+
"UpsertScopesRestriction": {
4682+
"tag": "OAuth2 Client Public",
4683+
"undo": {
4684+
"type": "idempotent"
4685+
}
4686+
},
4687+
"RegisterOAuthClient": {
4688+
"tag": "OAuth2 Client Public",
4689+
"undo": {
4690+
"type": "idempotent"
4691+
}
4692+
},
46694693
"ListPipelines": {
46704694
"tag": "Observability Pipelines",
46714695
"undo": {

lib/datadog_api_client/configuration.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,10 @@ def initialize
520520
"v2.update_monitor_user_template": false,
521521
"v2.validate_existing_monitor_user_template": false,
522522
"v2.validate_monitor_user_template": false,
523+
"v2.delete_scopes_restriction": false,
524+
"v2.get_scopes_restriction": false,
525+
"v2.register_o_auth_client": false,
526+
"v2.upsert_scopes_restriction": false,
523527
"v2.bulk_update_org_group_memberships": false,
524528
"v2.create_org_group": false,
525529
"v2.create_org_group_policy": false,

lib/datadog_api_client/inflector.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4439,6 +4439,17 @@ def overrides
44394439
"v2.nullable_relationship_to_user_data" => "NullableRelationshipToUserData",
44404440
"v2.nullable_user_relationship" => "NullableUserRelationship",
44414441
"v2.nullable_user_relationship_data" => "NullableUserRelationshipData",
4442+
"v2.o_auth_client_registration_error" => "OAuthClientRegistrationError",
4443+
"v2.o_auth_client_registration_grant_type" => "OAuthClientRegistrationGrantType",
4444+
"v2.o_auth_client_registration_request" => "OAuthClientRegistrationRequest",
4445+
"v2.o_auth_client_registration_response" => "OAuthClientRegistrationResponse",
4446+
"v2.o_auth_client_registration_response_type" => "OAuthClientRegistrationResponseType",
4447+
"v2.o_auth_oidc_scope" => "OAuthOidcScope",
4448+
"v2.o_auth_scopes_restriction" => "OAuthScopesRestriction",
4449+
"v2.o_auth_scopes_restriction_response" => "OAuthScopesRestrictionResponse",
4450+
"v2.o_auth_scopes_restriction_response_attributes" => "OAuthScopesRestrictionResponseAttributes",
4451+
"v2.o_auth_scopes_restriction_response_data" => "OAuthScopesRestrictionResponseData",
4452+
"v2.o_auth_scopes_restriction_type" => "OAuthScopesRestrictionType",
44424453
"v2.observability_pipeline" => "ObservabilityPipeline",
44434454
"v2.observability_pipeline_add_env_vars_processor" => "ObservabilityPipelineAddEnvVarsProcessor",
44444455
"v2.observability_pipeline_add_env_vars_processor_type" => "ObservabilityPipelineAddEnvVarsProcessorType",
@@ -6826,6 +6837,10 @@ def overrides
68266837
"v2.upsert_cloud_inventory_sync_config_request" => "UpsertCloudInventorySyncConfigRequest",
68276838
"v2.upsert_cloud_inventory_sync_config_request_attributes" => "UpsertCloudInventorySyncConfigRequestAttributes",
68286839
"v2.upsert_cloud_inventory_sync_config_request_data" => "UpsertCloudInventorySyncConfigRequestData",
6840+
"v2.upsert_o_auth_scopes_restriction_data" => "UpsertOAuthScopesRestrictionData",
6841+
"v2.upsert_o_auth_scopes_restriction_data_attributes" => "UpsertOAuthScopesRestrictionDataAttributes",
6842+
"v2.upsert_o_auth_scopes_restriction_request" => "UpsertOAuthScopesRestrictionRequest",
6843+
"v2.upsert_o_auth_scopes_restriction_type" => "UpsertOAuthScopesRestrictionType",
68296844
"v2.urgency" => "Urgency",
68306845
"v2.url_param" => "UrlParam",
68316846
"v2.url_param_update" => "UrlParamUpdate",
@@ -7092,6 +7107,7 @@ def overrides
70927107
"v2.model_lab_api_api" => "ModelLabAPIAPI",
70937108
"v2.monitors_api" => "MonitorsAPI",
70947109
"v2.network_device_monitoring_api" => "NetworkDeviceMonitoringAPI",
7110+
"v2.o_auth2_client_public_api" => "OAuth2ClientPublicAPI",
70957111
"v2.observability_pipelines_api" => "ObservabilityPipelinesAPI",
70967112
"v2.oci_integration_api" => "OCIIntegrationAPI",
70977113
"v2.okta_integration_api" => "OktaIntegrationAPI",

0 commit comments

Comments
 (0)