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

Correct index settings types #684

Merged
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
1 change: 1 addition & 0 deletions .github/workflows/test-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ on:
jobs:
test-opensearch-spec:
strategy:
fail-fast: false
matrix:
entry:
- version: 1.3.17
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fixed `ml._common.yaml#SearchModelsResponse` and `SearchModelsHitsHit` ([#672](https://github.com/opensearch-project/opensearch-api-specification/pull/672))
- Fixed `refresh` options to allow `boolean` and `string` ([#673](https://github.com/opensearch-project/opensearch-api-specification/pull/673))
- Fixed `value` type in `ExplanationDetail` and added `_type` to `explain@200` ([#685](https://github.com/opensearch-project/opensearch-api-specification/pull/685))
- Fixed index settings types ([#684](https://github.com/opensearch-project/opensearch-api-specification/pull/684))

### 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
24 changes: 12 additions & 12 deletions spec/schemas/_common.analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ components:
enum:
- asciifolding
preserve_original:
$ref: '_common.yaml#/components/schemas/Stringifiedboolean'
$ref: '_common.yaml#/components/schemas/StringifiedBoolean'
required:
- type
TokenFilterBase:
Expand Down Expand Up @@ -634,7 +634,7 @@ components:
side:
$ref: '#/components/schemas/EdgeNGramSide'
preserve_original:
$ref: '_common.yaml#/components/schemas/Stringifiedboolean'
$ref: '_common.yaml#/components/schemas/StringifiedBoolean'
required:
- type
EdgeNGramSide:
Expand All @@ -658,7 +658,7 @@ components:
articles_path:
type: string
articles_case:
$ref: '_common.yaml#/components/schemas/Stringifiedboolean'
$ref: '_common.yaml#/components/schemas/StringifiedBoolean'
required:
- type
FingerprintTokenFilter:
Expand Down Expand Up @@ -828,7 +828,7 @@ components:
consume_all_tokens:
type: boolean
max_token_count:
$ref: '_common.yaml#/components/schemas/Stringifiedinteger'
$ref: '_common.yaml#/components/schemas/StringifiedInteger'
required:
- type
LowercaseTokenFilter:
Expand Down Expand Up @@ -858,7 +858,7 @@ components:
items:
type: string
preserve_original:
$ref: '_common.yaml#/components/schemas/Stringifiedboolean'
$ref: '_common.yaml#/components/schemas/StringifiedBoolean'
required:
- filters
- type
Expand All @@ -876,7 +876,7 @@ components:
min_gram:
type: integer
preserve_original:
$ref: '_common.yaml#/components/schemas/Stringifiedboolean'
$ref: '_common.yaml#/components/schemas/StringifiedBoolean'
required:
- type
NoriPartOfSpeechTokenFilter:
Expand Down Expand Up @@ -908,7 +908,7 @@ components:
items:
type: string
preserve_original:
$ref: '_common.yaml#/components/schemas/Stringifiedboolean'
$ref: '_common.yaml#/components/schemas/StringifiedBoolean'
required:
- patterns
- type
Expand Down Expand Up @@ -1211,7 +1211,7 @@ components:
ignore_keywords:
type: boolean
preserve_original:
$ref: '_common.yaml#/components/schemas/Stringifiedboolean'
$ref: '_common.yaml#/components/schemas/StringifiedBoolean'
protected_words:
type: array
items:
Expand Down Expand Up @@ -1252,7 +1252,7 @@ components:
generate_word_parts:
type: boolean
preserve_original:
$ref: '_common.yaml#/components/schemas/Stringifiedboolean'
$ref: '_common.yaml#/components/schemas/StringifiedBoolean'
protected_words:
type: array
items:
Expand Down Expand Up @@ -1736,15 +1736,15 @@ components:
enum:
- path_hierarchy
buffer_size:
$ref: '_common.yaml#/components/schemas/Stringifiedinteger'
$ref: '_common.yaml#/components/schemas/StringifiedInteger'
delimiter:
type: string
replacement:
type: string
reverse:
$ref: '_common.yaml#/components/schemas/Stringifiedboolean'
$ref: '_common.yaml#/components/schemas/StringifiedBoolean'
skip:
$ref: '_common.yaml#/components/schemas/Stringifiedinteger'
$ref: '_common.yaml#/components/schemas/StringifiedInteger'
required:
- buffer_size
- delimiter
Expand Down
18 changes: 14 additions & 4 deletions spec/schemas/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ components:
description: |-
A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and
`d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
pattern: ^([0-9\.]+)(?:d|h|m|s|ms|micros|nanos)$
pattern: ^(?:(-1)|([0-9\.]+)(?:d|h|m|s|ms|micros|nanos))$
type: string
Metadata:
type: object
Expand Down Expand Up @@ -822,7 +822,7 @@ components:
type: string
HumanReadableByteCount:
type: string
pattern: '\d+(\.\d+)?(b|kb|k|mb|m|gb|g|tb|t|pb|p)'
pattern: '(?:(-1)|(0)|\d+(\.\d+)?(b|kb|k|mb|m|gb|g|tb|t|pb|p))'
ByteUnit:
type: string
enum:
Expand Down Expand Up @@ -921,7 +921,7 @@ components:
$ref: '#/components/schemas/ScrollId'
TransportAddress:
type: string
Stringifiedinteger:
StringifiedInteger:
description: |-
Certain APIs may return values, including numbers such as epoch timestamps, as strings. This setting captures
this behavior while keeping the semantics of the field type.
Expand All @@ -931,7 +931,17 @@ components:
oneOf:
- type: integer
- type: string
Stringifiedboolean:
StringifiedLong:
oneOf:
- type: integer
format: int64
- type: string
StringifiedDouble:
oneOf:
- type: number
format: double
- type: string
StringifiedBoolean:
description: |-
Certain APIs may return values, including numbers such as epoch timestamps, as strings. This setting captures
this behavior while keeping the semantics of the field type.
Expand Down
Loading
Loading