From 732a75e58dc7e4c0b0b9d7627e97ac52cfc49552 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 14 Mar 2024 19:02:19 +0000 Subject: [PATCH] Regenerate client from commit 0197a1bb of spec repo --- .apigentools-info | 8 ++++---- .generator/schemas/v2/openapi.yaml | 8 ++++++++ .../CreateOrUpdateServiceDefinitions.rb | 4 ++++ features/v2/service_definition.feature | 6 +++--- .../v2/models/service_definition_v2_dot2.rb | 14 +++++++++++++- 5 files changed, 32 insertions(+), 8 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index 50e83529c02..c4d9937d2bb 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-03-13 19:22:36.703012", - "spec_repo_commit": "5745e5bb" + "regenerated": "2024-03-14 19:01:46.365230", + "spec_repo_commit": "0197a1bb" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-03-13 19:22:36.718532", - "spec_repo_commit": "5745e5bb" + "regenerated": "2024-03-14 19:01:46.389657", + "spec_repo_commit": "0197a1bb" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index f1c186a8563..2d9fdd28526 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -19683,6 +19683,14 @@ components: feature, which the service is a part of. example: my-app type: string + ci-pipeline-fingerprints: + description: A set of CI fingerprints. + example: + - j88xdEy0J5lc + - eZ7LMljCk8vo + items: + type: string + type: array contacts: description: A list of contacts related to the services. items: diff --git a/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb b/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb index ed1015f99da..d47d1fa6f2b 100644 --- a/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +++ b/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb @@ -5,6 +5,10 @@ body = DatadogAPIClient::V2::ServiceDefinitionV2Dot2.new({ application: "my-app", + ci_pipeline_fingerprints: [ + "j88xdEy0J5lc", + "eZ7LMljCk8vo", + ], contacts: [ DatadogAPIClient::V2::ServiceDefinitionV2Dot2Contact.new({ contact: "https://teams.microsoft.com/myteam", diff --git a/features/v2/service_definition.feature b/features/v2/service_definition.feature index b7de3667d7e..5c74a74b367 100644 --- a/features/v2/service_definition.feature +++ b/features/v2/service_definition.feature @@ -10,21 +10,21 @@ Feature: Service Definition @generated @skip @team:DataDog/service-catalog Scenario: Create or update service definition returns "Bad Request" response Given new "CreateOrUpdateServiceDefinitions" request - And body with value {"application": "my-app", "contacts": [{"contact": "https://teams.microsoft.com/myteam", "name": "My team channel", "type": "slack"}], "dd-service": "my-service", "description": "My service description", "extensions": {"myorg/extension": "extensionValue"}, "integrations": {"opsgenie": {"region": "US", "service-url": "https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000"}, "pagerduty": {"service-url": "https://my-org.pagerduty.com/service-directory/PMyService"}}, "languages": ["dotnet", "go", "java", "js", "php", "python", "ruby", "c++"], "lifecycle": "sandbox", "links": [{"name": "Runbook", "provider": "Github", "type": "runbook", "url": "https://my-runbook"}], "schema-version": "v2.2", "tags": ["my:tag", "service:tag"], "team": "my-team", "tier": "High", "type": "web"} + And body with value {"application": "my-app", "ci-pipeline-fingerprints": ["j88xdEy0J5lc", "eZ7LMljCk8vo"], "contacts": [{"contact": "https://teams.microsoft.com/myteam", "name": "My team channel", "type": "slack"}], "dd-service": "my-service", "description": "My service description", "extensions": {"myorg/extension": "extensionValue"}, "integrations": {"opsgenie": {"region": "US", "service-url": "https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000"}, "pagerduty": {"service-url": "https://my-org.pagerduty.com/service-directory/PMyService"}}, "languages": ["dotnet", "go", "java", "js", "php", "python", "ruby", "c++"], "lifecycle": "sandbox", "links": [{"name": "Runbook", "provider": "Github", "type": "runbook", "url": "https://my-runbook"}], "schema-version": "v2.2", "tags": ["my:tag", "service:tag"], "team": "my-team", "tier": "High", "type": "web"} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/service-catalog Scenario: Create or update service definition returns "CREATED" response Given new "CreateOrUpdateServiceDefinitions" request - And body with value {"application": "my-app", "contacts": [{"contact": "https://teams.microsoft.com/myteam", "name": "My team channel", "type": "slack"}], "dd-service": "my-service", "description": "My service description", "extensions": {"myorg/extension": "extensionValue"}, "integrations": {"opsgenie": {"region": "US", "service-url": "https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000"}, "pagerduty": {"service-url": "https://my-org.pagerduty.com/service-directory/PMyService"}}, "languages": ["dotnet", "go", "java", "js", "php", "python", "ruby", "c++"], "lifecycle": "sandbox", "links": [{"name": "Runbook", "provider": "Github", "type": "runbook", "url": "https://my-runbook"}], "schema-version": "v2.2", "tags": ["my:tag", "service:tag"], "team": "my-team", "tier": "High", "type": "web"} + And body with value {"application": "my-app", "ci-pipeline-fingerprints": ["j88xdEy0J5lc", "eZ7LMljCk8vo"], "contacts": [{"contact": "https://teams.microsoft.com/myteam", "name": "My team channel", "type": "slack"}], "dd-service": "my-service", "description": "My service description", "extensions": {"myorg/extension": "extensionValue"}, "integrations": {"opsgenie": {"region": "US", "service-url": "https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000"}, "pagerduty": {"service-url": "https://my-org.pagerduty.com/service-directory/PMyService"}}, "languages": ["dotnet", "go", "java", "js", "php", "python", "ruby", "c++"], "lifecycle": "sandbox", "links": [{"name": "Runbook", "provider": "Github", "type": "runbook", "url": "https://my-runbook"}], "schema-version": "v2.2", "tags": ["my:tag", "service:tag"], "team": "my-team", "tier": "High", "type": "web"} When the request is sent Then the response status is 200 CREATED @generated @skip @team:DataDog/service-catalog Scenario: Create or update service definition returns "Conflict" response Given new "CreateOrUpdateServiceDefinitions" request - And body with value {"application": "my-app", "contacts": [{"contact": "https://teams.microsoft.com/myteam", "name": "My team channel", "type": "slack"}], "dd-service": "my-service", "description": "My service description", "extensions": {"myorg/extension": "extensionValue"}, "integrations": {"opsgenie": {"region": "US", "service-url": "https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000"}, "pagerduty": {"service-url": "https://my-org.pagerduty.com/service-directory/PMyService"}}, "languages": ["dotnet", "go", "java", "js", "php", "python", "ruby", "c++"], "lifecycle": "sandbox", "links": [{"name": "Runbook", "provider": "Github", "type": "runbook", "url": "https://my-runbook"}], "schema-version": "v2.2", "tags": ["my:tag", "service:tag"], "team": "my-team", "tier": "High", "type": "web"} + And body with value {"application": "my-app", "ci-pipeline-fingerprints": ["j88xdEy0J5lc", "eZ7LMljCk8vo"], "contacts": [{"contact": "https://teams.microsoft.com/myteam", "name": "My team channel", "type": "slack"}], "dd-service": "my-service", "description": "My service description", "extensions": {"myorg/extension": "extensionValue"}, "integrations": {"opsgenie": {"region": "US", "service-url": "https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000"}, "pagerduty": {"service-url": "https://my-org.pagerduty.com/service-directory/PMyService"}}, "languages": ["dotnet", "go", "java", "js", "php", "python", "ruby", "c++"], "lifecycle": "sandbox", "links": [{"name": "Runbook", "provider": "Github", "type": "runbook", "url": "https://my-runbook"}], "schema-version": "v2.2", "tags": ["my:tag", "service:tag"], "team": "my-team", "tier": "High", "type": "web"} When the request is sent Then the response status is 409 Conflict diff --git a/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb b/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb index e7a559b8798..819803972e1 100644 --- a/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb +++ b/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb @@ -24,6 +24,9 @@ class ServiceDefinitionV2Dot2 # Identifier for a group of related services serving a product feature, which the service is a part of. attr_accessor :application + # A set of CI fingerprints. + attr_accessor :ci_pipeline_fingerprints + # A list of contacts related to the services. attr_accessor :contacts @@ -68,6 +71,7 @@ class ServiceDefinitionV2Dot2 def self.attribute_map { :'application' => :'application', + :'ci_pipeline_fingerprints' => :'ci-pipeline-fingerprints', :'contacts' => :'contacts', :'dd_service' => :'dd-service', :'description' => :'description', @@ -89,6 +93,7 @@ def self.attribute_map def self.openapi_types { :'application' => :'String', + :'ci_pipeline_fingerprints' => :'Array', :'contacts' => :'Array', :'dd_service' => :'String', :'description' => :'String', @@ -125,6 +130,12 @@ def initialize(attributes = {}) self.application = attributes[:'application'] end + if attributes.key?(:'ci_pipeline_fingerprints') + if (value = attributes[:'ci_pipeline_fingerprints']).is_a?(Array) + self.ci_pipeline_fingerprints = value + end + end + if attributes.key?(:'contacts') if (value = attributes[:'contacts']).is_a?(Array) self.contacts = value @@ -222,6 +233,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && application == o.application && + ci_pipeline_fingerprints == o.ci_pipeline_fingerprints && contacts == o.contacts && dd_service == o.dd_service && description == o.description && @@ -241,7 +253,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [application, contacts, dd_service, description, extensions, integrations, languages, lifecycle, links, schema_version, tags, team, tier, type].hash + [application, ci_pipeline_fingerprints, contacts, dd_service, description, extensions, integrations, languages, lifecycle, links, schema_version, tags, team, tier, type].hash end end end