Type the /search API response to better document the response schema

- Both Text, Image Search were already giving list of entry, score
- This change just concretizes this change and exposes this in the API
  documentation (i.e OpenAPI, Swagger, Redocs)
This commit is contained in:
Debanjum Singh Solanky
2022-09-15 13:57:20 +03:00
parent 0521ea10d6
commit 99754970ab
4 changed files with 18 additions and 13 deletions

View File

@@ -71,3 +71,8 @@ class FullConfig(ConfigBase):
content_type: Optional[ContentConfig]
search_type: Optional[SearchConfig]
processor: Optional[ProcessorConfig]
class SearchResponse(ConfigBase):
entry: str
score: str
additional: Optional[dict]