Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added `mapper_type` and `mapper_settings` to `IngestionSource` index settings ([#1155](https://github.com/opensearch-project/opensearch-api-specification/pull/1155))
- Added `search` and `warm` node roles to `NodeRole`, and modeled the pre-3.0 `search` role (renamed to `warm` in 3.0) as a version-scoped branch ([#1006](https://github.com/opensearch-project/opensearch-api-specification/pull/1006))
- Added `sltr` to query DSL schema ([#1187](https://github.com/opensearch-project/opensearch-api-specification/pull/1187))
- Added `x-non-exhaustive` vendor extension to mark plugin-extensible union types (`Property`, `Analyzer`, `TokenizerDefinition`, `TokenFilterDefinition`, `CharFilterDefinition`, `QueryContainer`, `SpanQuery`, `AggregationContainer`, `ProcessorContainer`, `FieldSuggester`)

### Deprecated
- Marked the plural `_aliases` URL forms of `put_alias` and `delete_alias` as deprecated; the singular `_alias` form is the canonical path ([#1131](https://github.com/opensearch-project/opensearch-api-specification/pull/1131))
Expand Down
1 change: 1 addition & 0 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ This repository includes several OpenAPI Specification Extensions to fill in any
- `x-default`: Contains the default value of a parameter. This is often used to override the default value specified in the schema, or to avoid accidentally changing the default value when updating a shared schema.
- `x-distributions-included`: Contains a list of distributions known to include the API.
- `x-distributions-excluded`: Contains a list of distributions known to exclude the API.
- `x-non-exhaustive`: Denotes that a discriminated union (tagged type) is non-exhaustive, meaning plugins can register additional variants at runtime. Code generators should treat these unions as open/extensible.

Use `opensearch.org` for the official distribution in `x-distributions-*`, `amazon-managed` for Amazon Managed OpenSearch, and `amazon-serverless` for Amazon OpenSearch Serverless.

Expand Down
1 change: 1 addition & 0 deletions spec/schemas/_common.aggregations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1425,6 +1425,7 @@ components:
- skewness
- variance
AggregationContainer:
x-non-exhaustive: true
allOf:
- $ref: '#/components/schemas/Aggregation'
- type: object
Expand Down
4 changes: 4 additions & 0 deletions spec/schemas/_common.analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ components:
schemas:
Analyzer:
type: object
x-non-exhaustive: true
discriminator:
propertyName: type
oneOf:
Expand Down Expand Up @@ -401,6 +402,7 @@ components:
$ref: '#/components/schemas/CharFilterDefinition'
CharFilterDefinition:
type: object
x-non-exhaustive: true
discriminator:
propertyName: type
oneOf:
Expand Down Expand Up @@ -500,6 +502,7 @@ components:
$ref: '#/components/schemas/TokenFilterDefinition'
TokenFilterDefinition:
type: object
x-non-exhaustive: true
discriminator:
propertyName: type
oneOf:
Expand Down Expand Up @@ -1586,6 +1589,7 @@ components:
$ref: '#/components/schemas/TokenizerDefinition'
TokenizerDefinition:
type: object
x-non-exhaustive: true
discriminator:
propertyName: type
oneOf:
Expand Down
1 change: 1 addition & 0 deletions spec/schemas/_common.mapping.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ components:
- xy_shape
Property:
type: object
x-non-exhaustive: true
discriminator:
propertyName: type
x-default: object
Expand Down
2 changes: 2 additions & 0 deletions spec/schemas/_common.query_dsl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ components:
# eslint-enable yml/sort-sequence-values
QueryContainer:
type: object
x-non-exhaustive: true
properties:
agentic:
$ref: '#/components/schemas/AgenticQuery'
Expand Down Expand Up @@ -2011,6 +2012,7 @@ components:
- little
SpanQuery:
type: object
x-non-exhaustive: true
properties:
span_containing:
$ref: '#/components/schemas/SpanContainingQuery'
Expand Down
1 change: 1 addition & 0 deletions spec/schemas/_core.search.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,7 @@ components:
description: The named suggesters.
$ref: '#/components/schemas/FieldSuggester'
FieldSuggester:
x-non-exhaustive: true
allOf:
- type: object
properties:
Expand Down
1 change: 1 addition & 0 deletions spec/schemas/ingest._common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ components:
$ref: '_common.yaml#/components/schemas/Metadata'
ProcessorContainer:
type: object
x-non-exhaustive: true
properties:
attachment:
$ref: '#/components/schemas/AttachmentProcessor'
Expand Down
3 changes: 2 additions & 1 deletion tools/src/linter/SchemasValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ const ADDITIONAL_KEYWORDS = [
'x-protobuf-excluded',
'x-protobuf-data-type',
'x-protobuf-name',
'x-protobuf-required'
'x-protobuf-required',
'x-non-exhaustive'
]

export default class SchemasValidator {
Expand Down
3 changes: 2 additions & 1 deletion tools/src/tester/SchemaValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ const ADDITIONAL_KEYWORDS = [
'x-protobuf-excluded',
'x-protobuf-data-type',
'x-protobuf-name',
'x-protobuf-required'
'x-protobuf-required',
'x-non-exhaustive'
]

export default class SchemaValidator {
Expand Down