Skip to content

Commit 3e7d9e2

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 82e0b7e of spec repo
1 parent a3d7553 commit 3e7d9e2

27 files changed

+2382
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17294,11 +17294,199 @@ components:
1729417294
schema:
1729517295
$ref: '#/components/schemas/EntityToSchema'
1729617296
type: object
17297+
EntityResponseArray:
17298+
properties:
17299+
data:
17300+
items:
17301+
$ref: '#/components/schemas/PreviewEntityResponseData'
17302+
type: array
17303+
required:
17304+
- data
17305+
type: object
1729717306
EntityResponseData:
1729817307
description: List of entity data.
1729917308
items:
1730017309
$ref: '#/components/schemas/EntityData'
1730117310
type: array
17311+
EntityResponseDataAttributes:
17312+
properties:
17313+
apiVersion:
17314+
type: string
17315+
description:
17316+
type: string
17317+
displayName:
17318+
type: string
17319+
kind:
17320+
type: string
17321+
name:
17322+
type: string
17323+
namespace:
17324+
type: string
17325+
owner:
17326+
type: string
17327+
properties: {}
17328+
tags:
17329+
items:
17330+
type: string
17331+
type: array
17332+
type: object
17333+
EntityResponseDataRelationships:
17334+
properties:
17335+
incidents:
17336+
$ref: '#/components/schemas/EntityResponseDataRelationshipsIncidents'
17337+
oncalls:
17338+
$ref: '#/components/schemas/EntityResponseDataRelationshipsOncalls'
17339+
rawSchema:
17340+
$ref: '#/components/schemas/EntityResponseDataRelationshipsRawSchema'
17341+
relatedEntities:
17342+
$ref: '#/components/schemas/EntityResponseDataRelationshipsRelatedEntities'
17343+
schema:
17344+
$ref: '#/components/schemas/EntityResponseDataRelationshipsSchema'
17345+
type: object
17346+
EntityResponseDataRelationshipsIncidents:
17347+
properties:
17348+
data:
17349+
items:
17350+
$ref: '#/components/schemas/EntityResponseDataRelationshipsIncidentsDataItems'
17351+
type: array
17352+
type: object
17353+
EntityResponseDataRelationshipsIncidentsDataItems:
17354+
properties:
17355+
id:
17356+
example: ''
17357+
type: string
17358+
type:
17359+
$ref: '#/components/schemas/EntityResponseDataRelationshipsIncidentsDataItemsType'
17360+
required:
17361+
- type
17362+
- id
17363+
type: object
17364+
EntityResponseDataRelationshipsIncidentsDataItemsType:
17365+
default: incident
17366+
description: Incident resource type.
17367+
enum:
17368+
- incident
17369+
example: incident
17370+
type: string
17371+
x-enum-varnames:
17372+
- INCIDENT
17373+
EntityResponseDataRelationshipsOncalls:
17374+
properties:
17375+
data:
17376+
items:
17377+
$ref: '#/components/schemas/EntityResponseDataRelationshipsOncallsDataItems'
17378+
type: array
17379+
type: object
17380+
EntityResponseDataRelationshipsOncallsDataItems:
17381+
properties:
17382+
id:
17383+
example: ''
17384+
type: string
17385+
type:
17386+
$ref: '#/components/schemas/EntityResponseDataRelationshipsOncallsDataItemsType'
17387+
required:
17388+
- type
17389+
- id
17390+
type: object
17391+
EntityResponseDataRelationshipsOncallsDataItemsType:
17392+
default: oncall
17393+
description: Oncall resource type.
17394+
enum:
17395+
- oncall
17396+
example: oncall
17397+
type: string
17398+
x-enum-varnames:
17399+
- ONCALL
17400+
EntityResponseDataRelationshipsRawSchema:
17401+
properties:
17402+
data:
17403+
$ref: '#/components/schemas/EntityResponseDataRelationshipsRawSchemaData'
17404+
required:
17405+
- data
17406+
type: object
17407+
EntityResponseDataRelationshipsRawSchemaData:
17408+
properties:
17409+
id:
17410+
example: ''
17411+
type: string
17412+
type:
17413+
$ref: '#/components/schemas/EntityResponseDataRelationshipsRawSchemaDataType'
17414+
required:
17415+
- type
17416+
- id
17417+
type: object
17418+
EntityResponseDataRelationshipsRawSchemaDataType:
17419+
default: rawSchema
17420+
description: Raw schema resource type.
17421+
enum:
17422+
- rawSchema
17423+
example: rawSchema
17424+
type: string
17425+
x-enum-varnames:
17426+
- RAWSCHEMA
17427+
EntityResponseDataRelationshipsRelatedEntities:
17428+
properties:
17429+
data:
17430+
items:
17431+
$ref: '#/components/schemas/EntityResponseDataRelationshipsRelatedEntitiesDataItems'
17432+
type: array
17433+
type: object
17434+
EntityResponseDataRelationshipsRelatedEntitiesDataItems:
17435+
properties:
17436+
id:
17437+
example: ''
17438+
type: string
17439+
type:
17440+
$ref: '#/components/schemas/EntityResponseDataRelationshipsRelatedEntitiesDataItemsType'
17441+
required:
17442+
- type
17443+
- id
17444+
type: object
17445+
EntityResponseDataRelationshipsRelatedEntitiesDataItemsType:
17446+
default: relatedEntity
17447+
description: Related entity resource type.
17448+
enum:
17449+
- relatedEntity
17450+
example: relatedEntity
17451+
type: string
17452+
x-enum-varnames:
17453+
- RELATEDENTITY
17454+
EntityResponseDataRelationshipsSchema:
17455+
properties:
17456+
data:
17457+
$ref: '#/components/schemas/EntityResponseDataRelationshipsSchemaData'
17458+
required:
17459+
- data
17460+
type: object
17461+
EntityResponseDataRelationshipsSchemaData:
17462+
properties:
17463+
id:
17464+
example: ''
17465+
type: string
17466+
type:
17467+
$ref: '#/components/schemas/EntityResponseDataRelationshipsSchemaDataType'
17468+
required:
17469+
- type
17470+
- id
17471+
type: object
17472+
EntityResponseDataRelationshipsSchemaDataType:
17473+
default: schema
17474+
description: Schema resource type.
17475+
enum:
17476+
- schema
17477+
example: schema
17478+
type: string
17479+
x-enum-varnames:
17480+
- SCHEMA
17481+
EntityResponseDataType:
17482+
default: entity
17483+
description: Entity resource type.
17484+
enum:
17485+
- entity
17486+
example: entity
17487+
type: string
17488+
x-enum-varnames:
17489+
- ENTITY
1730217490
EntityResponseIncludedIncident:
1730317491
description: Included incident.
1730417492
properties:
@@ -37681,6 +37869,19 @@ components:
3768137869
description: Offset type.
3768237870
type: string
3768337871
type: object
37872+
PreviewEntityResponseData:
37873+
properties:
37874+
attributes:
37875+
$ref: '#/components/schemas/EntityResponseDataAttributes'
37876+
id:
37877+
type: string
37878+
relationships:
37879+
$ref: '#/components/schemas/EntityResponseDataRelationships'
37880+
type:
37881+
$ref: '#/components/schemas/EntityResponseDataType'
37882+
required:
37883+
- type
37884+
type: object
3768437885
ProcessSummariesMeta:
3768537886
description: Response metadata object.
3768637887
properties:
@@ -58421,6 +58622,27 @@ paths:
5842158622
tags:
5842258623
- Software Catalog
5842358624
x-codegen-request-body-name: body
58625+
/api/v2/catalog/entity/preview:
58626+
post:
58627+
operationId: PreviewCatalogEntities
58628+
responses:
58629+
'202':
58630+
content:
58631+
application/json:
58632+
schema:
58633+
$ref: '#/components/schemas/EntityResponseArray'
58634+
description: Accepted
58635+
'429':
58636+
$ref: '#/components/responses/TooManyRequestsResponse'
58637+
security:
58638+
- apiKeyAuth: []
58639+
appKeyAuth: []
58640+
- AuthZ:
58641+
- apm_service_catalog_read
58642+
summary: Preview catalog entities
58643+
tags:
58644+
- Software Catalog
58645+
x-unstable: '**Note**: This endpoint may be subject to changes.'
5842458646
/api/v2/catalog/entity/{entity_id}:
5842558647
delete:
5842658648
description: Delete a single entity in Software Catalog.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Preview catalog entities returns "Accepted" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.preview_catalog_entities".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::SoftwareCatalogAPI.new
8+
p api_instance.preview_catalog_entities()

