Skip to content

Commit

Permalink
allow null fields in v3 countries response
Browse files Browse the repository at this point in the history
  • Loading branch information
russbiggs committed Jul 26, 2024
1 parent 016c7e7 commit 68ffd9e
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions openaq_api/openaq_api/v3/models/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ class ManufacturerBase(JsonBase):


class LicenseBase(JsonBase):
id: int
url: str
date_from: date
date_to: date | None = None
description: str | None = None
id: int
url: str
date_from: date
date_to: date | None = None
description: str | None = None


class Latest(JsonBase):
Expand Down Expand Up @@ -148,9 +148,9 @@ class Country(CountryBase):
id: int
code: str
name: str
datetime_first: datetime
datetime_last: datetime
parameters: list[ParameterBase]
datetime_first: datetime | None = None
datetime_last: datetime | None = None
parameters: list[ParameterBase] | None = None


class Entity(EntityBase):
Expand All @@ -169,8 +169,7 @@ class Provider(ProviderBase):
bbox: GeoJSON | None = None


class Owner(OwnerBase):
...
class Owner(OwnerBase): ...


class Instrument(InstrumentBase):
Expand Down Expand Up @@ -211,7 +210,7 @@ class Location(JsonBase):


class Measurement(JsonBase):
#datetime: DatetimeObject
# datetime: DatetimeObject
value: float
parameter: ParameterBase
period: Period | None = None
Expand Down

0 comments on commit 68ffd9e

Please sign in to comment.