Skip to content
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

Add ml.delete_task and tweak ml schemas #530

Merged
merged 5 commits into from
Aug 26, 2024
Merged
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added detailed test coverage report ([#513](https://github.com/opensearch-project/opensearch-api-specification/pull/513))
- Added 404 responses to `/_alias/{name}` and `/{index}/_alias/{name}` ([#519](https://github.com/opensearch-project/opensearch-api-specification/pull/519))
- Added `asynchronous_search` ([#525](https://github.com/opensearch-project/opensearch-api-specification/pull/525))
- Added `DELETE /_plugins/_ml/tasks/{task_id}` ([#530](https://github.com/opensearch-project/opensearch-api-specification/pull/530))

### Changed

Expand All @@ -93,6 +94,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Lock testing for next release of OpenSearch to a specific SHA ([#431](https://github.com/opensearch-project/opensearch-api-specification/pull/431))
- Replace nullable with null type ([#436](https://github.com/opensearch-project/opensearch-api-specification/pull/436))
- Split test suite ([#472])(https://github.com/opensearch-project/opensearch-api-specification/pull/472)
- Changed `WriteResponseBase`'s `_primary_term`, `_seq_no` & `_version` to have `int64` format ([#530](https://github.com/opensearch-project/opensearch-api-specification/pull/530))

### Deprecated

Expand Down
20 changes: 20 additions & 0 deletions spec/namespaces/ml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,15 @@ paths:
responses:
'200':
$ref: '#/components/responses/ml.get_task@200'
delete:
operationId: ml.delete_task.0
x-operation-group: ml.delete_task
description: Deletes a task.
parameters:
- $ref: '#/components/parameters/ml.delete_task::path.task_id'
responses:
'200':
$ref: '#/components/responses/ml.delete_task@200'
/_plugins/_ml/models/_search:
get:
operationId: ml.search_models.0
Expand Down Expand Up @@ -206,6 +215,11 @@ components:
application/json:
schema:
$ref: '../schemas/_common.yaml#/components/schemas/WriteResponseBase'
ml.delete_task@200:
content:
application/json:
schema:
$ref: '../schemas/_common.yaml#/components/schemas/WriteResponseBase'
ml.get_task@200:
content:
application/json:
Expand Down Expand Up @@ -247,6 +261,12 @@ components:
required: true
schema:
type: string
ml.delete_task::path.task_id:
name: task_id
in: path
required: true
schema:
type: string
ml.get_task::path.task_id:
name: task_id
in: path
Expand Down
3 changes: 3 additions & 0 deletions spec/schemas/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ components:
type: string
SequenceNumber:
type: number
format: int64
VersionNumber:
type: number
format: int64
SortResults:
type: array
items:
Expand Down Expand Up @@ -1318,6 +1320,7 @@ components:
$ref: '#/components/schemas/IndexName'
_primary_term:
type: number
format: int64
result:
$ref: '#/components/schemas/Result'
_seq_no:
Expand Down
9 changes: 5 additions & 4 deletions spec/schemas/ml._common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,13 @@ components:
UndeployModelResponse:
type: object
additionalProperties:
$ref: '#/components/schemas/UndeployModelResponseModels'
UndeployModelResponseModels:
title: nodes
$ref: '#/components/schemas/UndeployModelNode'
UndeployModelNode:
type: object
properties:
stats:
$ref: '#/components/schemas/UndeployModelResponseStats'
UndeployModelResponseStats:
$ref: '#/components/schemas/UndeployModelNodeStats'
UndeployModelNodeStats:
type: object
additionalProperties: true
Loading