features/v2/software_catalog.feature

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,10 @@ Feature: Software Catalog
144144
And request contains "page[limit]" parameter with value 20
145145
When the request with pagination is sent
146146
Then the response status is 200 OK
147+
148+
@generated @skip @team:DataDog/service-catalog
149+
Scenario: Preview catalog entities returns "Accepted" response
150+
Given operation "PreviewCatalogEntities" enabled
151+
And new "PreviewCatalogEntities" request
152+
When the request is sent
153+
Then the response status is 202 Accepted

features/v2/undo.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,14 @@
751751
"type": "unsafe"
752752
}
753753
},
754+
"PreviewCatalogEntities": {
755+
"tag": "Software Catalog",
756+
"undo": {
757+
"operationId": "TODO",
758+
"parameters": [],
759+
"type": "unsafe"
760+
}
761+
},
754762
"DeleteCatalogEntity": {
755763
"tag": "Software Catalog",
756764
"undo": {

lib/datadog_api_client/configuration.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ def initialize
198198
"v2.get_open_api": false,
199199
"v2.list_apis": false,
200200
"v2.update_open_api": false,
201+
"v2.preview_catalog_entities": false,
201202
"v2.cancel_threat_hunting_job": false,
202203
"v2.convert_job_result_to_signal": false,
203204
"v2.delete_threat_hunting_job": false,

lib/datadog_api_client/inflector.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1954,6 +1954,25 @@ def overrides
19541954
"v2.entity_data" => "EntityData",
19551955
"v2.entity_meta" => "EntityMeta",
19561956
"v2.entity_relationships" => "EntityRelationships",
1957+
"v2.entity_response_array" => "EntityResponseArray",
1958+
"v2.entity_response_data_attributes" => "EntityResponseDataAttributes",
1959+
"v2.entity_response_data_relationships" => "EntityResponseDataRelationships",
1960+
"v2.entity_response_data_relationships_incidents" => "EntityResponseDataRelationshipsIncidents",
1961+
"v2.entity_response_data_relationships_incidents_data_items" => "EntityResponseDataRelationshipsIncidentsDataItems",
1962+
"v2.entity_response_data_relationships_incidents_data_items_type" => "EntityResponseDataRelationshipsIncidentsDataItemsType",
1963+
"v2.entity_response_data_relationships_oncalls" => "EntityResponseDataRelationshipsOncalls",
1964+
"v2.entity_response_data_relationships_oncalls_data_items" => "EntityResponseDataRelationshipsOncallsDataItems",
1965+
"v2.entity_response_data_relationships_oncalls_data_items_type" => "EntityResponseDataRelationshipsOncallsDataItemsType",
1966+
"v2.entity_response_data_relationships_raw_schema" => "EntityResponseDataRelationshipsRawSchema",
1967+
"v2.entity_response_data_relationships_raw_schema_data" => "EntityResponseDataRelationshipsRawSchemaData",
1968+
"v2.entity_response_data_relationships_raw_schema_data_type" => "EntityResponseDataRelationshipsRawSchemaDataType",
1969+
"v2.entity_response_data_relationships_related_entities" => "EntityResponseDataRelationshipsRelatedEntities",
1970+
"v2.entity_response_data_relationships_related_entities_data_items" => "EntityResponseDataRelationshipsRelatedEntitiesDataItems",
1971+
"v2.entity_response_data_relationships_related_entities_data_items_type" => "EntityResponseDataRelationshipsRelatedEntitiesDataItemsType",
1972+
"v2.entity_response_data_relationships_schema" => "EntityResponseDataRelationshipsSchema",
1973+
"v2.entity_response_data_relationships_schema_data" => "EntityResponseDataRelationshipsSchemaData",
1974+
"v2.entity_response_data_relationships_schema_data_type" => "EntityResponseDataRelationshipsSchemaDataType",
1975+
"v2.entity_response_data_type" => "EntityResponseDataType",
19571976
"v2.entity_response_included_incident" => "EntityResponseIncludedIncident",
19581977
"v2.entity_response_included_incident_type" => "EntityResponseIncludedIncidentType",
19591978
"v2.entity_response_included_oncall" => "EntityResponseIncludedOncall",
@@ -3291,6 +3310,7 @@ def overrides
32913310
"v2.powerpacks_response_meta" => "PowerpacksResponseMeta",
32923311
"v2.powerpacks_response_meta_pagination" => "PowerpacksResponseMetaPagination",
32933312
"v2.powerpack_template_variable" => "PowerpackTemplateVariable",
3313+
"v2.preview_entity_response_data" => "PreviewEntityResponseData",
32943314
"v2.process_summaries_meta" => "ProcessSummariesMeta",
32953315
"v2.process_summaries_meta_page" => "ProcessSummariesMetaPage",
32963316
"v2.process_summaries_response" => "ProcessSummariesResponse",

lib/datadog_api_client/v2/api/software_catalog_api.rb

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,69 @@ def list_catalog_relation_with_pagination(opts = {})
452452
end
453453
end
454454

455+
# Preview catalog entities.
456+
#
457+
# @see #preview_catalog_entities_with_http_info
458+
def preview_catalog_entities(opts = {})
459+
data, _status_code, _headers = preview_catalog_entities_with_http_info(opts)
460+
data
461+
end
462+
463+
# Preview catalog entities.
464+
# @param opts [Hash] the optional parameters
465+
# @return [Array<(EntityResponseArray, Integer, Hash)>] EntityResponseArray data, response status code and response headers
466+
def preview_catalog_entities_with_http_info(opts = {})
467+
unstable_enabled = @api_client.config.unstable_operations["v2.preview_catalog_entities".to_sym]
468+
if unstable_enabled
469+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.preview_catalog_entities")
470+
else
471+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.preview_catalog_entities"))
472+
end
473+
474+
if @api_client.config.debugging
475+
@api_client.config.logger.debug 'Calling API: SoftwareCatalogAPI.preview_catalog_entities ...'
476+
end
477+
# resource path
478+
local_var_path = '/api/v2/catalog/entity/preview'
479+
480+
# query parameters
481+
query_params = opts[:query_params] || {}
482+
483+
# header parameters
484+
header_params = opts[:header_params] || {}
485+
# HTTP header 'Accept' (if needed)
486+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
487+
488+
# form parameters
489+
form_params = opts[:form_params] || {}
490+
491+
# http body (model)
492+
post_body = opts[:debug_body]
493+
494+
# return_type
495+
return_type = opts[:debug_return_type] || 'EntityResponseArray'
496+
497+
# auth_names
498+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
499+
500+
new_options = opts.merge(
501+
:operation => :preview_catalog_entities,
502+
:header_params => header_params,
503+
:query_params => query_params,
504+
:form_params => form_params,
505+
:body => post_body,
506+
:auth_names => auth_names,
507+
:return_type => return_type,
508+
:api_version => "V2"
509+
)
510+
511+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
512+
if @api_client.config.debugging
513+
@api_client.config.logger.debug "API called: SoftwareCatalogAPI#preview_catalog_entities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
514+
end
515+
return data, status_code, headers
516+
end
517+
455518
# Create or update entities.
456519
#
457520
# @see #upsert_catalog_entity_with_http_info

0 commit comments

Comments
 (0)