Skip to content

Commit

Permalink
Added FlatObjectProperty.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <dblock@amazon.com>
  • Loading branch information
dblock committed Nov 11, 2024
1 parent 62f1f5f commit da81714
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 46 deletions.
16 changes: 16 additions & 0 deletions spec/schemas/_common.mapping.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ components:
- $ref: '#/components/schemas/DenseVectorProperty'
- $ref: '#/components/schemas/SparseVectorProperty'
- $ref: '#/components/schemas/FlattenedProperty'
- $ref: '#/components/schemas/FlatObjectProperty'
- $ref: '#/components/schemas/NestedProperty'
- $ref: '#/components/schemas/ObjectProperty'
- $ref: '#/components/schemas/CompletionProperty'
Expand Down Expand Up @@ -614,6 +615,21 @@ components:
- flattened
required:
- type
FlatObjectProperty:
allOf:
- $ref: '#/components/schemas/PropertyBase'
- type: object
properties:
searchable:
type: boolean
aggregatable:
type: boolean
type:
type: string
enum:
- flat_object
required:
- type
NestedProperty:
allOf:
- $ref: '#/components/schemas/CorePropertyBase'
Expand Down
47 changes: 1 addition & 46 deletions tests/default/_core/mapping.yaml
Original file line number Diff line number Diff line change
@@ -1,54 +1,9 @@
$schema: ../../../json_schemas/test_story.schema.yaml

description: Test mappings endpoints.
prologues:
- path: /{index}
method: PUT
parameters:
index: movies
request:
payload:
mappings:
properties:
director:
type: text
year:
type: integer
location:
type: ip
ignore_malformed: true
epilogues:
- path: /movies
method: DELETE
status: [200, 404]
chapters:
- synopsis: Get mappings for an index (index in query).
- synopsis: Get all mappings.
path: /_mapping
method: GET
parameters:
index: movies
response:
status: 200
payload:
movies:
mappings:
properties:
director:
type: text
year:
type: integer
- synopsis: Get mappings for an index (index in path).
path: /{index}/_mapping
method: GET
parameters:
index: movies
response:
status: 200
payload:
movies:
mappings:
properties:
director:
type: text
year:
type: integer

0 comments on commit da81714

Please sign in to comment.