""" Options: Date: 2024-11-21 11:29:37 Version: 8.23 Tip: To override a DTO option, remove "#" prefix before updating BaseUrl: https://api.bokamera.se #GlobalNamespace: #AddServiceStackTypes: True #AddResponseStatus: False #AddImplicitVersion: #AddDescriptionAsComments: True IncludeTypes: GeoDataCitiesQuery.* #ExcludeTypes: #DefaultImports: datetime,decimal,marshmallow.fields:*,servicestack:*,typing:*,dataclasses:dataclass/field,dataclasses_json:dataclass_json/LetterCase/Undefined/config,enum:Enum/IntEnum #DataClass: #DataClassJson: """ import datetime import decimal from marshmallow.fields import * from servicestack import * from typing import * from dataclasses import dataclass, field from dataclasses_json import dataclass_json, LetterCase, Undefined, config from enum import Enum, IntEnum @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class BaseModel: pass @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class City(BaseModel): # @Ignore() longitude: float = 0.0 # @Ignore() latitude: float = 0.0 # @Required() name: Optional[str] = None # @Required() country: Optional[str] = None iso2: Optional[str] = None # @Required() admin: Optional[str] = None capital: Optional[str] = None population: Optional[int] = None population_proper: Optional[int] = None modified_date: Optional[datetime.datetime] = None # @Required() id: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class GeoDataCitiesQueryResponse: id: Optional[str] = None city: Optional[str] = None longitude: Optional[str] = None latitude: Optional[str] = None country: Optional[str] = None iso2: Optional[str] = None admin: Optional[str] = None capital: Optional[str] = None population: Optional[int] = None population_proper: Optional[int] = None # @Route("/geodata/{CountryId}/cities/", "GET") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class GeoDataCitiesQuery(QueryDb2[City, GeoDataCitiesQueryResponse], IReturn[QueryResponse[GeoDataCitiesQueryResponse]]): # @ApiMember(Description="Enter the country id you want to search cities. Example SE for Sweden.", IsRequired=true, ParameterType="path") country_id: Optional[str] = None """ Enter the country id you want to search cities. Example SE for Sweden. """