Skip to content

Commit

Permalink
Merge branch 'main' into msearch-template
Browse files Browse the repository at this point in the history
Signed-off-by: Niyazbek Torekeldi <[email protected]>
  • Loading branch information
Tokesh authored Dec 15, 2024
2 parents 0b51d02 + ebe0f8a commit 5d15786
Show file tree
Hide file tree
Showing 82 changed files with 2,669 additions and 570 deletions.
23 changes: 20 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,16 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added missing `status` to `/_search/template` response ([#702](https://github.com/opensearch-project/opensearch-api-specification/pull/702))
- Added `_type` to `rank_eval` API specs ([#704](https://github.com/opensearch-project/opensearch-api-specification/pull/704))
- Added request body to `_search_shards` API specs ([#709](https://github.com/opensearch-project/opensearch-api-specification/pull/709))
- Added string type in additionalProperties to `msearch template` ([#x](https://github.com/opensearch-project/opensearch-api-specification/pull/x))
- Added NodeAttributes as additional property in `shard_stores` API specs ([#715](https://github.com/opensearch-project/opensearch-api-specification/pull/715))
- Added missing `repository` query parameter to `/_cat/snapshots` ([#700](https://github.com/opensearch-project/opensearch-api-specification/pull/700))
- Added `sm` namespace API specifications ([#701](https://github.com/opensearch-project/opensearch-api-specification/pull/701))
- Added schema for `/_plugins/_knn/stats`, `/_plugins/_knn/models/{model_id}`, `_train` and `_search` ([#704](https://github.com/opensearch-project/opensearch-api-specification/pull/704))
- Added `retry` support in `prologues` and `epilogues` ([#713](https://github.com/opensearch-project/opensearch-api-specification/pull/713))
- Added response schema for `DELETE /_plugins/_rollup/jobs/{id}`, `POST /_plugins/_rollup/jobs/{id}/_start` and `_stop` ([#716](https://github.com/opensearch-project/opensearch-api-specification/pull/716))
- Added response schema for `PUT` and `DELETE /_plugins/_transform/{id}` ([#722](https://github.com/opensearch-project/opensearch-api-specification/pull/716))
- Added response schema for `GET /_plugins/_knn/warmup/{index}` ([#717](https://github.com/opensearch-project/opensearch-api-specification/pull/717))
- Added support for multiple test verbs ([#724](https://github.com/opensearch-project/opensearch-api-specification/pull/724))
- Added string type in additionalProperties to `msearch template` ([#735](https://github.com/opensearch-project/opensearch-api-specification/pull/735))

### 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 All @@ -35,6 +44,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Removed invalid `externalDocs` from `flow_framework.create/update::query.use_case` ([#646](https://github.com/opensearch-project/opensearch-api-specification/pull/646))
- Removed unsupported `cause` and `create` from `/_index_template/_simulate_index/{name}` ([#691](https://github.com/opensearch-project/opensearch-api-specification/pull/691))
- Removed `mappings` from `required` in `indices.simulate_template#Template` ([#691](https://github.com/opensearch-project/opensearch-api-specification/pull/691))
- Removed `HealthStatusCapatilized` and merged it with `HealthStatus` ([#725](https://github.com/opensearch-project/opensearch-api-specification/pull/725))

### Fixed
- Spec passes OpenAPI 3.1.0 validations ([#646](https://github.com/opensearch-project/opensearch-api-specification/pull/646))
Expand All @@ -52,12 +62,20 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fixed `/_ingest/pipeline/{id}/_simulate` response `docs/_source` field schema ([#689](https://github.com/opensearch-project/opensearch-api-specification/pull/689))
- Fixed `/_scripts/painless/_execute` request and response schema ([#699](https://github.com/opensearch-project/opensearch-api-specification/pull/699))
- Fixed `fields` in `Hit` allowing primitive arrays ([#699](https://github.com/opensearch-project/opensearch-api-specification/pull/699))
- Added missing `repository` query parameter to `/_cat/snapshots` ([#700](https://github.com/opensearch-project/opensearch-api-specification/pull/700))
- Fixed `hits` in `rank_eval` allowing numbers ([#704](https://github.com/opensearch-project/opensearch-api-specification/pull/704))
- Fixed query DSL schemas ([#706](https://github.com/opensearch-project/opensearch-api-specification/pull/706))
- Fixed content-type of `GET /_plugins/_observability/_local/stats` ([#711](https://github.com/opensearch-project/opensearch-api-specification/pull/711))
- Fixed `tenant` in `ObservabilityObject` request body to not be required ([#711](https://github.com/opensearch-project/opensearch-api-specification/pull/711))
- Fixed response code in `PUT /_plugins/_rollup/jobs/{id}` ([#716](https://github.com/opensearch-project/opensearch-api-specification/pull/716))
- Fixed response schema for `/_render/template` and `/_render/template/{id}` ([#724](https://github.com/opensearch-project/opensearch-api-specification/pull/724))
- Fixed data stream schema numeric property types ([#725](https://github.com/opensearch-project/opensearch-api-specification/pull/725))
- Fixed snapshot status numeric property types ([#729](https://github.com/opensearch-project/opensearch-api-specification/pull/729))

### 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))
- Changed `SearchModelsQuery`, `CreateConnectorRequest` & `RegisterAgentsRequest` to be defined inline of request bodies ([#725](https://github.com/opensearch-project/opensearch-api-specification/pull/725))
- Changed `indices.data_streams_stats:DataStreamsStatsItem` to instead be `indices._common:DataStreamStats` ([#725](https://github.com/opensearch-project/opensearch-api-specification/pull/725))
- Changed naming of `snapshot._common`'s `Status`, `ShardsStats`, `ShardsStatsStage`, `ShardsStatsSummary` and `ShardsStatsSummaryItem` schemas to be prefixed with `Snapshot` ([#730](https://github.com/opensearch-project/opensearch-api-specification/pull/730))

## [0.1.0] - 2024-10-25

Expand Down Expand Up @@ -165,7 +183,6 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added API spec for `adjust_pure_negative` for bool queries ([#641](https://github.com/opensearch-project/opensearch-api-specification/pull/641))
- Added a spec style checker [#620](https://github.com/opensearch-project/opensearch-api-specification/pull/620).
- Added `remote_store` to node `Stats` ([#643](https://github.com/opensearch-project/opensearch-api-specification/pull/643))
- Added `sm` namespace API specifications ([#701](https://github.com/opensearch-project/opensearch-api-specification/pull/701))

### Changed

Expand Down
13 changes: 13 additions & 0 deletions TESTING_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- [FAILED Cat with a json response (from security-analytics).](#failed--cat-with-a-json-response-from-security-analytics)
- [Writing Spec Tests](#writing-spec-tests)
- [Simple Test Story](#simple-test-story)
- [Testing Multiple Verbs](#testing-multiple-verbs)
- [Using Output from Previous Chapters](#using-output-from-previous-chapters)
- [Managing Versions](#managing-versions)
- [Managing Distributions](#managing-distributions)
Expand Down Expand Up @@ -182,6 +183,18 @@ chapters:
index: books
```
### Testing Multiple Verbs
Some APIs allow multiple verbs for the same effect. Specify multiple verbs as follows and the test tool will execute both.
```yaml
- synopsis: Use POST and PUT interchangeably.
path: /{index}
method:
- POST
- PUT
```
### Using Output from Previous Chapters
Consider the following chapters in [ml/model_groups](tests/plugins/ml/ml/model_groups.yaml) test story:
Expand Down
19 changes: 14 additions & 5 deletions json_schemas/test_story.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,16 @@ definitions:
allOf:
- $ref: '#/definitions/ChapterRequest'
- properties:
method:
oneOf:
- type: array
items:
$ref: '#/definitions/HttpMethod'
- $ref: '#/definitions/HttpMethod'
synopsis:
type: string
description: A brief description of the chapter.
pattern: ^\p{Lu}[\s\S]*\.$
pattern: ^\p{Lu}[\s\S]*\.$|^\p{Lu}[\s\S]*\. \[(GET|PUT|POST|DELETE|PATCH|HEAD|OPTIONS)\]$
response:
$ref: '#/definitions/ExpectedResponse'
warnings:
Expand Down Expand Up @@ -67,18 +73,21 @@ definitions:
items:
type: integer

HttpMethod:
type: string
# eslint-disable-next-line yml/sort-sequence-values
enum: [GET, PUT, POST, DELETE, PATCH, HEAD, OPTIONS]

ChapterRequest:
type: object
properties:
id:
id:
type: string
description: A unique identifier for the chapter, useful for accessing outputs.
path:
type: string
method:
type: string
# eslint-disable-next-line yml/sort-sequence-values
enum: [GET, PUT, POST, DELETE, PATCH, HEAD, OPTIONS]
$ref: '#/definitions/HttpMethod'
parameters:
type: object
additionalProperties:
Expand Down
9 changes: 4 additions & 5 deletions spec/namespaces/_core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2482,16 +2482,15 @@ components:
schema:
type: object
properties:
file:
type: string
id:
$ref: '../schemas/_common.yaml#/components/schemas/Id'
params:
description: |-
Key-value pairs used to replace Mustache variables in the template.
The key is the variable name.
The value is the variable value.
type: object
additionalProperties:
type: object
additionalProperties: true
source:
description: |-
An inline search template.
Expand Down Expand Up @@ -2710,7 +2709,7 @@ components:
additionalProperties:
type: object
indices_boost:
description: Allows increasing the relevance of specific indices in the search.
description: Allows increasing the relevance of specific indexes in the search.
type: object
additionalProperties:
type: number
Expand Down
Loading

0 comments on commit 5d15786

Please sign in to comment.