From b96dcb9b50cfe9c2b870f130e026b45521e8b891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Tue, 3 Dec 2024 19:04:18 +0100 Subject: [PATCH] better add_search typing --- src/c3nav/mapdata/schemas/model_base.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/c3nav/mapdata/schemas/model_base.py b/src/c3nav/mapdata/schemas/model_base.py index dfdedab6..536f80bf 100644 --- a/src/c3nav/mapdata/schemas/model_base.py +++ b/src/c3nav/mapdata/schemas/model_base.py @@ -113,14 +113,9 @@ class LocationSchema(WithAccessRestrictionSchema, TitledSchema, LocationSlugSche title="can describe locations", description="if `true`, this object can be used to describe other locations (e.g. in their subtitle)", ) - add_search: Union[ - Annotated[str, APIField(title="search terms", description="set when looking for searchable locations")], - Annotated[None, APIField(title="null", description="when not looking for searchable locations")], - ] = APIField( - None, + add_search: str = APIField( title="additional search terms", - description="more data for the search index separated by spaces, " - "only set when looking for searchable locations", + description="more data for the search index separated by spaces", example="more search terms", )