Skip to content

Commit

Permalink
Add required examples rule (#2647)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <[email protected]>
Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Aug 21, 2024
1 parent 8dd07ca commit 07cfeeb
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-08-20 17:44:45.989848",
"spec_repo_commit": "2d74b3a8"
"regenerated": "2024-08-21 13:16:22.479900",
"spec_repo_commit": "be697120"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-08-20 17:44:46.008292",
"spec_repo_commit": "2d74b3a8"
"regenerated": "2024-08-21 13:16:22.498303",
"spec_repo_commit": "be697120"
}
}
}
22 changes: 22 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ components:
properties:
errors:
description: Array of errors returned by the API.
example:
- Bad Request
items:
description: Error description.
example: Bad Request
Expand Down Expand Up @@ -1683,6 +1685,10 @@ components:
description: Points relating to the distribution point metric. All points
must be tuples with timestamp and a list of values (cannot be a string).
Timestamps should be in POSIX time in seconds.
example:
- - 1575317847.0
- - 0.5
- 1.0
items:
$ref: '#/components/schemas/DistributionPoint'
type: array
Expand Down Expand Up @@ -9313,13 +9319,17 @@ components:
properties:
keys:
description: Keys to split on.
example:
- environment
items:
description: A key to split on.
example: environment
type: string
type: array
tags:
description: Tags to split on.
example:
- environment:staging
items:
description: A tag to split on.
example: environment:staging
Expand Down Expand Up @@ -10532,6 +10542,7 @@ components:
description: A formula and function query.
example:
data_source: metrics
name: query1
query: sum:trace.servlet.request.hits{*} by {env}.as_count()
oneOf:
- $ref: '#/components/schemas/FormulaAndFunctionMetricQueryDefinition'
Expand Down Expand Up @@ -11596,13 +11607,19 @@ components:
formulas:
description: A list that contains exactly one formula, as only a single
formula may be used in a time-slice SLO.
example:
- formula: query1 - default_zero(query2)
items:
$ref: '#/components/schemas/SLOFormula'
maxItems: 1
minItems: 1
type: array
queries:
description: A list of queries that are used to calculate the SLI value.
example:
- data_source: metrics
name: query1
query: sum:trace.servlet.request.hits{*} by {env}.as_count()
items:
$ref: '#/components/schemas/SLODataSourceQueryDefinition'
type: array
Expand Down Expand Up @@ -12317,6 +12334,9 @@ components:
timestamp and a scalar value (cannot be a string). Timestamps should be
in POSIX time in seconds, and cannot be more than ten minutes in the future
or more than one hour in the past.
example:
- - 1575317847.0
- 0.5
items:
$ref: '#/components/schemas/Point'
type: array
Expand Down Expand Up @@ -13164,6 +13184,8 @@ components:
$ref: '#/components/schemas/SplitSort'
split_dimensions:
description: The dimension(s) on which to split the graph
example:
- one_graph_per: service
items:
$ref: '#/components/schemas/SplitDimension'
maxItems: 1
Expand Down
50 changes: 42 additions & 8 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,8 @@ components:
properties:
errors:
description: A list of errors.
example:
- Bad Request
items:
description: A list of items.
example: Bad Request
Expand Down Expand Up @@ -9402,6 +9404,19 @@ components:
were created or updated by the request are

returned.'
example:
- attributes:
attachment:
documentUrl: ''
title: Postmortem IR-123
attachment_type: postmortem
id: 00000000-abcd-0002-0000-000000000000
relationships:
last_modified_by_user:
data:
id: 00000000-0000-0000-cccc-000000000000
type: users
type: incident_attachments
items:
$ref: '#/components/schemas/IncidentAttachmentData'
type: array
Expand Down Expand Up @@ -9433,6 +9448,19 @@ components:
properties:
data:
description: An array of incident attachments.
example:
- attributes:
attachment:
documentUrl: ''
title: Postmortem IR-123
attachment_type: postmortem
id: 00000000-abcd-0002-0000-000000000000
relationships:
last_modified_by_user:
data:
id: 00000000-0000-0000-cccc-000000000000
type: users
type: incident_attachments
items:
$ref: '#/components/schemas/IncidentAttachmentData'
type: array
Expand Down Expand Up @@ -9526,8 +9554,6 @@ components:
oneOf:
- $ref: '#/components/schemas/IncidentFieldAttributesSingleValue'
- $ref: '#/components/schemas/IncidentFieldAttributesMultipleValue'
required:
- type
IncidentFieldAttributesMultipleValue:
description: A field with potentially multiple values selected.
properties:
Expand Down Expand Up @@ -10644,6 +10670,8 @@ components:
- $ref: '#/components/schemas/IncidentTodoAnonymousAssignee'
IncidentTodoAssigneeArray:
description: Array of todo assignees.
example:
- '@[email protected]'
items:
$ref: '#/components/schemas/IncidentTodoAssignee'
type: array
Expand Down Expand Up @@ -11800,9 +11828,6 @@ components:
- $ref: '#/components/schemas/LogsArchiveDestinationAzure'
- $ref: '#/components/schemas/LogsArchiveDestinationGCS'
- $ref: '#/components/schemas/LogsArchiveDestinationS3'
required:
- type
- integration
LogsArchiveDefinition:
description: The definition of an archive.
properties:
Expand All @@ -11829,9 +11854,6 @@ components:
- $ref: '#/components/schemas/LogsArchiveDestinationAzure'
- $ref: '#/components/schemas/LogsArchiveDestinationGCS'
- $ref: '#/components/schemas/LogsArchiveDestinationS3'
required:
- type
- integration
type: object
LogsArchiveDestinationAzure:
description: The Azure archive destination.
Expand Down Expand Up @@ -13349,6 +13371,9 @@ components:
timestamp and a scalar value (cannot be a string). Timestamps should be
in POSIX time in seconds, and cannot be more than ten minutes in the future
or more than one hour in the past.
example:
- timestamp: 1575317847
value: 0.5
items:
$ref: '#/components/schemas/MetricPoint'
type: array
Expand Down Expand Up @@ -17700,6 +17725,10 @@ components:
type: object
ScalarFormulaRequestQueries:
description: List of queries to be run and used as inputs to the formulas.
example:
- aggregator: avg
data_source: metrics
query: avg:system.cpu.user{*} by {env}
items:
$ref: '#/components/schemas/ScalarQuery'
type: array
Expand Down Expand Up @@ -18658,6 +18687,8 @@ components:
type: object
SecurityMonitoringSignalIncidentIds:
description: Array of incidents that are associated with this signal.
example:
- 2066
items:
description: Public ID attribute of the incident that is associated with the
signal.
Expand Down Expand Up @@ -23176,6 +23207,9 @@ components:
type: object
TimeseriesFormulaRequestQueries:
description: List of queries to be run and used as inputs to the formulas.
example:
- data_source: metrics
query: avg:system.cpu.user{*} by {env}
items:
$ref: '#/components/schemas/TimeseriesQuery'
type: array
Expand Down

0 comments on commit 07cfeeb

Please sign in to comment.