diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c87a449f..dc960e581 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -83,7 +83,6 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Fixed query DSL `match` that supports a field name and value ([#405](https://github.com/opensearch-project/opensearch-api-specification/pull/405)) - Fixed `/_mapping` with `index` in query ([#385](https://github.com/opensearch-project/opensearch-api-specification/pull/385)) - Fixed duplicate `/_nodes/{node_id}` path ([#416](https://github.com/opensearch-project/opensearch-api-specification/pull/416)) -- Fixed required value for `constant_keyword` field type ([#419](https://github.com/opensearch-project/opensearch-api-specification/pull/419)) ### Security diff --git a/spec/schemas/_common.mapping.yaml b/spec/schemas/_common.mapping.yaml index 6c4645abe..18ef5472f 100644 --- a/spec/schemas/_common.mapping.yaml +++ b/spec/schemas/_common.mapping.yaml @@ -789,14 +789,13 @@ components: - type: object properties: value: - type: string + type: object type: type: string enum: - constant_keyword required: - type - - value FieldAliasProperty: allOf: - $ref: '#/components/schemas/PropertyBase' diff --git a/tests/mapping/constant_keyword.yaml b/tests/mapping/constant_keyword.yaml deleted file mode 100644 index 0d209edc5..000000000 --- a/tests/mapping/constant_keyword.yaml +++ /dev/null @@ -1,31 +0,0 @@ -$schema: ../../json_schemas/test_story.schema.yaml - -description: Test constant_keyword field type and retrieving a doc. -version: '>= 2.14' -prologues: - - path: /movies - method: PUT - request_body: - payload: - mappings: - properties: - genre: - type: constant_keyword - value: Romantic comedy - -epilogues: - - path: /movies - method: DELETE - status: [200, 404] -chapters: - - synopsis: Create a document. - path: /{index}/_doc - method: POST - parameters: - index: movies - request_body: - payload: - genre: Romantic comedy - year: 1991 - response: - status: 201