Skip to content

Commit 380bc23

Browse files
committed
* Let's try using aggregation as the discriminator.
1 parent b4efb3a commit 380bc23

File tree

3 files changed

+224
-1
lines changed

3 files changed

+224
-1
lines changed

generated/slo-spec.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,18 @@ components:
969969
description: List of metrics with their name, aggregation type, and field.
970970
type: array
971971
items:
972+
discriminator:
973+
propertyName: aggregation
974+
mapping:
975+
percentile: '#/components/schemas/timeslice_metric_percentile_metric'
976+
doc_count: '#/components/schemas/timeslice_metric_doc_count_metric'
977+
sum: '#/components/schemas/timeslice_metric_basic_metric_with_field'
978+
avg: '#/components/schemas/timeslice_metric_basic_metric_with_field'
979+
min: '#/components/schemas/timeslice_metric_basic_metric_with_field'
980+
max: '#/components/schemas/timeslice_metric_basic_metric_with_field'
981+
std_deviation: '#/components/schemas/timeslice_metric_basic_metric_with_field'
982+
last_value: '#/components/schemas/timeslice_metric_basic_metric_with_field'
983+
cardinality: '#/components/schemas/timeslice_metric_basic_metric_with_field'
972984
anyOf:
973985
- $ref: '#/components/schemas/timeslice_metric_basic_metric_with_field'
974986
- $ref: '#/components/schemas/timeslice_metric_percentile_metric'

generated/slo/api/openapi.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1702,9 +1702,21 @@ components:
17021702
type: object
17031703
indicator_properties_timeslice_metric_params_metric_metrics_inner:
17041704
anyOf:
1705-
- $ref: '#/components/schemas/timeslice_metric_basic_metric_with_field'
17061705
- $ref: '#/components/schemas/timeslice_metric_percentile_metric'
1706+
- $ref: '#/components/schemas/timeslice_metric_basic_metric_with_field'
17071707
- $ref: '#/components/schemas/timeslice_metric_doc_count_metric'
1708+
discriminator:
1709+
mapping:
1710+
percentile: '#/components/schemas/timeslice_metric_percentile_metric'
1711+
doc_count: '#/components/schemas/timeslice_metric_doc_count_metric'
1712+
sum: '#/components/schemas/timeslice_metric_basic_metric_with_field'
1713+
avg: '#/components/schemas/timeslice_metric_basic_metric_with_field'
1714+
min: '#/components/schemas/timeslice_metric_basic_metric_with_field'
1715+
max: '#/components/schemas/timeslice_metric_basic_metric_with_field'
1716+
std_deviation: '#/components/schemas/timeslice_metric_basic_metric_with_field'
1717+
last_value: '#/components/schemas/timeslice_metric_basic_metric_with_field'
1718+
cardinality: '#/components/schemas/timeslice_metric_basic_metric_with_field'
1719+
propertyName: aggregation
17081720
indicator_properties_timeslice_metric_params_metric:
17091721
description: |
17101722
An object defining the metrics, equation, and threshold to determine if it's a good slice or not

generated/slo/model_indicator_properties_timeslice_metric_params_metric_metrics_inner.go

Lines changed: 199 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)