Skip to content

Commit

Permalink
feat: align model files
Browse files Browse the repository at this point in the history
  • Loading branch information
merydian committed Nov 25, 2024
1 parent 0932056 commit f4e5f4b
Showing 1 changed file with 48 additions and 19 deletions.
67 changes: 48 additions & 19 deletions models/yml_config_ignore_extras_9.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,15 @@ class ServerServlet(BaseModel):
context_path: Optional[str] = Field(None, alias='context-path')


class Tomcat(BaseModel):
model_config = ConfigDict(extra='allow')


class Server(BaseModel):
port: Optional[int] = None
error: Optional[Error] = None
servlet: Optional[ServerServlet] = None
tomcat: Optional[Tomcat] = None


class SpringProfiles(BaseModel):
Expand All @@ -47,6 +52,11 @@ class Spring(BaseModel):
profiles: Optional[SpringProfiles] = None
mvc: Optional[Mvc] = None
main: Optional[Main] = None
swagger_ui: Optional[SwaggerUi] = Field(None, alias='swagger-ui')
api_docs: Optional[ApiDocs] = Field(None, alias='api-docs')
packages_to_scan: Optional[str] = Field(None, alias='packages-to-scan')
pathsToMatch: Optional[str] = None



class SyntaxHighlight(BaseModel):
Expand All @@ -67,13 +77,6 @@ class ApiDocs(BaseModel):
version: Optional[str] = None


class Springdoc(BaseModel):
swagger_ui: Optional[SwaggerUi] = Field(None, alias='swagger-ui')
api_docs: Optional[ApiDocs] = Field(None, alias='api-docs')
packages_to_scan: Optional[str] = Field(None, alias='packages-to-scan')
pathsToMatch: Optional[str] = None


class File(BaseModel):
name: Optional[str] = None

Expand All @@ -90,6 +93,7 @@ class Org(BaseModel):
class Level(BaseModel):
root: Optional[str] = None
org: Optional[Org] = None
org_heigit: Optional[str] = Field(None, alias='org.heigit')


class Logging(BaseModel):
Expand Down Expand Up @@ -182,11 +186,16 @@ class Snap(BaseModel):
attribution: Optional[str] = None


class Export(BaseModel):
pass


class Endpoints(BaseModel):
routing: Optional[Routing] = None
matrix: Optional[Matrix] = None
isochrones: Optional[Isochrones] = None
Snap: Optional[Union[Snap, Dict]] = None # using Union[Snap, Dict] to workaround Error:
snap: Optional[Union[Snap, Dict]] = None # using Union[Snap, Dict] to workaround Error:
export: Optional[Export] = None
# ors.endpoints.Snap Input should be None


Expand Down Expand Up @@ -272,8 +281,29 @@ class ExtStorages(BaseModel):
OsmId: Optional[Dict] = None


class Service(BaseModel):
execution: Optional[Execution] = None
force_turn_costs: Optional[bool] = None
maximum_distance: Optional[int] = None
maximum_distance_avoid_areas: Optional[int] = None
maximum_distance_alternative_routes: Optional[int] = None
maximum_distance_dynamic_weights: Optional[int] = None
maximum_distance_round_trip_routes: Optional[int] = None
maximum_snapping_radius: Optional[int] = None
maximum_speed_lower_bound: Optional[int] = None
maximum_visited_nodes: Optional[int] = None
maximum_waypoints: Optional[int] = None


class ProfileEntry(BaseModel):
build: Optional[Build] = None
encoder_name: Optional[str] = None
service: Optional[Service] = None
enabled: Optional[bool] = None


class Build(BaseModel):
source_file: Optional[str] = None
profile: Optional[str] = None
graph_path: Optional[str] = None
elevation: Optional[bool] = None
Expand All @@ -300,18 +330,19 @@ class ProfileEntry(BaseModel):
preparation: Optional[Preparation] = None
execution: Optional[Execution] = None
gtfs_file: Optional[str] = None
ext_storages: Optional[ExtStorages] = None


class Profiles(BaseModel):
car: Optional[ProfileEntry] = None
hgv: Optional[ProfileEntry] = None
bike_regular: Optional[ProfileEntry] = Field(None, alias='bike-regular')
bike_mountain: Optional[ProfileEntry] = Field(None, alias='bike-mountain')
bike_road: Optional[ProfileEntry] = Field(None, alias='bike-road')
bike_electric: Optional[ProfileEntry] = Field(None, alias='bike-electric')
walking: Optional[ProfileEntry] = None
hiking: Optional[ProfileEntry] = None
wheelchair: Optional[ProfileEntry] = None
driving_car: Optional[ProfileEntry] = Field(None, alias='driving-car')
driving_hgv: Optional[ProfileEntry] = Field(None, alias='driving-hgv')
cycling_regular: Optional[ProfileEntry] = Field(None, alias='cycling-regular')
cycling_mountain: Optional[ProfileEntry] = Field(None, alias='cycling-mountain')
cycling_road: Optional[ProfileEntry] = Field(None, alias='cycling-road')
cycling_electric: Optional[ProfileEntry] = Field(None, alias='cycling-electric')
foot_walking: Optional[ProfileEntry] = Field(None, alias='foot-walking')
foot_hiking: Optional[ProfileEntry] = Field(None, alias='foot-hiking')
wheelchair: Optional[ProfileEntry] = Field(None, alias='wheelchair')
public_transport: Optional[ProfileEntry] = Field(None, alias='public-transport')


Expand Down Expand Up @@ -339,7 +370,6 @@ class Message(BaseModel):


class Engine(BaseModel):
source_file: Optional[str] = None
init_threads: Optional[int] = None
preparation_mode: Optional[bool] = None
graphs_root_path: Optional[str] = None
Expand All @@ -352,6 +382,5 @@ class Engine(BaseModel):
class OrsConfigYMLIgnoreExtras9(BaseModel):
server: Optional[Server] = None
spring: Optional[Spring] = None
springdoc: Optional[Springdoc] = None
logging: Optional[Logging] = None
ors: Optional[Ors] = None

0 comments on commit f4e5f4b

Please sign in to comment.