Skip to content

Commit

Permalink
Merge branch 'main' into ignored-parameter
Browse files Browse the repository at this point in the history
Signed-off-by: Niyazbek Torekeldi <[email protected]>
  • Loading branch information
Tokesh authored Jan 5, 2025
2 parents 2ef6b1a + db45550 commit 05137ee
Show file tree
Hide file tree
Showing 26 changed files with 2,305 additions and 1,462 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added 404 response to `/_search/scroll` ([#749](https://github.com/opensearch-project/opensearch-api-specification/pull/749))
- Added `node_failures` to `DELETE /_search/scroll` and `DELETE /_search/scroll/{scroll_id}` ([#749](https://github.com/opensearch-project/opensearch-api-specification/pull/749))
- Added `POST /_plugins/_ml/_train/{algorithm_name}`, `_predict/{algorithm_name}/{model_id}`, and `_train_predict/{algorithm_name}` ([#755](https://github.com/opensearch-project/opensearch-api-specification/pull/755))
- Added the ability to skip an individual chapter test ([#x](https://github.com/opensearch-project/opensearch-api-specification/pull/x))
- Added `PUT /_plugins/_ml/model_groups/{model_group_id}`, `GET /_plugins/_ml/model_groups/_search`, and `POST /_plugins/_ml/model_groups/_search` ([#760](https://github.com/opensearch-project/opensearch-api-specification/pull/760))
- Added `GET /_plugins/_ml/connectors/{connector_id}`, `_search`, `POST /_plugins/_ml/connectors/_search`, and `PUT /_plugins/_ml/connectors/{connector_id}` ([#764](https://github.com/opensearch-project/opensearch-api-specification/pull/764))
- Added the ability to skip an individual chapter test ([#765](https://github.com/opensearch-project/opensearch-api-specification/pull/765))

### Removed
- Removed unsupported `_common.mapping:SourceField`'s `mode` field and associated `_common.mapping:SourceFieldMode` enum ([#652](https://github.com/opensearch-project/opensearch-api-specification/pull/652))
Expand Down Expand Up @@ -86,6 +88,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fixed indices API schemas ([#750](https://github.com/opensearch-project/opensearch-api-specification/pull/750))
- Fixed cluster API schemas ([#754](https://github.com/opensearch-project/opensearch-api-specification/pull/754))
- Fixed schema validation for invalid properties in `retry` configuration ([#758](https://github.com/opensearch-project/opensearch-api-specification/pull/758))
- Fixed nodes API schemas ([#761](https://github.com/opensearch-project/opensearch-api-specification/pull/761))

### Changed
- Changed `tasks._common:TaskInfo` and `tasks._common:TaskGroup` to be composed of a `tasks._common:TaskInfoBase` ([#683](https://github.com/opensearch-project/opensearch-api-specification/pull/683))
Expand Down
6 changes: 1 addition & 5 deletions spec/_global_parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,4 @@ components:
in: query
description: Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-".
schema:
oneOf:
- type: string
- type: array
items:
type: string
$ref: 'schemas/_common.yaml#/components/schemas/StringOrStringArray'
6 changes: 1 addition & 5 deletions spec/namespaces/_core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5755,11 +5755,7 @@ components:
name: sort
description: A comma-separated list of <field>:<direction> pairs.
schema:
oneOf:
- type: string
- type: array
items:
type: string
$ref: '../schemas/_common.yaml#/components/schemas/StringOrStringArray'
style: form
search::query.stats:
in: query
Expand Down
12 changes: 2 additions & 10 deletions spec/namespaces/indices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2128,11 +2128,7 @@ components:
description: |-
Array of wildcard expressions used to match the names
of indexes during creation.
oneOf:
- type: string
- type: array
items:
type: string
$ref: '../schemas/_common.yaml#/components/schemas/StringOrStringArray'
mappings:
$ref: '../schemas/_common.mapping.yaml#/components/schemas/TypeMapping'
order:
Expand Down Expand Up @@ -5083,11 +5079,7 @@ components:
name: groups
description: Comma-separated list of search groups to include in the search statistics.
schema:
oneOf:
- type: string
- type: array
items:
type: string
$ref: '../schemas/_common.yaml#/components/schemas/StringOrStringArray'
style: form
indices.stats::query.include_segment_file_sizes:
in: query
Expand Down
234 changes: 229 additions & 5 deletions spec/namespaces/ml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ paths:
responses:
'200':
$ref: '#/components/responses/ml.get_model_group@200'
put:
operationId: ml.update_model_group.0
x-operation-group: ml.update_model_group
x-version-added: '2.9'
description: Updates a model group.
parameters:
- $ref: '#/components/parameters/ml.update_model_group::path.model_group_id'
requestBody:
$ref: '#/components/requestBodies/ml.update_model_group'
responses:
'200':
$ref: '#/components/responses/ml.update_model_group@200'
delete:
operationId: ml.delete_model_group.0
x-operation-group: ml.delete_model_group
Expand All @@ -33,6 +45,27 @@ paths:
responses:
'200':
$ref: '#/components/responses/ml.delete_model_group@200'
/_plugins/_ml/model_groups/_search:
get:
operationId: ml.search_model_group.0
x-operation-group: ml.search_model_group
x-version-added: '2.9'
description: Searches for model groups.
requestBody:
$ref: '#/components/requestBodies/ml.search_model_group'
responses:
'200':
$ref: '#/components/responses/ml.search_model_group@200'
post:
operationId: ml.search_model_group.1
x-operation-group: ml.search_model_group
x-version-added: '2.9'
description: Searches for model groups.
requestBody:
$ref: '#/components/requestBodies/ml.search_model_group'
responses:
'200':
$ref: '#/components/responses/ml.search_model_group@200'
/_plugins/_ml/models/_register:
post:
operationId: ml.register_model.0
Expand Down Expand Up @@ -150,6 +183,28 @@ paths:
'200':
$ref: '#/components/responses/ml.create_connector@200'
/_plugins/_ml/connectors/{connector_id}:
get:
operationId: ml.get_connector.0
x-operation-group: ml.get_connector
x-version-added: '2.11'
description: Retrieves a standalone connector.
parameters:
- $ref: '#/components/parameters/ml.get_connector::path.connector_id'
responses:
'200':
$ref: '#/components/responses/ml.get_connector@200'
put:
operationId: ml.update_connector.0
x-operation-group: ml.update_connector
x-version-added: '2.12'
description: Updates a standalone connector.
parameters:
- $ref: '#/components/parameters/ml.update_connector::path.connector_id'
requestBody:
$ref: '#/components/requestBodies/ml.update_connector'
responses:
'200':
$ref: '#/components/responses/ml.update_connector@200'
delete:
operationId: ml.delete_connector.0
x-operation-group: ml.delete_connector
Expand All @@ -159,6 +214,27 @@ paths:
responses:
'200':
$ref: '#/components/responses/ml.delete_connector@200'
/_plugins/_ml/connectors/_search:
get:
operationId: ml.search_connectors.0
x-operation-group: ml.search_connectors
x-version-added: '2.11'
description: Searches for standalone connectors.
requestBody:
$ref: '#/components/requestBodies/ml.search_connectors'
responses:
'200':
$ref: '#/components/responses/ml.search_connectors@200'
post:
operationId: ml.search_connectors.1
x-operation-group: ml.search_connectors
x-version-added: '2.11'
description: Searches for standalone connectors.
requestBody:
$ref: '#/components/requestBodies/ml.search_connectors'
responses:
'200':
$ref: '#/components/responses/ml.search_connectors@200'
/_plugins/_ml/agents/_register:
post:
operationId: ml.register_agents.0
Expand Down Expand Up @@ -207,6 +283,51 @@ components:
description: The add all backend roles.
required:
- name
ml.update_model_group:
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: The model group name.
description:
type: string
description: The model group description.
add_all_backend_roles:
type: boolean
description: Whether to include all backend roles.
model_access_name:
type: string
description: The model access name
backend_roles:
type: array
items:
type: string
description: The backend roles.
add_backend_roles:
type: array
items:
type: string
description: The backend roles to add.
ml.search_model_group:
content:
application/json:
schema:
type: object
properties:
query:
$ref: '../schemas/ml._common.yaml#/components/schemas/Query'
size:
type: integer
format: int64
description: The number of model groups to return.
sort:
type: array
items:
$ref: '../schemas/ml._common.yaml#/components/schemas/Sort'
description: The sort order.
ml.register_model:
content:
application/json:
Expand Down Expand Up @@ -241,14 +362,16 @@ components:
properties:
query:
type: object
# TODO: Define the query schema
description: The query.
$ref: '../schemas/ml._common.yaml#/components/schemas/Query'
size:
type: integer
format: int64
description: The number of models to return.
required:
- query
- size
sort:
type: array
items:
$ref: '../schemas/ml._common.yaml#/components/schemas/Sort'
description: The sort order.
ml.predict:
content:
application/json:
Expand Down Expand Up @@ -321,6 +444,9 @@ components:
type: integer
protocol:
type: string
enum:
- aws_sigv4
- http
credential:
$ref: '../schemas/ml._common.yaml#/components/schemas/Credential'
parameters:
Expand All @@ -339,6 +465,61 @@ components:
- parameters
- protocol
- version
ml.update_connector:
content:
application/json:
schema:
type: object
properties:
name:
$ref: '../schemas/_common.yaml#/components/schemas/Name'
description:
type: string
description: The connector description.
version:
$ref: '../schemas/_common.yaml#/components/schemas/VersionNumber'
protocol:
type: string
description: The connector protocol.
enum:
- aws_sigv4
- http
parameters:
$ref: '../schemas/ml._common.yaml#/components/schemas/Parameters'
credential:
$ref: '../schemas/ml._common.yaml#/components/schemas/Credential'
actions:
type: array
items:
$ref: '../schemas/ml._common.yaml#/components/schemas/Action'
backend_roles:
type: array
items:
type: string
description: The backend roles.
access_mode:
type: string
description: The model group access mode.
enum: [private, public, restricted]
parameters.skip_validating_missing_parameters:
type: boolean
description: Whether to skip validating missing parameters.
ml.search_connectors:
content:
application/json:
schema:
type: object
properties:
query:
$ref: '../schemas/ml._common.yaml#/components/schemas/Query'
size:
type: integer
description: The number of connectors to return.
sort:
type: array
items:
type: string
description: The sort order.
ml.register_agents:
content:
application/json:
Expand Down Expand Up @@ -377,6 +558,16 @@ components:
application/json:
schema:
$ref: '../schemas/ml._common.yaml#/components/schemas/ModelGroup'
ml.update_model_group@200:
content:
application/json:
schema:
$ref: '../schemas/ml._common.yaml#/components/schemas/UpdateModelGroupResponse'
ml.search_model_group@200:
content:
application/json:
schema:
$ref: '../schemas/ml._common.yaml#/components/schemas/SearchModelGroupsResponse'
ml.delete_model_group@200:
content:
application/json:
Expand Down Expand Up @@ -458,11 +649,26 @@ components:
properties:
connector_id:
type: string
ml.get_connector@200:
content:
application/json:
schema:
$ref: '../schemas/ml._common.yaml#/components/schemas/GetConnectorResponse'
ml.update_connector@200:
content:
application/json:
schema:
$ref: '../schemas/_common.yaml#/components/schemas/WriteResponseBase'
ml.delete_connector@200:
content:
application/json:
schema:
$ref: '../schemas/_common.yaml#/components/schemas/WriteResponseBase'
ml.search_connectors@200:
content:
application/json:
schema:
$ref: '../schemas/ml._common.yaml#/components/schemas/SearchConnectorsResponse'
ml.register_agents@200:
content:
application/json:
Expand All @@ -483,6 +689,12 @@ components:
required: true
schema:
type: string
ml.update_model_group::path.model_group_id:
name: model_group_id
in: path
required: true
schema:
type: string
ml.delete_model_group::path.model_group_id:
name: model_group_id
in: path
Expand Down Expand Up @@ -537,6 +749,18 @@ components:
required: true
schema:
type: string
ml.get_connector::path.connector_id:
name: connector_id
in: path
required: true
schema:
type: string
ml.update_connector::path.connector_id:
name: connector_id
in: path
required: true
schema:
type: string
ml.delete_connector::path.connector_id:
name: connector_id
in: path
Expand Down
Loading

0 comments on commit 05137ee

Please sign in to comment.