Numeric filters
Filters that compare a field to a numeric value, range, or array.
NumberComparisonFilter
Section titled “NumberComparisonFilter”Filters by comparing a field to a numeric value.
| Property | Type | Required | Description |
|---|---|---|---|
operator | ComparisonOperators | EquivalenceOperators | Yes | The comparison operator to apply to the filter value. |
value | number | Yes | The value to use for the filter operation. |
{ "operator": "gt", "value": 1000}$schema: https://json-schema.org/draft/2020-12/schema$id: NumberComparisonFilter.yamltype: objectproperties: operator: anyOf: - $ref: ComparisonOperators.yaml - $ref: EquivalenceOperators.yaml description: The comparison operator to apply to the filter value. value: type: number examples: - 1000 description: The value to use for the filter operation.required: - operator - valuedescription: Filters by comparing a field to a numeric value./** Filters by comparing a field to a numeric value. */@Versioning.added(Versions.v0_1)model NumberComparisonFilter { /** The comparison operator to apply to the filter value. */ operator: ComparisonOperators | EquivalenceOperators;
/** The value to use for the filter operation. */ @example(1000) value: numeric;}NumberRangeFilter
Section titled “NumberRangeFilter”Filters by comparing a field to a numeric range.
| Property | Type | Required | Description |
|---|---|---|---|
operator | RangeOperators | Yes | The operator to apply to the filter value. |
value | object | Yes | The value to use for the filter operation. |
{ "operator": "between", "value": { "min": 1000, "max": 10000 }}$schema: https://json-schema.org/draft/2020-12/schema$id: NumberRangeFilter.yamltype: objectproperties: operator: $ref: RangeOperators.yaml description: The operator to apply to the filter value. value: type: object properties: min: type: number max: type: number required: - min - max examples: - min: 1000 max: 10000 description: The value to use for the filter operation.required: - operator - valuedescription: Filters by comparing a field to a numeric range./** Filters by comparing a field to a numeric range. */@Versioning.added(Versions.v0_1)model NumberRangeFilter { /** The operator to apply to the filter value. */ operator: RangeOperators;
/** The value to use for the filter operation. */ @example(#{ min: 1000, max: 10000 }) value: { min: numeric; max: numeric; };}NumberArrayFilter
Section titled “NumberArrayFilter”Filters by comparing a field to an array of numeric values.
| Property | Type | Required | Description |
|---|---|---|---|
operator | ArrayOperators | Yes | The operator to apply to the filter value. |
value | number[] | Yes | The value to use for the filter operation. |
{ "operator": "in", "value": [ 1000, 2000, 3000 ]}$schema: https://json-schema.org/draft/2020-12/schema$id: NumberArrayFilter.yamltype: objectproperties: operator: $ref: ArrayOperators.yaml description: The operator to apply to the filter value. value: type: array items: type: number examples: - - 1000 - 2000 - 3000 description: The value to use for the filter operation.required: - operator - valuedescription: Filters by comparing a field to an array of numeric values./** Filters by comparing a field to an array of numeric values. */@Versioning.added(Versions.v0_1)model NumberArrayFilter { /** The operator to apply to the filter value. */ operator: ArrayOperators;
/** The value to use for the filter operation. */ @example(#[1000, 2000, 3000]) value: Array<numeric>;}