diff --git a/.github/vale/styles/OpenSearch/NumericFormat.yml b/.github/vale/styles/OpenSearch/NumericFormat.yml new file mode 100644 index 000000000..c32e5d22e --- /dev/null +++ b/.github/vale/styles/OpenSearch/NumericFormat.yml @@ -0,0 +1,14 @@ +extends: existence +message: "Schema of type 'number' must specify a 'format'." +link: https://github.com/opensearch-project/documentation-website/blob/main/TERMS.md +ignorecase: true +level: warning +action: + name: remove +tokens: + - type: number +patterns: + - pattern: 'type: number' + next_line: + - pattern: 'format:' + negate: true diff --git a/.vale.ini b/.vale.ini index 9141bb025..b14b6f078 100644 --- a/.vale.ini +++ b/.vale.ini @@ -25,6 +25,7 @@ OpenSearch.LoginNoun = YES OpenSearch.LoginVerb = YES OpenSearch.LogoutNoun = YES OpenSearch.LogoutVerb = YES +OpenSearch.NumericFormat = YES OpenSearch.OxfordComma = YES OpenSearch.PassiveVoice = NO OpenSearch.Please = YES diff --git a/CHANGELOG.md b/CHANGELOG.md index e42ff3447..19a7068c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Added `GET`, `POST /_plugins/_ml/tasks/_search`, `GET /_plugins/_ml/tools`, `tools/{tool_name}` ([#797](https://github.com/opensearch-project/opensearch-api-specification/pull/797)) - Added `POST /_plugins/_ml/agents/{agent_id}/_execute`, `GET /_plugins/_ml/agents/{agent_id}`, `GET`, `POST /_plugins/_ml/agents/_search` ([#798](https://github.com/opensearch-project/opensearch-api-specification/pull/798)) - Added a warning for test file names that don't match the API being tested ([#793](https://github.com/opensearch-project/opensearch-api-specification/pull/793)) +- Added a vale rule for numeric types ([#800](https://github.com/opensearch-project/opensearch-api-specification/pull/800)) - Added `time` field to the `GetStats` schema in `_common.yml` ([#803](https://github.com/opensearch-project/opensearch-api-specification/pull/803)) - Added version for `POST /_plugins/_ml/_train/{algorithm_name}`, `_predict/{algorithm_name}/{model_id}`, and `_train_predict/{algorithm_name}` ([#763](https://github.com/opensearch-project/opensearch-api-specification/pull/763)) - Added `POST _plugins/_security/api/internalusers/{username}` response `201` ([#810](https://github.com/opensearch-project/opensearch-api-specification/pull/810)) diff --git a/spec/namespaces/_core.yaml b/spec/namespaces/_core.yaml index 7e8bcc884..1b463ab0a 100644 --- a/spec/namespaces/_core.yaml +++ b/spec/namespaces/_core.yaml @@ -2273,6 +2273,7 @@ components: - $ref: '../schemas/_core.bulk.yaml#/components/schemas/OperationContainer' - $ref: '../schemas/_core.bulk.yaml#/components/schemas/UpdateAction' - type: object + - type: number description: The operation definition and data (action-data pairs), separated by newlines required: true bulk_stream: