Skip to content
Open
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
6 changes: 2 additions & 4 deletions spec/schemas/_common.query_dsl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -806,8 +806,7 @@ components:
$ref: '#/components/schemas/GeoShape'
relation:
$ref: '_common.yaml#/components/schemas/GeoShapeRelation'
required:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropping required unblocks indexed_shape-only, but it also makes both shape+indexed_shape and neither valid. Per the docs and @xluo-aws (opensearch-java#2011), it should be exactly one — already modeled in this same file by TermsLookup:

allOf:
  - oneOf:
      - type: object
        properties:
          indexed_shape: { $ref: '#/components/schemas/FieldLookup' }
        required: [indexed_shape]
      - type: object
        properties:
          shape: { $ref: '#/components/schemas/GeoShape' }
        required: [shape]

- shape

GeoShapeQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
Expand Down Expand Up @@ -2260,8 +2259,7 @@ components:
$ref: '#/components/schemas/XyShape'
relation:
$ref: '_common.yaml#/components/schemas/GeoShapeRelation'
required:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here — XyShapeQueryField needs the same exactly-one allOf/oneOf treatment (with XyShape instead of GeoShape).

- shape

XyShapeQuery:
x-version-added: '2.4'
allOf:
Expand Down