-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
making range aggregation untagged union #2725
base: main
Are you sure you want to change the base?
Conversation
compiler/src/steps/validate-model.ts
Outdated
@@ -610,6 +610,7 @@ export default async function validateModel (apiModel: model.Model, restSpec: Ma | |||
} else if (variants.kind === 'untagged') { | |||
if (fqn(parentName) !== '_types.query_dsl:DecayFunction' && | |||
fqn(parentName) !== '_types.query_dsl:DistanceFeatureQuery' && | |||
fqn(parentName) !== '_types.aggregations:AggregationRange' && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Let's keep the names in alphabetical order please :-)
export type AggregationRange = | ||
| UntypedAggregationRange | ||
| NumberAggregationRange | ||
| StringAggregationRange |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's check, if we can have "term" range aggregations and if yes, rename this variant to TermAggregationRange.
We as well most likely want to have either a Date- or even a DateMath variant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DateRangeAggregation can be part of the union yes. so untyped | number | term | date, like range query?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just noticed that DateRangeAggregation, like IpRangeAggregation, has its own field in the AggregationContainer (date_range
). does it make sense to also add it here?
This reverts commit 1f832ef.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
fixes #2641
draft for now because I still have to figure out if we're mapping the responses right