Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into issue-537
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Redko <[email protected]>
  • Loading branch information
reta committed Sep 27, 2024
2 parents 60ec1ce + 7d05664 commit b161dd6
Show file tree
Hide file tree
Showing 23 changed files with 582 additions and 35 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ jobs:
- version: 2.17.0
- version: 2.18.0
hub: opensearchstaging
ref: '@sha256:2f215e1bed35f49d5e0bb9408824767e7e18dd50a9e85b4f414bf39fa573a37a'
ref: '@sha256:4445e195c53992038891519dc3be0d273cdaad1b047943d68921168ed243e7e9'
- version: 3.0.0
hub: opensearchstaging
ref: '@sha256:06af2ba4037f8423dc1a4ed3cd29108a1912774e7c659e73f0fac09e1bb2b63d'
ref: '@sha256:cf07c0ffa7d9e8a3e7fdb58041caae3bb81f1123260431b99d0ebf4a52c3d9a3'

name: test-opensearch-spec (version=${{ matrix.entry.version }}, hub=${{ matrix.entry.hub || 'opensearchproject' }}, tests=${{ matrix.entry.tests || 'default' }})
runs-on: ubuntu-latest
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added `/_plugins/_ism/policies`, `add`, `remove`, `change_policy`, `explain`, and `retry` ([#568](https://github.com/opensearch-project/opensearch-api-specification/pull/568)) ([#578](https://github.com/opensearch-project/opensearch-api-specification/pull/578))
- Added `/_plugins/refresh_search_analyzers` ([#578](https://github.com/opensearch-project/opensearch-api-specification/pull/578))
- Added `/_bulk/stream` ([#584](https://github.com/opensearch-project/opensearch-api-specification/pull/584))
- Added `/_plugins/_ml/agents/_register`, `/_plugins/_ml/connectors/_create`, `DELETE /_plugins/_ml/agents/{agent_id}`, `DELETE /_plugins/_ml/connectors/{connector_id}` ([#228](https://github.com/opensearch-project/opensearch-api-specification/issues/228))
- Added the `context` query param to the `put_script` APIs ([#586](https://github.com/opensearch-project/opensearch-api-specification/pull/586))

### Changed

Expand All @@ -115,6 +117,11 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Rename `Bytes` component to `StorageType` ([#552](https://github.com/opensearch-project/opensearch-api-specification/pull/552))
- Rename `ByteSize` to `StorageSize` ([#552](https://github.com/opensearch-project/opensearch-api-specification/pull/552))
- Split `Percentage` into `PercentageNumber`, `PercentageString` ([#573](https://github.com/opensearch-project/opensearch-api-specification/pull/573))
- Unified all `routing` query params to take a string or array of strings ([#586](https://github.com/opensearch-project/opensearch-api-specification/pull/586))
- Changed `rank_eval`'s `search_type` query param to use the `SearchType` enum rather than a plain string ([#586](https://github.com/opensearch-project/opensearch-api-specification/pull/586))
- Changed `cluster.reroute`'s `metric` path param to use an enum of metrics ([#586](https://github.com/opensearch-project/opensearch-api-specification/pull/586))
- Changed `indices.stats`'s `metric` path param to use an enum of metrics ([#586](https://github.com/opensearch-project/opensearch-api-specification/pull/586))
- Changed `CleanupRepositoryResults`' properties to be `int64`s ([#587](https://github.com/opensearch-project/opensearch-api-specification/pull/587))

### Deprecated

Expand Down Expand Up @@ -159,6 +166,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fixed tasks namespace schemas ([#520](https://github.com/opensearch-project/opensearch-api-specification/pull/520))
- Fixed `/_plugins/_transform/_preview` ([#568](https://github.com/opensearch-project/opensearch-api-specification/pull/568))
- Fixed create/delete/index operation in `_bulk` ([#582](https://github.com/opensearch-project/opensearch-api-specification/pull/582))
- Add `mode` and `compression` to k-NN index creation and search, and add `rescore` and `oversample_factor` to k-NN search ([#588](https://github.com/opensearch-project/opensearch-api-specification/pull/588))

### Security

Expand Down
19 changes: 14 additions & 5 deletions spec/namespaces/_core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,7 @@ paths:
parameters:
- $ref: '#/components/parameters/put_script::path.id'
- $ref: '#/components/parameters/put_script::query.cluster_manager_timeout'
- $ref: '#/components/parameters/put_script::query.context'
- $ref: '#/components/parameters/put_script::query.master_timeout'
- $ref: '#/components/parameters/put_script::query.timeout'
requestBody:
Expand All @@ -628,6 +629,7 @@ paths:
parameters:
- $ref: '#/components/parameters/put_script::path.id'
- $ref: '#/components/parameters/put_script::query.cluster_manager_timeout'
- $ref: '#/components/parameters/put_script::query.context'
- $ref: '#/components/parameters/put_script::query.master_timeout'
- $ref: '#/components/parameters/put_script::query.timeout'
requestBody:
Expand Down Expand Up @@ -662,6 +664,7 @@ paths:
- $ref: '#/components/parameters/put_script::path.context'
- $ref: '#/components/parameters/put_script::path.id'
- $ref: '#/components/parameters/put_script::query.cluster_manager_timeout'
- $ref: '#/components/parameters/put_script::query.context'
- $ref: '#/components/parameters/put_script::query.master_timeout'
- $ref: '#/components/parameters/put_script::query.timeout'
requestBody:
Expand All @@ -680,6 +683,7 @@ paths:
- $ref: '#/components/parameters/put_script::path.context'
- $ref: '#/components/parameters/put_script::path.id'
- $ref: '#/components/parameters/put_script::query.cluster_manager_timeout'
- $ref: '#/components/parameters/put_script::query.context'
- $ref: '#/components/parameters/put_script::query.master_timeout'
- $ref: '#/components/parameters/put_script::query.timeout'
requestBody:
Expand Down Expand Up @@ -3722,10 +3726,7 @@ components:
description: Comma-separated list of specific routing values.
style: form
schema:
type: array
items:
type: string
description: Comma-separated list of specific routing values.
$ref: '../schemas/_common.yaml#/components/schemas/Routing'
explode: true
delete::path.id:
in: path
Expand Down Expand Up @@ -5107,6 +5108,14 @@ components:
schema:
$ref: '../schemas/_common.yaml#/components/schemas/Duration'
x-version-added: '2.0'
put_script::query.context:
name: context
in: query
description: |-
Context in which the script or search template should run.
To prevent errors, the API immediately compiles the script or template in this context.
schema:
type: string
put_script::query.master_timeout:
in: query
name: master_timeout
Expand Down Expand Up @@ -5164,7 +5173,7 @@ components:
name: search_type
description: Search operation type
schema:
type: string
$ref: '../schemas/_common.yaml#/components/schemas/SearchType'
style: form
reindex::query.max_docs:
name: max_docs
Expand Down
6 changes: 5 additions & 1 deletion spec/namespaces/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,11 @@ components:
name: metric
description: Limits the information returned to the specified metrics.
schema:
$ref: '../schemas/_common.yaml#/components/schemas/Metrics'
oneOf:
- $ref: '../schemas/cluster.reroute.yaml#/components/schemas/Metric'
- type: array
items:
$ref: '../schemas/cluster.reroute.yaml#/components/schemas/Metric'
style: form
cluster.reroute::query.retry_failed:
in: query
Expand Down
10 changes: 7 additions & 3 deletions spec/namespaces/indices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4773,10 +4773,10 @@ components:
description: List of shard health statuses used to limit the request.
schema:
oneOf:
- $ref: '../schemas/indices.shard_stores.yaml#/components/schemas/ShardStoreStatus'
- $ref: '../schemas/indices.shard_stores.yaml#/components/schemas/Status'
- type: array
items:
$ref: '../schemas/indices.shard_stores.yaml#/components/schemas/ShardStoreStatus'
$ref: '../schemas/indices.shard_stores.yaml#/components/schemas/Status'
style: form
indices.shrink::path.index:
in: path
Expand Down Expand Up @@ -5035,7 +5035,11 @@ components:
description: Limit the information returned the specific metrics.
required: true
schema:
$ref: '../schemas/_common.yaml#/components/schemas/Metrics'
oneOf:
- $ref: '../schemas/indices.stats.yaml#/components/schemas/Metric'
- type: array
items:
$ref: '../schemas/indices.stats.yaml#/components/schemas/Metric'
style: simple
indices.stats::query.completion_fields:
in: query
Expand Down
23 changes: 17 additions & 6 deletions spec/namespaces/knn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,16 @@ components:
format: int32
description:
type: string
mode:
type: string
compression_level:
type: string
method:
type: string
spaceType:
type: string
required:
- dimension
- method
- training_field
- training_index
required: true
Expand All @@ -281,7 +286,16 @@ components:
knn.get_model@200: {}
knn.search_models@200: {}
knn.stats@200: {}
knn.train_model@200: {}
knn.train_model@200:
content:
application/json:
schema:
type: object
properties:
model_id:
type: string
required:
- model_id
knn.warmup@200: {}
parameters:
knn.delete_model::path.model_id:
Expand Down Expand Up @@ -500,10 +514,7 @@ components:
description: Comma-separated list of specific routing values.
style: form
schema:
type: array
items:
type: string
description: Comma-separated list of specific routing values.
$ref: '../schemas/_common.yaml#/components/schemas/Routing'
explode: true
knn.search_models::query.scroll:
name: scroll
Expand Down
94 changes: 91 additions & 3 deletions spec/namespaces/ml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,46 @@ paths:
responses:
'200':
$ref: '#/components/responses/ml.search_models@200'
/_plugins/_ml/connectors/_create:
post:
operationId: ml.create_connector.0
x-operation-group: ml.create_connector
description: Creates a standalone connector.
requestBody:
$ref: '#/components/requestBodies/ml.create_connector'
responses:
'200':
$ref: '#/components/responses/ml.create_connector@200'
/_plugins/_ml/connectors/{connector_id}:
delete:
operationId: ml.delete_connector.0
x-operation-group: ml.delete_connector
description: Deletes a standalone connector.
parameters:
- $ref: '#/components/parameters/ml.delete_connector::path.connector_id'
responses:
'200':
$ref: '#/components/responses/ml.delete_connector@200'
/_plugins/_ml/agents/_register:
post:
operationId: ml.register_agents.0
x-operation-group: ml.register_agents
description: Register an agent.
requestBody:
$ref: '#/components/requestBodies/ml.register_agents'
responses:
'200':
$ref: '#/components/responses/ml.register_agents@200'
/_plugins/_ml/agents/{agent_id}:
delete:
operationId: ml.delete_agent.0
x-operation-group: ml.delete_agent
description: Delete an agent.
parameters:
- $ref: '#/components/parameters/ml.delete_agent::path.agent_id'
responses:
'200':
$ref: '#/components/responses/ml.delete_agent@200'
components:
requestBodies:
ml.register_model_group:
Expand All @@ -110,7 +150,7 @@ components:
schema:
type: object
properties:
name:
name:
type: string
description: The model group name.
description:
Expand All @@ -136,7 +176,7 @@ components:
schema:
type: object
properties:
name:
name:
type: string
description: The model name.
version:
Expand All @@ -161,6 +201,16 @@ components:
application/json:
schema:
$ref: '../schemas/ml._common.yaml#/components/schemas/SearchModelsQuery'
ml.create_connector:
content:
application/json:
schema:
$ref: '../schemas/ml._common.yaml#/components/schemas/CreateConnectorRequest'
ml.register_agents:
content:
application/json:
schema:
$ref: '../schemas/ml._common.yaml#/components/schemas/RegisterAgentsRequest'
responses:
ml.register_model_group@200:
content:
Expand Down Expand Up @@ -230,6 +280,32 @@ components:
application/json:
schema:
$ref: '../schemas/ml._common.yaml#/components/schemas/SearchModelsResponse'
ml.create_connector@200:
content:
application/json:
schema:
type: object
properties:
connector_id:
type: string
ml.delete_connector@200:
content:
application/json:
schema:
$ref: '../schemas/_common.yaml#/components/schemas/WriteResponseBase'
ml.register_agents@200:
content:
application/json:
schema:
type: object
properties:
agent_id:
type: string
ml.delete_agent@200:
content:
application/json:
schema:
$ref: '../schemas/_common.yaml#/components/schemas/WriteResponseBase'
parameters:
ml.get_model_group::path.model_group_id:
name: model_group_id
Expand Down Expand Up @@ -267,9 +343,21 @@ components:
required: true
schema:
type: string
ml.delete_connector::path.connector_id:
name: connector_id
in: path
required: true
schema:
type: string
ml.delete_agent::path.agent_id:
name: agent_id
in: path
required: true
schema:
type: string
ml.get_task::path.task_id:
name: task_id
in: path
required: true
schema:
type: string
type: string
8 changes: 8 additions & 0 deletions spec/schemas/_common.mapping.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1141,6 +1141,14 @@ components:
properties:
dimension:
type: number
space_type:
type: string
data_type:
type: string
mode:
type: string
compression_level:
type: string
method:
$ref: '#/components/schemas/KnnVectorMethod'
required:
Expand Down
22 changes: 15 additions & 7 deletions spec/schemas/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,11 @@ components:
ScrollId:
type: string
Routing:
type: string
oneOf:
- type: string
- type: array
items:
type: string
DateTime:
description: |-
A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a
Expand Down Expand Up @@ -656,6 +660,16 @@ components:
boost:
description: Boost value to apply to kNN scores
type: number
method_parameters:
type: object
x-version-added: '2.16'
additionalProperties:
type: number
rescore:
type: object
x-version-added: '2.17'
additionalProperties:
type: number
required:
- vector
QueryVector:
Expand Down Expand Up @@ -919,12 +933,6 @@ components:
- urgent
DataStreamName:
type: string
Metrics:
oneOf:
- type: string
- type: array
items:
type: string
CompletionStats:
type: object
properties:
Expand Down
Loading

0 comments on commit b161dd6

Please sign in to comment.