diff --git a/spec/schemas/_common.yaml b/spec/schemas/_common.yaml index 713509ee5..7ba82ea03 100644 --- a/spec/schemas/_common.yaml +++ b/spec/schemas/_common.yaml @@ -671,11 +671,9 @@ components: $ref: '#/components/schemas/Routing' _source: type: object - additionalProperties: - type: object + additionalProperties: true required: - found - - _source Names: oneOf: - $ref: '#/components/schemas/Name' @@ -1256,7 +1254,6 @@ components: type: object required: - found - - _source IndexAlias: type: string ErrorResponseBase: diff --git a/tests/_core/bulk.yaml b/tests/_core/bulk.yaml index 04e03e241..e7cc18cb0 100644 --- a/tests/_core/bulk.yaml +++ b/tests/_core/bulk.yaml @@ -12,18 +12,23 @@ chapters: request_body: content_type: application/x-ndjson payload: - - {create: {_index: movies}} - - {director: Bennett Miller, title: Moneyball, year: 2011} + - { create: { _index: movies } } + - { director: Bennett Miller, title: Moneyball, year: 2011 } - synopsis: Bulk document CRUD. path: /_bulk method: POST request_body: content_type: application/x-ndjson payload: - - {create: {_index: books, _id: book_1392214}} - - {author: Harper Lee, title: To Kill a Mockingbird, year: 1960} - - {update: {_index: books, _id: book_1392214}} - - {doc: {pages: 376}} - - {update: {_index: books, _id: book_1392214}} - - {script: {source: 'ctx._source.pages = 376;'}} - - {delete: {_index: books, _id: book_1392214}} + - { create: { _index: books, _id: book_1392214 } } + - { author: Harper Lee, title: To Kill a Mockingbird, year: 1960 } + - { update: { _index: books, _id: book_1392214 } } + - { doc: { pages: 376 } } + - { update: { _index: books, _id: book_1392214 } } + - { doc: { pages: 376 }, _source: true } + - { update: { _index: books, _id: book_1392214 } } + - { script: { source: 'ctx._source.pages = 376;' } } + - { update: { _index: books, _id: does_not_exist } } + - { script: { source: 'ctx.op = "none";' }, scripted_upsert: true, upsert: { pages: 375 } } + - { delete: { _index: books, _id: book_1392214 } } +