Skip to content

Commit

Permalink
api: Fix the search API schema.
Browse files Browse the repository at this point in the history
Updated the schema reference in the search API from 'Region' to
'SearchResult'. Also, added a new 'SearchResult' schema with 'id',
'name', and 'path' properties. It corresponds to the current back/front
implementation.

Signed-off-by: Nikolay Martyanov <[email protected]>
  • Loading branch information
OhmSpectator committed Jan 6, 2024
1 parent 41fd0b4 commit 527ad8e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion api/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ paths:
schema:
type: array
items:
$ref: '#/components/schemas/Region'
$ref: '#/components/schemas/SearchResult'
'204':
description: No regions match the query
'400':
Expand Down Expand Up @@ -338,6 +338,17 @@ components:
hasSubregions:
type: boolean

SearchResult:
type: object
properties:
id:
type: integer
name:
type: string
path:
type: string
description: A ' > ' delimited string representing the hierarchical path of the region.

CRS:
type: object
properties:
Expand Down

0 comments on commit 527ad8e

Please sign in to comment.