add external_url and hub_import_type

This commit is contained in:
Laura Klünder 2023-12-22 01:19:53 +01:00
parent 21688c11d9
commit 4ade6cfc1f
5 changed files with 73 additions and 3 deletions

View file

@ -672,6 +672,14 @@ class DisplayLink(BaseSchema):
can_search: bool
class DisplayURL(BaseSchema):
"""
A URL link for the location display
"""
title: NonEmptyStr
url: NonEmptyStr
class LocationDisplay(BaseSchema):
id: AnyLocationID = APIField(
description="a numeric ID for a map location or a string ID for generated locations",
@ -701,6 +709,7 @@ class LocationDisplay(BaseSchema):
Annotated[str, APIField(title="a simple string value")],
Annotated[DisplayLink, APIField(title="a link value")],
Annotated[list[DisplayLink], APIField(title="a list of link values")],
Annotated[DisplayURL, APIField(title="an URL value")],
Annotated[None, APIField(title="no value")]
], APIField(title="field value", union_mode='left_to_right')]
]
@ -729,7 +738,11 @@ class LocationDisplay(BaseSchema):
"title": "Locations that Start with E",
"can_search": False,
}
])
]),
("External URL", {
"title": "Open",
"url": "https://example.com/",
})
]
)
geometry: Union[