11from __future__ import annotations
2- from typing import List , Optional , Union
2+ from typing import List , Optional , Tuple
33from pydantic import BaseModel , Field , model_validator , conlist
44from fastapi .exceptions import HTTPException
55
66
77class Spatial (BaseModel ):
88 bbox : List [List [float ]]
99 storageCrsBbox : Optional [List [float ]] = None
10- crs : Optional [List [ str ] ] = Field (
11- [ 'http://www.opengis.net/def/crs/OGC/1.3/CRS84' ] ,
10+ crs : Optional [str ] = Field (
11+ 'http://www.opengis.net/def/crs/OGC/1.3/CRS84' ,
1212 description = 'the list of coordinate reference systems supported by the API; the first item is the default coordinate reference system' ,
13- example = [
13+ examples = [
1414 'http://www.opengis.net/def/crs/OGC/1.3/CRS84' ,
1515 'http://www.opengis.net/def/crs/EPSG/0/4326' ,
1616 ],
@@ -27,17 +27,18 @@ def validation(self):
2727
2828
2929class Temporal (BaseModel ):
30- interval : Optional [conlist (str , min_length = 1 , max_length = 2 )] = None
31- crs : Optional [List [str ]] = Field (
32- ['' ],
30+ interval : Optional [conlist (
31+ Tuple [Optional [str ], Optional [str ]],
32+ min_length = 1 ,
33+ )] = None
34+ trs : Optional [str ] = Field (
35+ 'http://www.opengis.net/def/uom/ISO-8601/0/Gregorian' ,
3336 description = """Coordinate reference system of the coordinates in the temporal extent
3437 (property interval). The default reference system is the Gregorian calendar.
3538 For data for which the Gregorian calendar is not suitable, such as geological time scale,
3639 another temporal reference system may be used""" ,
37- example = [
40+ examples = [
3841 'http://www.opengis.net/def/uom/ISO-8601/0/Gregorian'
3942 ],
4043 )
4144 grid : Optional [str ] = ''
42-
43-
0 commit comments