diff --git a/pom.xml b/pom.xml index 88f6cb3..e115792 100644 --- a/pom.xml +++ b/pom.xml @@ -162,7 +162,7 @@ org.openapitools openapi-generator-maven-plugin - 7.8.0 + 7.18.0 generate-carta-client @@ -170,10 +170,10 @@ generate - ${project.basedir}/src/main/resources/carta.json + ${project.basedir}/src/main/resources/carta_fixed.json java - okhttp-gson + resttemplate ${project.build.directory}/generated-sources/openapi/carta-client @@ -187,13 +187,18 @@ src/main/java - java8 + java21 true + false + false + + - - true + + false + false diff --git a/src/main/java/SuMoC/backend/carta/CartaClient.java b/src/main/java/SuMoC/backend/carta/CartaClient.java index 03391d6..8fc2379 100644 --- a/src/main/java/SuMoC/backend/carta/CartaClient.java +++ b/src/main/java/SuMoC/backend/carta/CartaClient.java @@ -1,16 +1,18 @@ package SuMoC.backend.carta; import org.springframework.stereotype.Service; +import sumoc.backend.carta.client.api.CartaApi; import sumoc.backend.carta.client.api.MapApi; -import sumoc.backend.carta.client.invoker.ApiException; import sumoc.backend.carta.client.model.Direction; @Service public class CartaClient { private final MapApi mapApi; + private final CartaApi cartaApi; - public CartaClient(MapApi mapApi) { + public CartaClient(MapApi mapApi, CartaApi cartaApi) { + this.cartaApi = cartaApi; this.mapApi = mapApi; } @@ -47,7 +49,7 @@ public class CartaClient { ) { try { String uid = null; // Optional user identifier - return mapApi.getDirection( + return cartaApi.getDirection( origin, destination, mode, @@ -63,7 +65,7 @@ public class CartaClient { location, uid ); - } catch (ApiException e) { + } catch (Exception e) { throw new RuntimeException(e); } } diff --git a/src/main/java/SuMoC/backend/carta/CartaClientConfig.java b/src/main/java/SuMoC/backend/carta/CartaClientConfig.java index 07fa3e4..c6cb125 100644 --- a/src/main/java/SuMoC/backend/carta/CartaClientConfig.java +++ b/src/main/java/SuMoC/backend/carta/CartaClientConfig.java @@ -3,6 +3,7 @@ package SuMoC.backend.carta; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import sumoc.backend.carta.client.api.CartaApi; import sumoc.backend.carta.client.api.MapApi; import sumoc.backend.carta.client.invoker.ApiClient; @@ -22,4 +23,9 @@ public class CartaClientConfig { public MapApi mapApi(ApiClient cartaApiClient) { return new MapApi(cartaApiClient); } + + @Bean + public CartaApi cartaApi(ApiClient cartaApiClient) { + return new CartaApi(cartaApiClient); + } } diff --git a/src/main/java/SuMoC/backend/routing/RoutingAlternativeController.java b/src/main/java/SuMoC/backend/routing/RoutingAlternativeController.java deleted file mode 100644 index d47a0bf..0000000 --- a/src/main/java/SuMoC/backend/routing/RoutingAlternativeController.java +++ /dev/null @@ -1,31 +0,0 @@ -package SuMoC.backend.routing; - -import SuMoC.backend.routing.dtos.RouteAlternativeDTO; -import SuMoC.backend.routing.dtos.RouteAlternativeRequestDTO; -import jakarta.validation.Valid; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.util.List; - -@RestController -@RequestMapping("/routing/alternative") -public class RoutingAlternativeController { - private final RoutingAlternativeService routingAlternativeService; - - @Autowired - public RoutingAlternativeController(RoutingAlternativeService routingAlternativeService) { - this.routingAlternativeService = routingAlternativeService; - } - - // TODO operation description + how to handle preferences (optional, if not provided use saved users prefs or default - @PostMapping("/request") - public ResponseEntity> requestAlternativeRoutes(@Valid @RequestBody RouteAlternativeRequestDTO routeAlternativeRequestDTO) { - // Implementation goes here - return null; - } -} diff --git a/src/main/java/SuMoC/backend/routing/RoutingController.java b/src/main/java/SuMoC/backend/routing/RoutingController.java new file mode 100644 index 0000000..d5e3624 --- /dev/null +++ b/src/main/java/SuMoC/backend/routing/RoutingController.java @@ -0,0 +1,50 @@ +package SuMoC.backend.routing; + +import SuMoC.backend.carta.CartaClient; +import SuMoC.backend.routing.dtos.RouteAlternativeDTO; +import SuMoC.backend.routing.dtos.RouteAlternativeRequestDTO; +import jakarta.validation.Valid; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@RestController +@RequestMapping("/routing/alternative") +public class RoutingController { + private final RoutingService routingService; + private final CartaClient cartaClient; + + @Autowired + public RoutingController(RoutingService routingService, CartaClient cartaClient) { + this.routingService = routingService; + this.cartaClient = cartaClient; + } + + // TODO operation description + how to handle preferences (optional, if not provided use saved users prefs or default + @PostMapping("/request") + public ResponseEntity> requestAlternativeRoutes(@Valid @RequestBody RouteAlternativeRequestDTO routeAlternativeRequestDTO) { + var direction = cartaClient.getRoute( + routeAlternativeRequestDTO.getOrigin(), + routeAlternativeRequestDTO.getDestination(), + "walking", // mode + null, // arrivalTime + null, // departureTime + 1, // alternatives + null, // walkingSpeed + null, // transferTime + null, // accessible + null, // parking + null, // type + null, // range + null // location + ); + var dto = new RouteAlternativeDTO(); + dto.setDirection(direction); + return ResponseEntity.ok(List.of(dto)); + } +} diff --git a/src/main/java/SuMoC/backend/routing/RoutingAlternativeService.java b/src/main/java/SuMoC/backend/routing/RoutingService.java similarity index 68% rename from src/main/java/SuMoC/backend/routing/RoutingAlternativeService.java rename to src/main/java/SuMoC/backend/routing/RoutingService.java index 0ab23c5..e09a83e 100644 --- a/src/main/java/SuMoC/backend/routing/RoutingAlternativeService.java +++ b/src/main/java/SuMoC/backend/routing/RoutingService.java @@ -3,5 +3,5 @@ package SuMoC.backend.routing; import org.springframework.stereotype.Service; @Service -public class RoutingAlternativeService { +public class RoutingService { } diff --git a/src/main/java/SuMoC/backend/routing/dtos/RouteAlternativeDTO.java b/src/main/java/SuMoC/backend/routing/dtos/RouteAlternativeDTO.java index 9035919..77e80ce 100644 --- a/src/main/java/SuMoC/backend/routing/dtos/RouteAlternativeDTO.java +++ b/src/main/java/SuMoC/backend/routing/dtos/RouteAlternativeDTO.java @@ -1,4 +1,16 @@ package SuMoC.backend.routing.dtos; +import sumoc.backend.carta.client.model.Direction; + public class RouteAlternativeDTO { + private Direction direction; + + // Getters and setters + public Direction getDirection() { + return direction; + } + + public void setDirection(Direction direction) { + this.direction = direction; + } } diff --git a/src/main/java/SuMoC/backend/routing/dtos/RouteAlternativeRequestDTO.java b/src/main/java/SuMoC/backend/routing/dtos/RouteAlternativeRequestDTO.java index 942d436..a7b673f 100644 --- a/src/main/java/SuMoC/backend/routing/dtos/RouteAlternativeRequestDTO.java +++ b/src/main/java/SuMoC/backend/routing/dtos/RouteAlternativeRequestDTO.java @@ -1,4 +1,23 @@ package SuMoC.backend.routing.dtos; public class RouteAlternativeRequestDTO { + private String origin; + private String destination; + + // Getters and setters + public String getOrigin() { + return origin; + } + + public void setOrigin(String origin) { + this.origin = origin; + } + + public String getDestination() { + return destination; + } + + public void setDestination(String destination) { + this.destination = destination; + } } diff --git a/src/main/java/SuMoC/backend/routing/dtos/RoutingPreferencesDTO.java b/src/main/java/SuMoC/backend/routing/dtos/RoutingPreferencesDTO.java index 223cf08..cb76b9c 100644 --- a/src/main/java/SuMoC/backend/routing/dtos/RoutingPreferencesDTO.java +++ b/src/main/java/SuMoC/backend/routing/dtos/RoutingPreferencesDTO.java @@ -12,7 +12,8 @@ public class RoutingPreferencesDTO { private boolean preferPhysicalActivity = false; private List excludedModalities = List.of(); - public RoutingPreferencesDTO() {} + public RoutingPreferencesDTO() { + } public RoutingPreferencesDTO(boolean preferPhysicalActivity, List excludedModalities) { this.preferPhysicalActivity = preferPhysicalActivity; diff --git a/src/main/java/SuMoC/backend/security/SecurityConfiguration.java b/src/main/java/SuMoC/backend/security/SecurityConfiguration.java index 5a025e0..b2f51d7 100644 --- a/src/main/java/SuMoC/backend/security/SecurityConfiguration.java +++ b/src/main/java/SuMoC/backend/security/SecurityConfiguration.java @@ -89,6 +89,7 @@ public class SecurityConfiguration { //.authorizeHttpRequests(auth -> auth.anyRequest().permitAll()) //allows Access To ALL APIs, Security is off .authorizeHttpRequests(auth -> { auth.requestMatchers(HttpMethod.OPTIONS, "/**").permitAll(); + auth.requestMatchers("/routing/alternative/**").permitAll(); auth.requestMatchers("/auth/user/**").permitAll(); auth.requestMatchers("/admin/**").hasRole("ADMIN"); //looks for "ROLE_ADMIN" //alternative: hasAuthoritiy("ADMIN") auth.requestMatchers("/user/**").hasAnyRole("ADMIN", "USER"); diff --git a/src/main/java/SuMoC/backend/util/OpenApiSpecFixer.java b/src/main/java/SuMoC/backend/util/OpenApiSpecFixer.java new file mode 100644 index 0000000..661db09 --- /dev/null +++ b/src/main/java/SuMoC/backend/util/OpenApiSpecFixer.java @@ -0,0 +1,43 @@ +package SuMoC.backend.util; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ObjectNode; + +import java.io.File; +import java.util.Set; + +public class OpenApiSpecFixer { + + private static final ObjectMapper mapper = new ObjectMapper(); + private static final Set SCHEMAS_TO_BREAK = Set.of( + "GeoJsonGeometry", + "GeoJsonGeometryCollection", + "Step", + "CyclingStep", + "StreetStep" + // Add other cyclic schemas here + ); + + public static void main(String[] args) throws Exception { + File inputFile = new File("src/main/resources/carta_orig.json"); + File outputFile = new File("src/main/resources/carta_fixed.json"); + + JsonNode root = mapper.readTree(inputFile); + ObjectNode schemas = (ObjectNode) root.at("/components/schemas"); + + for (String schemaName : SCHEMAS_TO_BREAK) { + if (schemas.has(schemaName)) { + ObjectNode schema = (ObjectNode) schemas.get(schemaName); + // Remove problematic recursive $ref, keep as generic object + schema.removeAll(); + schema.put("type", "object"); + schema.put("description", "Flattened to break circular reference"); + System.out.println("Fixed: " + schemaName); + } + } + + mapper.writerWithDefaultPrettyPrinter().writeValue(outputFile, root); + System.out.println("Fixed spec written to: " + outputFile.getPath()); + } +} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index f532d73..2a2bcd8 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -9,4 +9,4 @@ spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect logging.level.org.springframework.security=Trace springdoc.api-docs.path=/v3/api-docs springdoc.swagger-ui.path=/swagger-ui.html -carta.base-url=https://mobydex.locoslab.com \ No newline at end of file +carta.base-url=https://mobydex.locoslab.com/carta \ No newline at end of file diff --git a/src/main/resources/carta.json b/src/main/resources/carta.json deleted file mode 100644 index 8190418..0000000 --- a/src/main/resources/carta.json +++ /dev/null @@ -1,3672 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "title": "LocosLab Carta Service", - "description": "Locoslab Carta Service Api", - "termsOfService": "https://www.locoslab.com", - "contact": { - "name": "LocosLab GmbH", - "url": "https://www.locoslab.com", - "email": "info@locoslab.com" - }, - "license": { - "name": "LocosLab License", - "url": "https://www.locoslab.com" - }, - "version": "1.0" - }, - "servers": [ - { - "url": "/carta", - "description": "LocosLab GmbH" - } - ], - "paths": { - "/location/{id}/geometry": { - "get": { - "tags": [ - "Carta", - "Geo" - ], - "summary": "Returns the geometry for the location with the specified id.", - "operationId": "getGeometry", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The location id to retrieve.", - "required": true, - "schema": { - "pattern": "[a-zA-Z]+|.*", - "type": "string" - } - }, - { - "name": "location", - "in": "query", - "description": "The user location specified as a coordinate (latitude,longitude) used as context for the name resolution.", - "schema": { - "type": "string" - }, - "example": "50.689782,7.159647" - }, - { - "name": "uid", - "in": "query", - "description": "The globally unique user identifier which should be a UUID (if provided).", - "schema": { - "type": "string" - }, - "example": "003b90ec-96cb-4262-ab90-49c966f4913b" - } - ], - "responses": { - "200": { - "description": "Geometry retrieved successfully.", - "content": { - "application/geo+json": { - "schema": { - "$ref": "#/components/schemas/GeoJsonObject" - } - } - } - }, - "400": { - "description": "Bad request parameters." - } - } - } - }, - "/location/{id}": { - "get": { - "tags": [ - "Carta", - "Geo" - ], - "summary": "Returns the location with the specified id.", - "operationId": "getLocation", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The location id to retrieve.", - "required": true, - "schema": { - "pattern": "[a-zA-Z]+|.*", - "type": "string" - } - }, - { - "name": "location", - "in": "query", - "description": "The user location specified as a coordinate (latitude,longitude) used as context for the name resolution.", - "schema": { - "type": "string" - }, - "example": "50.689782,7.159647" - }, - { - "name": "uid", - "in": "query", - "description": "The globally unique user identifier which should be a UUID (if provided).", - "schema": { - "type": "string" - }, - "example": "003b90ec-96cb-4262-ab90-49c966f4913b" - } - ], - "responses": { - "200": { - "description": "Location retrieved successfully.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Location" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/Location" - } - } - } - }, - "400": { - "description": "Bad request parameters." - }, - "404": { - "description": "Location not found." - } - } - } - }, - "/location/search": { - "get": { - "tags": [ - "Carta", - "Geo" - ], - "summary": "Returns a list of locations for a particular query.", - "operationId": "searchLocations", - "parameters": [ - { - "name": "q", - "in": "query", - "description": "The query to resolve (i.e. a name or a coordinate with latitude, longitude or a range of two coordinates).", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "type", - "in": "query", - "description": "A comma-separated list of location types to filter.", - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "COUNTRY", - "STATE", - "COUNTY", - "CITY", - "SUBURB", - "NEIGHBORHOOD", - "LOCALITY", - "STREET", - "BUILDING", - "TRANSIT", - "PARKING", - "ADMINISTRATION", - "EDUCATION", - "HEALTHCARE", - "TOURISM", - "INDOOR", - "CHARGING" - ] - } - } - }, - { - "name": "subtype", - "in": "query", - "description": "A comma-separated list of location sub types to filter.", - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "INDOOR_DOORWAY", - "INDOOR_ELEVATOR", - "INDOOR_ESCALATOR", - "INDOOR_RAMP", - "INDOOR_STAIRS", - "INDOOR_RESTROOM", - "INDOOR_INFORMATION", - "INDOOR_CHECKPOINT", - "LEVEL_SAME", - "LEVEL_UP", - "LEVEL_DOWN", - "LEVEL_UPDOWN", - "LIMIT_MEN", - "LIMIT_WOMEN", - "LIMIT_UNISEX", - "PASS_IN", - "PASS_OUT", - "PASS_INOUT", - "TRANSIT_STATION", - "TRANSIT_GROUP", - "TRANSIT_TRAM", - "TRANSIT_METRO", - "TRANSIT_RAIL", - "TRANSIT_BUS", - "TRANSIT_FERRY", - "TRANSIT_CABLECAR", - "TRANSIT_GONDOLA", - "TRANSIT_FUNICULAR", - "TRANSIT_TROLLEYBUS", - "TRANSIT_MONORAIL", - "TRANSIT_BIKE", - "TRANSIT_SCOOTER", - "TRANSIT_CAR", - "EDUCATION_SCHOOL", - "EDUCATION_COLLEGE", - "EDUCATION_UNIVERSITY", - "HEALTHCARE_HOSPITAL", - "HEALTH_SANATORIUM", - "ADMINISTRATION_TOWNHALL", - "TOURISM_WORSHIP", - "TOURISM_ATTRACTION", - "TOURISM_ARTWORK", - "TOURISM_AQUARIUM", - "TOURISM_ZOO", - "TOURISM_MUSEUM", - "TOURISM_GALLERY", - "TOURISM_THEME_PARK", - "TOURISM_VIEWPOINT", - "TOURISM_PICNIC_SITE", - "TOURISM_ALPINE_HUT", - "TOURISM_INFORMATION", - "TOURISM_HOTEL", - "TOURISM_MOTEL", - "TOURISM_HOSTEL", - "TOURISM_APARTMENT", - "TOURISM_CHALET", - "TOURISM_GUEST_HOUSE", - "TOURISM_CAMP_SITE", - "TOURISM_CARAVAN_SITE", - "CITY_CITY", - "CITY_TOWN", - "CITY_VILLAGE", - "CITY_HAMLET", - "CITY_DWELLING", - "STREET_MOTORWAY", - "STREET_MOTORWAY_LINK", - "STREET_TRUNK", - "STREET_TRUNK_LINK", - "STREET_PRIMARY", - "STREET_PRIMARY_LINK", - "STREET_SECONDARY", - "STREET_SECONDARY_LINK", - "STREET_TERTIARY", - "STREET_TERTIARY_LINK", - "STREET_RESIDENTIAL", - "STREET_LIVING_STREET", - "STREET_SERVICE", - "STREET_TRACK", - "STREET_PEDESTRIAN", - "STREET_SQUARE", - "COUNTY_COUNTY", - "COUNTY_DISTRICT", - "COUNTY_REGION", - "COUNTY_PROVINCE", - "COUNTY_ISLAND", - "COUNTY_POSTAL", - "CHARGING_REGULAR", - "CHARGING_QUICK", - "CHARGING_DC_CHADEMO", - "CHARGING_DC_COMBO", - "CHARGING_AC_TYPE2", - "CHARGING_AC_SCHUKO" - ] - } - } - }, - { - "name": "limit", - "in": "query", - "description": "The maximum number of locations to return.", - "schema": { - "type": "integer", - "format": "int32", - "default": 3 - } - }, - { - "name": "location", - "in": "query", - "description": "The user location specified as a coordinate (latitude,longitude) used as context for the name resolution.", - "schema": { - "type": "string" - }, - "example": "50.689782,7.159647" - }, - { - "name": "uid", - "in": "query", - "description": "The globally unique user identifier which should be a UUID (if provided).", - "schema": { - "type": "string" - }, - "example": "003b90ec-96cb-4262-ab90-49c966f4913b" - } - ], - "responses": { - "200": { - "description": "Locations retrieved successfully.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Location" - } - } - }, - "application/xml": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Location" - } - } - } - } - }, - "400": { - "description": "Bad request parameters." - } - } - } - }, - "/direction": { - "get": { - "tags": [ - "Carta", - "Map" - ], - "summary": "Computes directions for reaching a destination from an origin.", - "operationId": "getDirection", - "parameters": [ - { - "name": "arrival_time", - "in": "query", - "description": "The desired arrival time in epoch seconds (from midnight January 1, 1970 UTC).", - "schema": { - "type": "integer", - "format": "int64" - }, - "example": 1478680000 - }, - { - "name": "departure_time", - "in": "query", - "description": "The desired departure time in epoch seconds (from midnight January 1, 1970 UTC). Set to now, if neither arrival nor departure time is specified.", - "schema": { - "type": "integer", - "format": "int64" - }, - "example": 1478680000 - }, - { - "name": "alternatives", - "in": "query", - "description": "The maximum number of alternative routes to compute.", - "schema": { - "type": "integer", - "format": "int32", - "default": 3 - }, - "example": 5 - }, - { - "name": "origin", - "in": "query", - "description": "The origin of the route as name, coordinate (latitude,longitude) or coordinate with level (latitude,longitude,level).", - "required": true, - "schema": { - "type": "string" - }, - "example": "Bonn, Germany" - }, - { - "name": "destination", - "in": "query", - "description": "The destination of the route as name, coordinate (latitude,longitude) or coordinate with level (latitude,longitude,level).", - "required": true, - "schema": { - "type": "string" - }, - "example": "50.689782,7.159647,0" - }, - { - "name": "mode", - "in": "query", - "description": "The movement modality type of the routes to compute.", - "required": true, - "schema": { - "type": "string" - }, - "example": "walking" - }, - { - "name": "walking_speed", - "in": "query", - "description": "The walking speed (in meters per second) to compute the duration of walking steps.", - "schema": { - "type": "number", - "format": "double", - "default": 1.4 - }, - "example": 2.0 - }, - { - "name": "transfer_time", - "in": "query", - "description": "The time period (in seconds) to introduce for transfers between vehicles in transit steps.", - "schema": { - "type": "integer", - "format": "int32", - "default": 120 - }, - "example": 180 - }, - { - "name": "accessible", - "in": "query", - "description": "A flag to indicate that the routing should consider restrictions for persons with wheelchairs.", - "schema": { - "type": "boolean", - "default": false - }, - "example": true - }, - { - "name": "parking", - "in": "query", - "description": "A flag to indicate that a driving route should include a parking steop nearby the destination with a walking step to the final destination.", - "schema": { - "type": "boolean", - "default": false - }, - "example": true - }, - { - "name": "type", - "in": "query", - "description": "A list of vehicle types used during transit routing specified as a comma-separated list (0=tram, 1=subway, 2=rail, 3=bus, 4=ferry, 5=cablecar, 6=gondola, 7=funicular, 8=trolleybus, 9=monorail).", - "schema": { - "type": "string" - }, - "example": "1,2,3" - }, - { - "name": "range", - "in": "query", - "description": "The time range in seconds for range raptor.", - "schema": { - "type": "integer", - "format": "int32", - "default": 5400 - }, - "example": 3600 - }, - { - "name": "location", - "in": "query", - "description": "The user location specified as a coordinate (latitude,longitude) used as context for the name resolution.", - "schema": { - "type": "string" - }, - "example": "50.689782,7.159647" - }, - { - "name": "uid", - "in": "query", - "description": "The globally unique user identifier which should be a UUID (if provided).", - "schema": { - "type": "string" - }, - "example": "003b90ec-96cb-4262-ab90-49c966f4913b" - } - ], - "responses": { - "200": { - "description": "Directions computed successfully.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Direction" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/Direction" - } - } - } - }, - "400": { - "description": "Bad request parameters." - } - } - } - }, - "/network/line/{provider}": { - "get": { - "tags": [ - "Carta", - "Map" - ], - "summary": "Returns the network lines for a stop id.", - "operationId": "getLines", - "parameters": [ - { - "name": "provider", - "in": "path", - "description": "Sets the identifier of the network provider.", - "required": true, - "schema": { - "pattern": ".*", - "type": "string" - }, - "example": "transitemt" - }, - { - "name": "stop", - "in": "query", - "description": "The stop id of the stop to retrieve.", - "required": true, - "schema": { - "type": "string" - }, - "example": 1234 - } - ], - "responses": { - "200": { - "description": "Lines retrieved successfully.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NetworkLine" - } - } - }, - "application/xml": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NetworkLine" - } - } - } - } - } - } - } - }, - "/network/schedule/{provider}": { - "get": { - "tags": [ - "Carta", - "Map" - ], - "summary": "Returns the stop schedule for a stop id.", - "operationId": "getSchedule", - "parameters": [ - { - "name": "provider", - "in": "path", - "description": "Sets the identifier of the network provider.", - "required": true, - "schema": { - "pattern": ".*", - "type": "string" - }, - "example": "transitemt" - }, - { - "name": "stop", - "in": "query", - "description": "The stop id of the stop to retrieve.", - "required": true, - "schema": { - "type": "string" - }, - "example": 1234 - }, - { - "name": "date", - "in": "query", - "description": "The date specified as YYYYMMDD.", - "required": true, - "schema": { - "type": "string" - }, - "example": 20150131 - }, - { - "name": "location", - "in": "query", - "description": "The user location specified as a coordinate (latitude,longitude) used as context for the name resolution.", - "schema": { - "type": "string" - }, - "example": "50.689782,7.159647" - }, - { - "name": "uid", - "in": "query", - "description": "The globally unique user identifier which should be a UUID (if provided).", - "schema": { - "type": "string" - }, - "example": "003b90ec-96cb-4262-ab90-49c966f4913b" - } - ], - "responses": { - "200": { - "description": "Stops retrieved successfully.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StopSchedule" - } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/StopSchedule" - } - } - } - } - } - } - }, - "/network/stop/{provider}": { - "get": { - "tags": [ - "Carta", - "Map" - ], - "summary": "Returns the network stops around a partciular position.", - "operationId": "getStops", - "parameters": [ - { - "name": "provider", - "in": "path", - "description": "Legacy parameter that restricts the search to a single repository.", - "required": true, - "schema": { - "pattern": ".*", - "type": "string" - }, - "example": "transitemt" - }, - { - "name": "q", - "in": "query", - "description": "A coordinate to retrieve the nearest stops defined as a WGS84 latitude,longitude.", - "required": true, - "schema": { - "type": "string" - }, - "example": "50.689782,7.159647" - }, - { - "name": "limit", - "in": "query", - "description": "The maximum number of results to return.", - "schema": { - "type": "integer", - "format": "int32", - "default": 3 - } - } - ], - "responses": { - "200": { - "description": "Stops retrieved successfully.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NetworkStop" - } - } - }, - "application/xml": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NetworkStop" - } - } - } - } - } - } - } - }, - "/parking": { - "get": { - "tags": [ - "Carta", - "Map" - ], - "summary": "Returns the parkings for a particular query.", - "operationId": "getParkings", - "parameters": [ - { - "name": "q", - "in": "query", - "description": "The query to resolve (i.e. a name or a coordinate with latitude, longitude or a range of two coordinates).", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "in": "query", - "description": "The maximum number of locations to return.", - "schema": { - "type": "integer", - "format": "int32", - "default": 3 - } - } - ], - "responses": { - "200": { - "description": "Parkings retrieved successfully.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Parking" - } - } - }, - "application/xml": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Parking" - } - } - } - } - }, - "400": { - "description": "Invalid request parameters." - } - } - } - }, - "/tile/{z}/{x}/{y}.jpg": { - "get": { - "tags": [ - "Carta", - "Tile" - ], - "summary": "Returns a jpg for the x and y coordinate at the specified zoom level z.", - "operationId": "getDefaultJpegTile", - "parameters": [ - { - "name": "x", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "y", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "z", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "cache", - "in": "query", - "schema": { - "type": "string", - "default": "enable" - } - }, - { - "name": "debug", - "in": "query", - "schema": { - "type": "string", - "default": "disable" - } - }, - { - "name": "lang", - "in": "query", - "schema": { - "type": "string", - "default": "default" - } - } - ], - "responses": { - "200": { - "description": "Image retrieved successfully.", - "content": { - "image/jpeg ": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/tile/{z}/{x}/{y}.png": { - "get": { - "tags": [ - "Carta", - "Tile" - ], - "summary": "Returns a png for the x and y coordinate at the specified zoom level z.", - "operationId": "getDefaultPngTile", - "parameters": [ - { - "name": "x", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "y", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "z", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "cache", - "in": "query", - "schema": { - "type": "string", - "default": "enable" - } - }, - { - "name": "debug", - "in": "query", - "schema": { - "type": "string", - "default": "disable" - } - }, - { - "name": "lang", - "in": "query", - "schema": { - "type": "string", - "default": "default" - } - } - ], - "responses": { - "200": { - "description": "Image retrieved successfully.", - "content": { - "image/png ": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/tile/{setup}/{z}/{x}/{y}.jpg": { - "get": { - "tags": [ - "Carta", - "Tile" - ], - "summary": "Returns a jpg rendered with the specified setup for the x and y coordinate at the specified zoom level z.", - "operationId": "getJpegTile", - "parameters": [ - { - "name": "setup", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "x", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "y", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "z", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "cache", - "in": "query", - "schema": { - "type": "string", - "default": "enable" - } - }, - { - "name": "debug", - "in": "query", - "schema": { - "type": "string", - "default": "disable" - } - }, - { - "name": "lang", - "in": "query", - "schema": { - "type": "string", - "default": "default" - } - } - ], - "responses": { - "200": { - "description": "Image retrieved successfully.", - "content": { - "image/jpeg ": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/tile/{setup}/{z}/{x}/{y}.png": { - "get": { - "tags": [ - "Carta", - "Tile" - ], - "summary": "Returns a png rendered with the specified setup for the x and y coordinate at the specified zoom level z.", - "operationId": "getPngTile", - "parameters": [ - { - "name": "setup", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "x", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "y", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "z", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "cache", - "in": "query", - "schema": { - "type": "string", - "default": "enable" - } - }, - { - "name": "debug", - "in": "query", - "schema": { - "type": "string", - "default": "disable" - } - }, - { - "name": "lang", - "in": "query", - "schema": { - "type": "string", - "default": "default" - } - } - ], - "responses": { - "200": { - "description": "Image retrieved successfully.", - "content": { - "image/png ": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/tile/{z}/{x}/{y}.geojson": { - "get": { - "tags": [ - "Carta", - "Tile" - ], - "summary": "Retrieves the vector data for a particular x, y tile at a specific zoom level z.", - "operationId": "getFeatures", - "parameters": [ - { - "name": "x", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "y", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "z", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "precision", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "default": -1 - } - }, - { - "name": "rings", - "in": "query", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "name": "filterId", - "in": "query", - "schema": { - "type": "string", - "default": "0" - } - } - ], - "responses": { - "200": { - "description": "Features retrieved successfully.", - "content": { - "application/geo+json": { - "schema": { - "$ref": "#/components/schemas/FeatureCollection" - } - } - } - }, - "400": { - "description": "Bad request parameters." - } - } - } - }, - "/tile/{z}/{x}/{y}.bin": { - "get": { - "tags": [ - "Carta", - "Tile" - ], - "summary": "Retrieves the vector data for the map tile x/y at zoom level z in a compact, binary format.", - "operationId": "getBinaryVectorTile", - "parameters": [ - { - "name": "x", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "y", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "z", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "filterId", - "in": "query", - "schema": { - "type": "string", - "default": "0" - } - }, - { - "name": "clipping", - "in": "query", - "schema": { - "type": "string", - "default": "yes" - } - }, - { - "name": "zoomOffset", - "in": "query", - "schema": { - "type": "string", - "default": "0" - } - } - ], - "responses": { - "200": { - "description": "Tile retrieved successfully.", - "content": { - "application/octet-stream": { - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "Bad request parameters." - } - } - } - }, - "/tile/{z}/{x}/{y}.json": { - "get": { - "tags": [ - "Carta", - "Tile" - ], - "summary": "Retrieves the vector data for the map tile x/y at zoom level z as a GeoJSON feature collection.", - "operationId": "getGeoJsonVectorTile", - "parameters": [ - { - "name": "x", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "y", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "z", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "filterId", - "in": "query", - "schema": { - "type": "string", - "default": "0" - } - }, - { - "name": "clipping", - "in": "query", - "schema": { - "type": "string", - "default": "yes" - } - }, - { - "name": "zoomOffset", - "in": "query", - "schema": { - "type": "string", - "default": "0" - } - } - ], - "responses": { - "200": { - "description": "Tile retrieved successfully.", - "content": { - "application/geo+json": { - "schema": { - "$ref": "#/components/schemas/FeatureCollection" - } - } - } - }, - "400": { - "description": "Bad request parameters." - } - } - } - } - }, - "components": { - "schemas": { - "Crs": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "name", - "link" - ] - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "object" - } - } - } - }, - "Feature": { - "type": "object", - "properties": { - "crs": { - "$ref": "#/components/schemas/Crs" - }, - "bbox": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - }, - "properties": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "geometry": { - "$ref": "#/components/schemas/GeoJsonObject" - }, - "id": { - "type": "string" - } - } - }, - "FeatureCollection": { - "type": "object", - "properties": { - "crs": { - "$ref": "#/components/schemas/Crs" - }, - "bbox": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - }, - "features": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Feature" - } - } - } - }, - "GeoJsonObject": { - "required": [ - "type" - ], - "type": "object", - "properties": { - "crs": { - "$ref": "#/components/schemas/Crs" - }, - "bbox": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - }, - "type": { - "type": "string" - } - }, - "discriminator": { - "propertyName": "type" - } - }, - "GeometryCollection": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/GeoJsonObject" - }, - { - "type": "object", - "properties": { - "geometries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GeoJsonObject" - } - } - } - } - ] - }, - "LineString": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/GeoJsonObject" - }, - { - "type": "object", - "properties": { - "coordinates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LngLatAlt" - } - } - } - } - ] - }, - "LngLatAlt": { - "type": "object", - "properties": { - "longitude": { - "type": "number", - "format": "double" - }, - "latitude": { - "type": "number", - "format": "double" - }, - "altitude": { - "type": "number", - "format": "double" - }, - "additionalElements": { - "type": "array", - "items": { - "type": "number", - "format": "double" - } - } - } - }, - "MultiLineString": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/GeoJsonObject" - }, - { - "type": "object", - "properties": { - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LngLatAlt" - } - } - } - } - } - ] - }, - "MultiPoint": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/GeoJsonObject" - }, - { - "type": "object", - "properties": { - "coordinates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LngLatAlt" - } - } - } - } - ] - }, - "MultiPolygon": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/GeoJsonObject" - }, - { - "type": "object", - "properties": { - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LngLatAlt" - } - } - } - } - } - } - ] - }, - "Point": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/GeoJsonObject" - }, - { - "type": "object", - "properties": { - "coordinates": { - "$ref": "#/components/schemas/LngLatAlt" - } - } - } - ] - }, - "Polygon": { - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/GeoJsonObject" - }, - { - "type": "object", - "properties": { - "coordinates": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LngLatAlt" - } - } - } - } - } - ] - }, - "Coordinate": { - "required": [ - "latitude", - "longitude" - ], - "type": "object", - "properties": { - "longitude": { - "type": "number", - "description": "The longitude in WGS84 degrees.", - "format": "double", - "xml": { - "attribute": true - } - }, - "latitude": { - "type": "number", - "description": "The latitude in WGS84 degrees.", - "format": "double", - "xml": { - "attribute": true - } - } - }, - "description": "Represents a WGS84 coordinate with longitude and latitude." - }, - "LevelCoordinate": { - "required": [ - "latitude", - "level", - "longitude" - ], - "type": "object", - "description": "Represents a coordinate on a level.", - "allOf": [ - { - "$ref": "#/components/schemas/Coordinate" - }, - { - "type": "object", - "properties": { - "longitude": { - "type": "number", - "description": "The longitude in WGS84 degrees.", - "format": "double", - "xml": { - "attribute": true - } - }, - "latitude": { - "type": "number", - "description": "The latitude in WGS84 degrees.", - "format": "double", - "xml": { - "attribute": true - } - }, - "level": { - "type": "integer", - "description": "The level of the coordinate (0=ground level, +=above ground, -=below ground)", - "format": "int32", - "xml": { - "attribute": true - } - } - } - } - ] - }, - "Location": { - "required": [ - "id", - "latitude", - "level", - "longitude", - "subtypes", - "type" - ], - "type": "object", - "description": "Represents an address or place at a particular location.", - "allOf": [ - { - "$ref": "#/components/schemas/LevelCoordinate" - }, - { - "type": "object", - "properties": { - "longitude": { - "type": "number", - "description": "The longitude in WGS84 degrees.", - "format": "double", - "xml": { - "attribute": true - } - }, - "latitude": { - "type": "number", - "description": "The latitude in WGS84 degrees.", - "format": "double", - "xml": { - "attribute": true - } - }, - "level": { - "type": "integer", - "description": "The level of the coordinate (0=ground level, +=above ground, -=below ground)", - "format": "int32", - "xml": { - "attribute": true - } - }, - "type": { - "type": "string", - "description": "The type of the address.", - "xml": { - "attribute": true - }, - "enum": [ - "COUNTRY", - "STATE", - "COUNTY", - "CITY", - "SUBURB", - "NEIGHBORHOOD", - "LOCALITY", - "STREET", - "BUILDING", - "TRANSIT", - "PARKING", - "ADMINISTRATION", - "EDUCATION", - "HEALTHCARE", - "TOURISM", - "INDOOR", - "CHARGING" - ] - }, - "id": { - "type": "string", - "description": "A unique id for this location.", - "xml": { - "attribute": true - } - }, - "subtypes": { - "type": "array", - "description": "The subtype of the address.", - "items": { - "type": "string", - "description": "The subtype of the address.", - "enum": [ - "INDOOR_DOORWAY", - "INDOOR_ELEVATOR", - "INDOOR_ESCALATOR", - "INDOOR_RAMP", - "INDOOR_STAIRS", - "INDOOR_RESTROOM", - "INDOOR_INFORMATION", - "INDOOR_CHECKPOINT", - "LEVEL_SAME", - "LEVEL_UP", - "LEVEL_DOWN", - "LEVEL_UPDOWN", - "LIMIT_MEN", - "LIMIT_WOMEN", - "LIMIT_UNISEX", - "PASS_IN", - "PASS_OUT", - "PASS_INOUT", - "TRANSIT_STATION", - "TRANSIT_GROUP", - "TRANSIT_TRAM", - "TRANSIT_METRO", - "TRANSIT_RAIL", - "TRANSIT_BUS", - "TRANSIT_FERRY", - "TRANSIT_CABLECAR", - "TRANSIT_GONDOLA", - "TRANSIT_FUNICULAR", - "TRANSIT_TROLLEYBUS", - "TRANSIT_MONORAIL", - "TRANSIT_BIKE", - "TRANSIT_SCOOTER", - "TRANSIT_CAR", - "EDUCATION_SCHOOL", - "EDUCATION_COLLEGE", - "EDUCATION_UNIVERSITY", - "HEALTHCARE_HOSPITAL", - "HEALTH_SANATORIUM", - "ADMINISTRATION_TOWNHALL", - "TOURISM_WORSHIP", - "TOURISM_ATTRACTION", - "TOURISM_ARTWORK", - "TOURISM_AQUARIUM", - "TOURISM_ZOO", - "TOURISM_MUSEUM", - "TOURISM_GALLERY", - "TOURISM_THEME_PARK", - "TOURISM_VIEWPOINT", - "TOURISM_PICNIC_SITE", - "TOURISM_ALPINE_HUT", - "TOURISM_INFORMATION", - "TOURISM_HOTEL", - "TOURISM_MOTEL", - "TOURISM_HOSTEL", - "TOURISM_APARTMENT", - "TOURISM_CHALET", - "TOURISM_GUEST_HOUSE", - "TOURISM_CAMP_SITE", - "TOURISM_CARAVAN_SITE", - "CITY_CITY", - "CITY_TOWN", - "CITY_VILLAGE", - "CITY_HAMLET", - "CITY_DWELLING", - "STREET_MOTORWAY", - "STREET_MOTORWAY_LINK", - "STREET_TRUNK", - "STREET_TRUNK_LINK", - "STREET_PRIMARY", - "STREET_PRIMARY_LINK", - "STREET_SECONDARY", - "STREET_SECONDARY_LINK", - "STREET_TERTIARY", - "STREET_TERTIARY_LINK", - "STREET_RESIDENTIAL", - "STREET_LIVING_STREET", - "STREET_SERVICE", - "STREET_TRACK", - "STREET_PEDESTRIAN", - "STREET_SQUARE", - "COUNTY_COUNTY", - "COUNTY_DISTRICT", - "COUNTY_REGION", - "COUNTY_PROVINCE", - "COUNTY_ISLAND", - "COUNTY_POSTAL", - "CHARGING_REGULAR", - "CHARGING_QUICK", - "CHARGING_DC_CHADEMO", - "CHARGING_DC_COMBO", - "CHARGING_AC_TYPE2", - "CHARGING_AC_SCHUKO" - ] - } - }, - "country": { - "type": "string", - "description": "The enclosing country.", - "xml": { - "attribute": true - } - }, - "state": { - "type": "string", - "description": "The enclosing state.", - "xml": { - "attribute": true - } - }, - "county": { - "type": "string", - "description": "The enclosing region.", - "xml": { - "attribute": true - } - }, - "city": { - "type": "string", - "description": "The city name.", - "xml": { - "attribute": true - } - }, - "suburb": { - "type": "string", - "description": "The enclosing suburb.", - "xml": { - "attribute": true - } - }, - "neighborhood": { - "type": "string", - "description": "The enclosing neighborhood.", - "xml": { - "attribute": true - } - }, - "locality": { - "type": "string", - "description": "The enclosing locality.", - "xml": { - "attribute": true - } - }, - "street": { - "type": "string", - "description": "The street.", - "xml": { - "attribute": true - } - }, - "building": { - "type": "string", - "description": "The building number.", - "xml": { - "attribute": true - } - }, - "postcode": { - "type": "string", - "description": "The post code.", - "xml": { - "attribute": true - } - }, - "name": { - "type": "string", - "description": "The name of the place.", - "xml": { - "attribute": true - } - }, - "links": { - "type": "object", - "additionalProperties": { - "type": "string", - "description": "The links to external sytems." - }, - "description": "The links to external sytems." - } - } - } - ] - }, - "AbstractStop": { - "required": [ - "id", - "latitude", - "level", - "longitude", - "name", - "provider" - ], - "type": "object", - "description": "Represents a stop in the transit network.", - "allOf": [ - { - "$ref": "#/components/schemas/LevelCoordinate" - }, - { - "type": "object", - "properties": { - "longitude": { - "type": "number", - "description": "The longitude in WGS84 degrees.", - "format": "double", - "xml": { - "attribute": true - } - }, - "latitude": { - "type": "number", - "description": "The latitude in WGS84 degrees.", - "format": "double", - "xml": { - "attribute": true - } - }, - "level": { - "type": "integer", - "description": "The level of the coordinate (0=ground level, +=above ground, -=below ground)", - "format": "int32", - "xml": { - "attribute": true - } - }, - "provider": { - "type": "string", - "description": "The provider of the stop.", - "xml": { - "attribute": true - } - }, - "id": { - "type": "string", - "description": "The internal id of the stop.", - "xml": { - "attribute": true - } - }, - "code": { - "type": "string", - "description": "The optional code of the stop.", - "xml": { - "attribute": true - } - }, - "name": { - "type": "string", - "description": "The name of the stop.", - "xml": { - "attribute": true - } - } - } - } - ] - }, - "CyclingStep": { - "required": [ - "distance", - "startTime", - "stopTime", - "type" - ], - "type": "object", - "description": "A step to be taken by bicycle.", - "allOf": [ - { - "$ref": "#/components/schemas/StreetStep" - } - ], - "properties": { - "type": { - "type": "string" - }, - "coordinates": { - "type": "string", - "description": "A sequence of coordinates as string encoded polyline.", - "xml": { - "attribute": true - } - }, - "segments": { - "type": "array", - "description": "The street segments to follow.", - "xml": { - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/StreetSegment" - } - } - } - }, - "Direction": { - "type": "object", - "properties": { - "routes": { - "type": "array", - "description": "A sequence of alternative routes.", - "xml": { - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/Route" - } - } - }, - "description": "Represents a response to a route request." - }, - "DrivingStep": { - "required": [ - "distance", - "startTime", - "stopTime", - "type" - ], - "type": "object", - "description": "A step to be taken by car.", - "allOf": [ - { - "$ref": "#/components/schemas/StreetStep" - } - ], - "properties": { - "type": { - "type": "string" - } - } - }, - "Emission": { - "type": "object", - "properties": { - "carbonDioxide": { - "type": "number", - "description": "Carbon dioxide emissions in g.", - "format": "double", - "xml": { - "attribute": true - } - }, - "carbonMonoxide": { - "type": "number", - "description": "Carbon monoxide emissions in g.", - "format": "double", - "xml": { - "attribute": true - } - }, - "hydroCarbons": { - "type": "number", - "description": "Hydro carbons emissions in g.", - "format": "double", - "xml": { - "attribute": true - } - }, - "nitrogenOxides": { - "type": "number", - "description": "Nitrogen oxides emissions in g.", - "format": "double", - "xml": { - "attribute": true - } - }, - "particles": { - "type": "number", - "description": "Particles in g.", - "format": "double", - "xml": { - "attribute": true - } - } - }, - "description": "Represents the pollutant emissions of a route." - }, - "IndoorSegment": { - "required": [ - "distance", - "duration", - "endLevel", - "exit", - "startLevel", - "turn", - "type" - ], - "type": "object", - "description": "A particular way segment in an indoor environment.", - "allOf": [ - { - "$ref": "#/components/schemas/Segment" - }, - { - "type": "object", - "properties": { - "coordinates": { - "type": "string", - "description": "A sequence of coordinates as string encoded polyline.", - "xml": { - "attribute": true - } - }, - "duration": { - "type": "integer", - "description": "The duration in seconds.", - "format": "int32", - "xml": { - "attribute": true - } - }, - "distance": { - "type": "number", - "description": "The distance traveled by this segment in meters.", - "format": "double", - "xml": { - "attribute": true - } - }, - "type": { - "type": "string", - "description": "Represents the type of the street.", - "xml": { - "attribute": true - }, - "enum": [ - "OTHER", - "MOTORWAY", - "TRUNK", - "PRIMARY", - "SECONDARY", - "TERTIARY", - "UNCLASSIFIED", - "RESIDENTIAL", - "SERVICE", - "MOTORWAY_LINK", - "TRUNK_LINK", - "PRIMARY_LINK", - "SECONDARY_LINK", - "TERTIARY_LINK", - "LIVING_STREET", - "PEDESTRIAN", - "TRACK", - "FOOTWAY", - "CYCLEWAY", - "BRIDLEWAY", - "STEPS", - "PATH" - ] - }, - "turn": { - "type": "string", - "description": "Represents the type of turn to be made.", - "xml": { - "attribute": true - }, - "enum": [ - "CONTINUE", - "KEEP_LEFT", - "SLIGHT_LEFT", - "TURN_LEFT", - "SHARP_LEFT", - "KEEP_RIGHT", - "SLIGHT_RIGHT", - "TURN_RIGHT", - "SHARP_RIGHT", - "U_TURN", - "ROUND_ABOUT" - ] - }, - "exit": { - "type": "integer", - "description": "The exit number for round abouts or 0, if the type is not roundabout.", - "format": "int32", - "xml": { - "attribute": true - } - }, - "startLevel": { - "type": "integer", - "description": "The level of the segment.", - "format": "int32", - "xml": { - "attribute": true - } - }, - "endLevel": { - "type": "integer", - "description": "The end level of the segment.", - "format": "int32", - "xml": { - "attribute": true - } - }, - "zoneName": { - "type": "string", - "description": "The name of the zone through which the segment runs.", - "xml": { - "attribute": true - } - }, - "summaries": { - "type": "array", - "description": "Optional textual summary of the segment which jointly describe the step.", - "xml": { - "wrapped": true - }, - "items": { - "type": "string", - "description": "Optional textual summary of the segment which jointly describe the step.", - "xml": { - "name": "summary" - } - } - }, - "notifications": { - "type": "array", - "description": "Optional textual notifications to be shown during the segment.", - "xml": { - "wrapped": true - }, - "items": { - "type": "string", - "description": "Optional textual notifications to be shown during the segment.", - "xml": { - "name": "notification" - } - } - } - } - } - ] - }, - "IndoorStep": { - "required": [ - "distance", - "startTime", - "stopTime", - "type" - ], - "type": "object", - "description": "Represents a step to be taken in a building.", - "allOf": [ - { - "$ref": "#/components/schemas/Step" - }, - { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "segments": { - "type": "array", - "description": "The segments of the step.", - "xml": { - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/IndoorSegment" - } - } - } - } - ] - }, - "Line": { - "required": [ - "code", - "direction", - "headsign", - "name", - "provider", - "type" - ], - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "The short code of the line.", - "xml": { - "attribute": true - } - }, - "name": { - "type": "string", - "description": "The name of the line.", - "xml": { - "attribute": true - } - }, - "type": { - "type": "string", - "description": "Represents a line type of a public transit line.", - "xml": { - "attribute": true - }, - "enum": [ - "TRAM", - "METRO", - "RAIL", - "BUS", - "FERRY", - "CABLECAR", - "GONDOLA", - "FUNICULAR", - "TROLLEYBUS", - "MONORAIL", - "BIKE", - "CAR" - ] - }, - "direction": { - "type": "integer", - "description": "The direction of the line.", - "format": "int32", - "xml": { - "attribute": true - } - }, - "headsign": { - "type": "string", - "description": "The headsign of the line.", - "xml": { - "attribute": true - } - }, - "color": { - "type": "string", - "description": "The line color to be used as ARGB hex string.", - "xml": { - "attribute": true - } - }, - "agency": { - "$ref": "#/components/schemas/TransitAgency" - }, - "provider": { - "type": "string", - "description": "The provider of the line.", - "xml": { - "attribute": true - } - } - }, - "description": "Represents information about a transit line." - }, - "LineStatus": { - "type": "object", - "properties": { - "scheduledDeparture": { - "$ref": "#/components/schemas/RouteDateTime" - }, - "expectedDeparture": { - "$ref": "#/components/schemas/RouteDateTime" - }, - "expectedPlatform": { - "type": "string", - "description": "The expected departure platform.", - "xml": { - "attribute": true - } - }, - "canceled": { - "type": "boolean", - "description": "A flag to indicate whether the trip is cancelled.", - "xml": { - "attribute": true - } - } - }, - "description": "Represents an upcoming departure with real-time updates." - }, - "Parking": { - "required": [ - "accessibility", - "free", - "latitude", - "longitude", - "side", - "time", - "total", - "type" - ], - "type": "object", - "description": "Represents a parking at a particular geographic coordinate.", - "allOf": [ - { - "$ref": "#/components/schemas/Coordinate" - }, - { - "type": "object", - "properties": { - "longitude": { - "type": "number", - "description": "The longitude in WGS84 degrees.", - "format": "double", - "xml": { - "attribute": true - } - }, - "latitude": { - "type": "number", - "description": "The latitude in WGS84 degrees.", - "format": "double", - "xml": { - "attribute": true - } - }, - "name": { - "type": "string", - "description": "The optional name of the parking.", - "xml": { - "attribute": true - } - }, - "type": { - "type": "string", - "description": "Represents the type of parking.", - "xml": { - "attribute": true - }, - "enum": [ - "STREET", - "BAY", - "LOT", - "GARAGE" - ] - }, - "side": { - "type": "string", - "description": "Represents the side on which the parking is located.", - "xml": { - "attribute": true - }, - "enum": [ - "NONE", - "LEFT", - "RIGHT" - ] - }, - "accessibility": { - "type": "string", - "description": "Represents the wheel chair accessiblity of the parking.", - "xml": { - "attribute": true - }, - "enum": [ - "UNKNOWN", - "NONE", - "PARTIALLY", - "FULLY" - ] - }, - "total": { - "type": "integer", - "description": "The total number of spaces at the location.", - "format": "int32", - "xml": { - "attribute": true - } - }, - "free": { - "type": "integer", - "description": "The number of free spaces at the location or -1 if not known.", - "format": "int32", - "xml": { - "attribute": true - } - }, - "time": { - "type": "integer", - "description": "The time of the last update of the free spaces information or -1, if the update time is not available or the free spaces are not determined.", - "format": "int64", - "xml": { - "attribute": true - } - }, - "code": { - "type": "string", - "description": "The provider-specific code of the parking place.", - "xml": { - "attribute": true - } - }, - "provider": { - "type": "string", - "description": "The provider of the parking place.", - "xml": { - "attribute": true - } - } - } - } - ] - }, - "ParkingStep": { - "required": [ - "distance", - "parking", - "startTime", - "stopTime" - ], - "type": "object", - "description": "A step to represent the parking of a car at a particular parking.", - "allOf": [ - { - "$ref": "#/components/schemas/Step" - }, - { - "type": "object", - "properties": { - "parking": { - "$ref": "#/components/schemas/Parking" - } - } - } - ] - }, - "Route": { - "required": [ - "distance", - "duration", - "sourceCoordinate", - "sourceLevel", - "targetCoordinate", - "targetLevel" - ], - "type": "object", - "properties": { - "sourceCoordinate": { - "$ref": "#/components/schemas/Coordinate" - }, - "targetCoordinate": { - "$ref": "#/components/schemas/Coordinate" - }, - "sourceLevel": { - "type": "integer", - "description": "The level of the source coordinate.", - "format": "int32" - }, - "targetLevel": { - "type": "integer", - "description": "The level of the target coordinate.", - "format": "int32", - "xml": { - "attribute": true - } - }, - "distance": { - "type": "number", - "description": "The total distance in meters.", - "format": "double", - "xml": { - "attribute": true - } - }, - "duration": { - "type": "integer", - "description": "The total trip duration in seconds.", - "format": "int32", - "xml": { - "attribute": true - } - }, - "emission": { - "$ref": "#/components/schemas/Emission" - }, - "steps": { - "type": "array", - "description": "The sequence of steps to take.", - "xml": { - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/Step" - } - } - }, - "description": "Represents a number of steps that lead from an origin to a destination." - }, - "RouteDateTime": { - "required": [ - "date", - "time" - ], - "type": "object", - "properties": { - "time": { - "type": "integer", - "description": "The time in seconds from midnight.", - "format": "int32", - "xml": { - "attribute": true - } - }, - "date": { - "type": "string", - "description": "The date provided as YYYYMMDD.", - "example": "20111231", - "xml": { - "attribute": true - } - } - }, - "description": "Represents a date and time." - }, - "ScooterStep": { - "required": [ - "distance", - "startTime", - "stopTime", - "type" - ], - "type": "object", - "description": "A step to be taken by e-scooter.", - "allOf": [ - { - "$ref": "#/components/schemas/StreetStep" - } - ], - "properties": { - "type": { - "type": "string" - } - } - }, - "Segment": { - "required": [ - "distance", - "duration", - "exit", - "turn", - "type" - ], - "type": "object", - "properties": { - "coordinates": { - "type": "string", - "description": "A sequence of coordinates as string encoded polyline.", - "xml": { - "attribute": true - } - }, - "duration": { - "type": "integer", - "description": "The duration in seconds.", - "format": "int32", - "xml": { - "attribute": true - } - }, - "distance": { - "type": "number", - "description": "The distance traveled by this segment in meters.", - "format": "double", - "xml": { - "attribute": true - } - }, - "type": { - "type": "string", - "description": "Represents the type of the street.", - "xml": { - "attribute": true - }, - "enum": [ - "OTHER", - "MOTORWAY", - "TRUNK", - "PRIMARY", - "SECONDARY", - "TERTIARY", - "UNCLASSIFIED", - "RESIDENTIAL", - "SERVICE", - "MOTORWAY_LINK", - "TRUNK_LINK", - "PRIMARY_LINK", - "SECONDARY_LINK", - "TERTIARY_LINK", - "LIVING_STREET", - "PEDESTRIAN", - "TRACK", - "FOOTWAY", - "CYCLEWAY", - "BRIDLEWAY", - "STEPS", - "PATH" - ] - }, - "turn": { - "type": "string", - "description": "Represents the type of turn to be made.", - "xml": { - "attribute": true - }, - "enum": [ - "CONTINUE", - "KEEP_LEFT", - "SLIGHT_LEFT", - "TURN_LEFT", - "SHARP_LEFT", - "KEEP_RIGHT", - "SLIGHT_RIGHT", - "TURN_RIGHT", - "SHARP_RIGHT", - "U_TURN", - "ROUND_ABOUT" - ] - }, - "exit": { - "type": "integer", - "description": "The exit number for round abouts or 0, if the type is not roundabout.", - "format": "int32", - "xml": { - "attribute": true - } - }, - "summaries": { - "type": "array", - "description": "Optional textual summary of the segment which jointly describe the step.", - "xml": { - "wrapped": true - }, - "items": { - "type": "string", - "description": "Optional textual summary of the segment which jointly describe the step.", - "xml": { - "name": "summary" - } - } - } - }, - "description": "Represents a common base class for segments in steps." - }, - "Step": { - "required": [ - "distance", - "startTime", - "stopTime", - "type" - ], - "type": "object", - "properties": { - "coordinates": { - "type": "string", - "description": "A sequence of coordinates as string encoded polyline.", - "xml": { - "attribute": true - } - }, - "startTime": { - "type": "integer", - "description": "The start time in seconds from midnight.", - "format": "int32", - "xml": { - "attribute": true - } - }, - "stopTime": { - "type": "integer", - "description": "The stop time in seconds from midnight.", - "format": "int32", - "xml": { - "attribute": true - } - }, - "distance": { - "type": "number", - "description": "The distance traveled by this step in meters.", - "format": "double", - "xml": { - "attribute": true - } - }, - "summaries": { - "type": "array", - "description": "Optional textual summary of the step.", - "xml": { - "wrapped": true - }, - "items": { - "type": "string", - "description": "Optional textual summary of the step.", - "xml": { - "name": "summary" - } - } - }, - "type": { - "type": "string" - } - }, - "description": "The sequence of steps to take.", - "discriminator": { - "propertyName": "type", - "mapping": { - "TransitStep": "#/components/schemas/TransitStep", - "ParkingStep": "#/components/schemas/ParkingStep", - "IndoorStep": "#/components/schemas/IndoorStep", - "StreetStep": "#/components/schemas/StreetStep" - } - } - }, - "StreetSegment": { - "required": [ - "distance", - "duration", - "exit", - "turn", - "type" - ], - "type": "object", - "description": "A path on a particular road.", - "allOf": [ - { - "$ref": "#/components/schemas/Segment" - }, - { - "type": "object", - "properties": { - "coordinates": { - "type": "string", - "description": "A sequence of coordinates as string encoded polyline.", - "xml": { - "attribute": true - } - }, - "duration": { - "type": "integer", - "description": "The duration in seconds.", - "format": "int32", - "xml": { - "attribute": true - } - }, - "distance": { - "type": "number", - "description": "The distance traveled by this segment in meters.", - "format": "double", - "xml": { - "attribute": true - } - }, - "type": { - "type": "string", - "description": "Represents the type of the street.", - "xml": { - "attribute": true - }, - "enum": [ - "OTHER", - "MOTORWAY", - "TRUNK", - "PRIMARY", - "SECONDARY", - "TERTIARY", - "UNCLASSIFIED", - "RESIDENTIAL", - "SERVICE", - "MOTORWAY_LINK", - "TRUNK_LINK", - "PRIMARY_LINK", - "SECONDARY_LINK", - "TERTIARY_LINK", - "LIVING_STREET", - "PEDESTRIAN", - "TRACK", - "FOOTWAY", - "CYCLEWAY", - "BRIDLEWAY", - "STEPS", - "PATH" - ] - }, - "turn": { - "type": "string", - "description": "Represents the type of turn to be made.", - "xml": { - "attribute": true - }, - "enum": [ - "CONTINUE", - "KEEP_LEFT", - "SLIGHT_LEFT", - "TURN_LEFT", - "SHARP_LEFT", - "KEEP_RIGHT", - "SLIGHT_RIGHT", - "TURN_RIGHT", - "SHARP_RIGHT", - "U_TURN", - "ROUND_ABOUT" - ] - }, - "exit": { - "type": "integer", - "description": "The exit number for round abouts or 0, if the type is not roundabout.", - "format": "int32", - "xml": { - "attribute": true - } - }, - "road": { - "type": "string", - "description": "The name of the road.", - "xml": { - "attribute": true - } - }, - "summaries": { - "type": "array", - "description": "Optional textual summary of the segment which jointly describe the step.", - "xml": { - "wrapped": true - }, - "items": { - "type": "string", - "description": "Optional textual summary of the segment which jointly describe the step.", - "xml": { - "name": "summary" - } - } - } - } - } - ] - }, - "StreetStep": { - "required": [ - "distance", - "startTime", - "stopTime", - "type" - ], - "type": "object", - "properties": { - "type": { - "type": "string" - } - }, - "description": "Represents a step within a vehicle that runs on a particular road in which the user will enter with a particular turn.", - "discriminator": { - "propertyName": "type", - "mapping": { - "WalkingStep": "#/components/schemas/WalkingStep", - "DrivingStep": "#/components/schemas/DrivingStep", - "CyclingStep": "#/components/schemas/CyclingStep", - "ScooterStep": "#/components/schemas/ScooterStep" - } - }, - "allOf": [ - { - "$ref": "#/components/schemas/Step" - } - ] - }, - "TransitAgency": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the agency.", - "xml": { - "attribute": true - } - }, - "url": { - "type": "string", - "description": "An url to the agency.", - "xml": { - "attribute": true - } - } - }, - "description": "Represents a transport network operator." - }, - "TransitIncident": { - "required": [ - "cause", - "effect", - "translated" - ], - "type": "object", - "properties": { - "cause": { - "type": "string", - "description": "Represents the reason for an incident.", - "xml": { - "attribute": true - }, - "enum": [ - "UNKNOWN_CAUSE", - "OTHER_CAUSE", - "TECHNICAL_PROBLEM", - "STRIKE", - "DEMONSTRATION", - "ACCIDENT", - "HOLIDAY", - "WEATHER", - "MAINTENANCE", - "CONSTRUCTION", - "POLICE_ACTIVITY", - "MEDICAL_EMERGENCY", - "SOCIAL_CULTURAL_EVENT" - ] - }, - "effect": { - "type": "string", - "description": "Represents the effect of an incident.", - "xml": { - "attribute": true - }, - "enum": [ - "NO_SERVICE", - "REDUCED_SERVICE", - "SIGNIFICANT_DELAYS", - "DETOUR", - "ADDITIONAL_SERVICE", - "MODIFIED_SERVICE", - "OTHER_EFFECT", - "UNKNOWN_EFFECT", - "STOP_MOVED" - ] - }, - "title": { - "type": "string", - "description": "The title of the incident.", - "xml": { - "attribute": true - } - }, - "details": { - "type": "string", - "description": "The details on the incident.", - "xml": { - "attribute": true - } - }, - "hyperlink": { - "type": "string", - "description": "A hyperlink with more details.", - "xml": { - "attribute": true - } - }, - "translated": { - "type": "boolean", - "description": "A flag to indicate whether the incident is automatically translated.", - "xml": { - "attribute": true - } - } - }, - "description": "Represents an incident on a particular transit route or step." - }, - "TransitStep": { - "required": [ - "crowd", - "distance", - "line", - "startTime", - "stopTime" - ], - "type": "object", - "description": "Represents a step that is supposed to be taken by some form public transport.", - "allOf": [ - { - "$ref": "#/components/schemas/Step" - }, - { - "type": "object", - "properties": { - "line": { - "$ref": "#/components/schemas/Line" - }, - "id": { - "type": "string", - "description": "The internal trip identification.", - "xml": { - "attribute": true - } - }, - "crowd": { - "type": "string", - "description": "Represents the expected crowd level during a step.", - "xml": { - "attribute": true - }, - "enum": [ - "LEVEL_UNKNOWN", - "LEVEL_LOW", - "LEVEL_MEDIUM", - "LEVEL_HIGH" - ] - }, - "realTime": { - "$ref": "#/components/schemas/LineStatus" - }, - "stops": { - "type": "array", - "description": "The sequence of stops that the transit vehicle will pass through.", - "xml": { - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/TransitStop" - } - }, - "incidents": { - "type": "array", - "description": "A set of incidents that affect this step.", - "xml": { - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/TransitIncident" - } - } - } - } - ] - }, - "TransitStop": { - "required": [ - "arrivalTime", - "departureTime", - "id", - "latitude", - "level", - "longitude", - "name", - "provider" - ], - "type": "object", - "description": "Represents a transit stop with a particular timing in a transit step.", - "allOf": [ - { - "$ref": "#/components/schemas/AbstractStop" - }, - { - "type": "object", - "properties": { - "longitude": { - "type": "number", - "description": "The longitude in WGS84 degrees.", - "format": "double", - "xml": { - "attribute": true - } - }, - "latitude": { - "type": "number", - "description": "The latitude in WGS84 degrees.", - "format": "double", - "xml": { - "attribute": true - } - }, - "level": { - "type": "integer", - "description": "The level of the coordinate (0=ground level, +=above ground, -=below ground)", - "format": "int32", - "xml": { - "attribute": true - } - }, - "provider": { - "type": "string", - "description": "The provider of the stop.", - "xml": { - "attribute": true - } - }, - "id": { - "type": "string", - "description": "The internal id of the stop.", - "xml": { - "attribute": true - } - }, - "code": { - "type": "string", - "description": "The optional code of the stop.", - "xml": { - "attribute": true - } - }, - "name": { - "type": "string", - "description": "The name of the stop.", - "xml": { - "attribute": true - } - }, - "arrivalTime": { - "type": "integer", - "description": "The expected arrival time in seconds from midnight.", - "format": "int32", - "xml": { - "attribute": true - } - }, - "departureTime": { - "type": "integer", - "description": "The expected departure time in seconds from midnight.", - "format": "int32", - "xml": { - "attribute": true - } - } - } - } - ] - }, - "WalkingStep": { - "required": [ - "distance", - "startTime", - "stopTime" - ], - "type": "object", - "description": "A step to be taken on foot.", - "allOf": [ - { - "$ref": "#/components/schemas/StreetStep" - } - ] - }, - "NetworkLine": { - "required": [ - "code", - "direction", - "headsign", - "name", - "provider", - "type" - ], - "type": "object", - "description": "Represents information about a line in a transit network.", - "allOf": [ - { - "$ref": "#/components/schemas/Line" - }, - { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "The short code of the line.", - "xml": { - "attribute": true - } - }, - "name": { - "type": "string", - "description": "The name of the line.", - "xml": { - "attribute": true - } - }, - "type": { - "type": "string", - "description": "Represents a line type of a public transit line.", - "xml": { - "attribute": true - }, - "enum": [ - "TRAM", - "METRO", - "RAIL", - "BUS", - "FERRY", - "CABLECAR", - "GONDOLA", - "FUNICULAR", - "TROLLEYBUS", - "MONORAIL", - "BIKE", - "CAR" - ] - }, - "direction": { - "type": "integer", - "description": "The direction of the line.", - "format": "int32", - "xml": { - "attribute": true - } - }, - "headsign": { - "type": "string", - "description": "The headsign of the line.", - "xml": { - "attribute": true - } - }, - "color": { - "type": "string", - "description": "The line color to be used as ARGB hex string.", - "xml": { - "attribute": true - } - }, - "agency": { - "$ref": "#/components/schemas/TransitAgency" - }, - "provider": { - "type": "string", - "description": "The provider of the line.", - "xml": { - "attribute": true - } - }, - "shape": { - "type": "string", - "description": "A sequence of coordinates as string encoded polyline.", - "xml": { - "attribute": true - } - }, - "stops": { - "type": "array", - "description": "The sequence of stops from the start to the end of the line.", - "xml": { - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/NetworkStop" - } - } - } - } - ] - }, - "NetworkStop": { - "required": [ - "id", - "latitude", - "level", - "longitude", - "name", - "provider" - ], - "type": "object", - "description": "Represents a stop in a transit network.", - "allOf": [ - { - "$ref": "#/components/schemas/AbstractStop" - }, - { - "type": "object", - "properties": { - "longitude": { - "type": "number", - "description": "The longitude in WGS84 degrees.", - "format": "double", - "xml": { - "attribute": true - } - }, - "latitude": { - "type": "number", - "description": "The latitude in WGS84 degrees.", - "format": "double", - "xml": { - "attribute": true - } - }, - "level": { - "type": "integer", - "description": "The level of the coordinate (0=ground level, +=above ground, -=below ground)", - "format": "int32", - "xml": { - "attribute": true - } - }, - "provider": { - "type": "string", - "description": "The provider of the stop.", - "xml": { - "attribute": true - } - }, - "id": { - "type": "string", - "description": "The internal id of the stop.", - "xml": { - "attribute": true - } - }, - "code": { - "type": "string", - "description": "The optional code of the stop.", - "xml": { - "attribute": true - } - }, - "name": { - "type": "string", - "description": "The name of the stop.", - "xml": { - "attribute": true - } - }, - "lines": { - "type": "array", - "description": "The lines passing through the stop.", - "xml": { - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/NetworkLine" - } - } - } - } - ] - }, - "LineSchedule": { - "required": [ - "code", - "direction", - "headsign", - "name", - "provider", - "type" - ], - "type": "object", - "description": "Represents the schedule for a particular line on a stop.", - "allOf": [ - { - "$ref": "#/components/schemas/Line" - }, - { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "The short code of the line.", - "xml": { - "attribute": true - } - }, - "name": { - "type": "string", - "description": "The name of the line.", - "xml": { - "attribute": true - } - }, - "type": { - "type": "string", - "description": "Represents a line type of a public transit line.", - "xml": { - "attribute": true - }, - "enum": [ - "TRAM", - "METRO", - "RAIL", - "BUS", - "FERRY", - "CABLECAR", - "GONDOLA", - "FUNICULAR", - "TROLLEYBUS", - "MONORAIL", - "BIKE", - "CAR" - ] - }, - "direction": { - "type": "integer", - "description": "The direction of the line.", - "format": "int32", - "xml": { - "attribute": true - } - }, - "headsign": { - "type": "string", - "description": "The headsign of the line.", - "xml": { - "attribute": true - } - }, - "color": { - "type": "string", - "description": "The line color to be used as ARGB hex string.", - "xml": { - "attribute": true - } - }, - "agency": { - "$ref": "#/components/schemas/TransitAgency" - }, - "provider": { - "type": "string", - "description": "The provider of the line.", - "xml": { - "attribute": true - } - }, - "departures": { - "type": "array", - "description": "The planned departure times of the line at the stop.", - "xml": { - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/RouteDateTime" - } - }, - "etas": { - "type": "array", - "description": "The real-time arrival times of the line at the stop.", - "xml": { - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/LineStatus" - } - }, - "incidents": { - "type": "array", - "description": "The incidents that may affect the schedule of the line.", - "xml": { - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/TransitIncident" - } - } - } - } - ] - }, - "StopSchedule": { - "required": [ - "id", - "latitude", - "level", - "longitude", - "name", - "provider" - ], - "type": "object", - "description": "Represents a schedule for the lines going through a stop.", - "allOf": [ - { - "$ref": "#/components/schemas/AbstractStop" - }, - { - "type": "object", - "properties": { - "longitude": { - "type": "number", - "description": "The longitude in WGS84 degrees.", - "format": "double", - "xml": { - "attribute": true - } - }, - "latitude": { - "type": "number", - "description": "The latitude in WGS84 degrees.", - "format": "double", - "xml": { - "attribute": true - } - }, - "level": { - "type": "integer", - "description": "The level of the coordinate (0=ground level, +=above ground, -=below ground)", - "format": "int32", - "xml": { - "attribute": true - } - }, - "provider": { - "type": "string", - "description": "The provider of the stop.", - "xml": { - "attribute": true - } - }, - "id": { - "type": "string", - "description": "The internal id of the stop.", - "xml": { - "attribute": true - } - }, - "code": { - "type": "string", - "description": "The optional code of the stop.", - "xml": { - "attribute": true - } - }, - "name": { - "type": "string", - "description": "The name of the stop.", - "xml": { - "attribute": true - } - }, - "lines": { - "type": "array", - "description": "The schedules for lines stopping at the stop.", - "xml": { - "wrapped": true - }, - "items": { - "$ref": "#/components/schemas/LineSchedule" - } - } - } - } - ] - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/carta_fixed.json b/src/main/resources/carta_fixed.json new file mode 100644 index 0000000..8e354ea --- /dev/null +++ b/src/main/resources/carta_fixed.json @@ -0,0 +1,2775 @@ +{ + "openapi" : "3.0.0", + "info" : { + "title" : "LocosLab Carta Service", + "description" : "Locoslab Carta Service Api", + "termsOfService" : "https://www.locoslab.com", + "contact" : { + "name" : "LocosLab GmbH", + "url" : "https://www.locoslab.com", + "email" : "info@locoslab.com" + }, + "license" : { + "name" : "LocosLab License", + "url" : "https://www.locoslab.com" + }, + "version" : "1.0" + }, + "servers" : [ { + "url" : "/carta", + "description" : "LocosLab GmbH" + } ], + "paths" : { + "/location/{id}/geometry" : { + "get" : { + "tags" : [ "Carta", "Geo" ], + "summary" : "Returns the geometry for the location with the specified id.", + "operationId" : "getGeometry", + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "The location id to retrieve.", + "required" : true, + "schema" : { + "pattern" : "[a-zA-Z]+|.*", + "type" : "string" + } + }, { + "name" : "location", + "in" : "query", + "description" : "The user location specified as a coordinate (latitude,longitude) used as context for the name resolution.", + "schema" : { + "type" : "string" + }, + "example" : "50.689782,7.159647" + }, { + "name" : "uid", + "in" : "query", + "description" : "The globally unique user identifier which should be a UUID (if provided).", + "schema" : { + "type" : "string" + }, + "example" : "003b90ec-96cb-4262-ab90-49c966f4913b" + } ], + "responses" : { + "200" : { + "description" : "Geometry retrieved successfully.", + "content" : { + "application/geo+json" : { + "schema" : { + "$ref" : "#/components/schemas/GeoJsonObject" + } + } + } + }, + "400" : { + "description" : "Bad request parameters." + } + } + } + }, + "/location/{id}" : { + "get" : { + "tags" : [ "Carta", "Geo" ], + "summary" : "Returns the location with the specified id.", + "operationId" : "getLocation", + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "The location id to retrieve.", + "required" : true, + "schema" : { + "pattern" : "[a-zA-Z]+|.*", + "type" : "string" + } + }, { + "name" : "location", + "in" : "query", + "description" : "The user location specified as a coordinate (latitude,longitude) used as context for the name resolution.", + "schema" : { + "type" : "string" + }, + "example" : "50.689782,7.159647" + }, { + "name" : "uid", + "in" : "query", + "description" : "The globally unique user identifier which should be a UUID (if provided).", + "schema" : { + "type" : "string" + }, + "example" : "003b90ec-96cb-4262-ab90-49c966f4913b" + } ], + "responses" : { + "200" : { + "description" : "Location retrieved successfully.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Location" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/Location" + } + } + } + }, + "400" : { + "description" : "Bad request parameters." + }, + "404" : { + "description" : "Location not found." + } + } + } + }, + "/location/search" : { + "get" : { + "tags" : [ "Carta", "Geo" ], + "summary" : "Returns a list of locations for a particular query.", + "operationId" : "searchLocations", + "parameters" : [ { + "name" : "q", + "in" : "query", + "description" : "The query to resolve (i.e. a name or a coordinate with latitude, longitude or a range of two coordinates).", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "type", + "in" : "query", + "description" : "A comma-separated list of location types to filter.", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "COUNTRY", "STATE", "COUNTY", "CITY", "SUBURB", "NEIGHBORHOOD", "LOCALITY", "STREET", "BUILDING", "TRANSIT", "PARKING", "ADMINISTRATION", "EDUCATION", "HEALTHCARE", "TOURISM", "INDOOR", "CHARGING" ] + } + } + }, { + "name" : "subtype", + "in" : "query", + "description" : "A comma-separated list of location sub types to filter.", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "INDOOR_DOORWAY", "INDOOR_ELEVATOR", "INDOOR_ESCALATOR", "INDOOR_RAMP", "INDOOR_STAIRS", "INDOOR_RESTROOM", "INDOOR_INFORMATION", "INDOOR_CHECKPOINT", "LEVEL_SAME", "LEVEL_UP", "LEVEL_DOWN", "LEVEL_UPDOWN", "LIMIT_MEN", "LIMIT_WOMEN", "LIMIT_UNISEX", "PASS_IN", "PASS_OUT", "PASS_INOUT", "TRANSIT_STATION", "TRANSIT_GROUP", "TRANSIT_TRAM", "TRANSIT_METRO", "TRANSIT_RAIL", "TRANSIT_BUS", "TRANSIT_FERRY", "TRANSIT_CABLECAR", "TRANSIT_GONDOLA", "TRANSIT_FUNICULAR", "TRANSIT_TROLLEYBUS", "TRANSIT_MONORAIL", "TRANSIT_BIKE", "TRANSIT_SCOOTER", "TRANSIT_CAR", "EDUCATION_SCHOOL", "EDUCATION_COLLEGE", "EDUCATION_UNIVERSITY", "HEALTHCARE_HOSPITAL", "HEALTH_SANATORIUM", "ADMINISTRATION_TOWNHALL", "TOURISM_WORSHIP", "TOURISM_ATTRACTION", "TOURISM_ARTWORK", "TOURISM_AQUARIUM", "TOURISM_ZOO", "TOURISM_MUSEUM", "TOURISM_GALLERY", "TOURISM_THEME_PARK", "TOURISM_VIEWPOINT", "TOURISM_PICNIC_SITE", "TOURISM_ALPINE_HUT", "TOURISM_INFORMATION", "TOURISM_HOTEL", "TOURISM_MOTEL", "TOURISM_HOSTEL", "TOURISM_APARTMENT", "TOURISM_CHALET", "TOURISM_GUEST_HOUSE", "TOURISM_CAMP_SITE", "TOURISM_CARAVAN_SITE", "CITY_CITY", "CITY_TOWN", "CITY_VILLAGE", "CITY_HAMLET", "CITY_DWELLING", "STREET_MOTORWAY", "STREET_MOTORWAY_LINK", "STREET_TRUNK", "STREET_TRUNK_LINK", "STREET_PRIMARY", "STREET_PRIMARY_LINK", "STREET_SECONDARY", "STREET_SECONDARY_LINK", "STREET_TERTIARY", "STREET_TERTIARY_LINK", "STREET_RESIDENTIAL", "STREET_LIVING_STREET", "STREET_SERVICE", "STREET_TRACK", "STREET_PEDESTRIAN", "STREET_SQUARE", "COUNTY_COUNTY", "COUNTY_DISTRICT", "COUNTY_REGION", "COUNTY_PROVINCE", "COUNTY_ISLAND", "COUNTY_POSTAL", "CHARGING_REGULAR", "CHARGING_QUICK", "CHARGING_DC_CHADEMO", "CHARGING_DC_COMBO", "CHARGING_AC_TYPE2", "CHARGING_AC_SCHUKO" ] + } + } + }, { + "name" : "limit", + "in" : "query", + "description" : "The maximum number of locations to return.", + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 3 + } + }, { + "name" : "location", + "in" : "query", + "description" : "The user location specified as a coordinate (latitude,longitude) used as context for the name resolution.", + "schema" : { + "type" : "string" + }, + "example" : "50.689782,7.159647" + }, { + "name" : "uid", + "in" : "query", + "description" : "The globally unique user identifier which should be a UUID (if provided).", + "schema" : { + "type" : "string" + }, + "example" : "003b90ec-96cb-4262-ab90-49c966f4913b" + } ], + "responses" : { + "200" : { + "description" : "Locations retrieved successfully.", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Location" + } + } + }, + "application/xml" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Location" + } + } + } + } + }, + "400" : { + "description" : "Bad request parameters." + } + } + } + }, + "/direction" : { + "get" : { + "tags" : [ "Carta", "Map" ], + "summary" : "Computes directions for reaching a destination from an origin.", + "operationId" : "getDirection", + "parameters" : [ { + "name" : "arrival_time", + "in" : "query", + "description" : "The desired arrival time in epoch seconds (from midnight January 1, 1970 UTC).", + "schema" : { + "type" : "integer", + "format" : "int64" + }, + "example" : 1478680000 + }, { + "name" : "departure_time", + "in" : "query", + "description" : "The desired departure time in epoch seconds (from midnight January 1, 1970 UTC). Set to now, if neither arrival nor departure time is specified.", + "schema" : { + "type" : "integer", + "format" : "int64" + }, + "example" : 1478680000 + }, { + "name" : "alternatives", + "in" : "query", + "description" : "The maximum number of alternative routes to compute.", + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 3 + }, + "example" : 5 + }, { + "name" : "origin", + "in" : "query", + "description" : "The origin of the route as name, coordinate (latitude,longitude) or coordinate with level (latitude,longitude,level).", + "required" : true, + "schema" : { + "type" : "string" + }, + "example" : "Bonn, Germany" + }, { + "name" : "destination", + "in" : "query", + "description" : "The destination of the route as name, coordinate (latitude,longitude) or coordinate with level (latitude,longitude,level).", + "required" : true, + "schema" : { + "type" : "string" + }, + "example" : "50.689782,7.159647,0" + }, { + "name" : "mode", + "in" : "query", + "description" : "The movement modality type of the routes to compute.", + "required" : true, + "schema" : { + "type" : "string" + }, + "example" : "walking" + }, { + "name" : "walking_speed", + "in" : "query", + "description" : "The walking speed (in meters per second) to compute the duration of walking steps.", + "schema" : { + "type" : "number", + "format" : "double", + "default" : 1.4 + }, + "example" : 2.0 + }, { + "name" : "transfer_time", + "in" : "query", + "description" : "The time period (in seconds) to introduce for transfers between vehicles in transit steps.", + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 120 + }, + "example" : 180 + }, { + "name" : "accessible", + "in" : "query", + "description" : "A flag to indicate that the routing should consider restrictions for persons with wheelchairs.", + "schema" : { + "type" : "boolean", + "default" : false + }, + "example" : true + }, { + "name" : "parking", + "in" : "query", + "description" : "A flag to indicate that a driving route should include a parking steop nearby the destination with a walking step to the final destination.", + "schema" : { + "type" : "boolean", + "default" : false + }, + "example" : true + }, { + "name" : "type", + "in" : "query", + "description" : "A list of vehicle types used during transit routing specified as a comma-separated list (0=tram, 1=subway, 2=rail, 3=bus, 4=ferry, 5=cablecar, 6=gondola, 7=funicular, 8=trolleybus, 9=monorail).", + "schema" : { + "type" : "string" + }, + "example" : "1,2,3" + }, { + "name" : "range", + "in" : "query", + "description" : "The time range in seconds for range raptor.", + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 5400 + }, + "example" : 3600 + }, { + "name" : "location", + "in" : "query", + "description" : "The user location specified as a coordinate (latitude,longitude) used as context for the name resolution.", + "schema" : { + "type" : "string" + }, + "example" : "50.689782,7.159647" + }, { + "name" : "uid", + "in" : "query", + "description" : "The globally unique user identifier which should be a UUID (if provided).", + "schema" : { + "type" : "string" + }, + "example" : "003b90ec-96cb-4262-ab90-49c966f4913b" + } ], + "responses" : { + "200" : { + "description" : "Directions computed successfully.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Direction" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/Direction" + } + } + } + }, + "400" : { + "description" : "Bad request parameters." + } + } + } + }, + "/network/line/{provider}" : { + "get" : { + "tags" : [ "Carta", "Map" ], + "summary" : "Returns the network lines for a stop id.", + "operationId" : "getLines", + "parameters" : [ { + "name" : "provider", + "in" : "path", + "description" : "Sets the identifier of the network provider.", + "required" : true, + "schema" : { + "pattern" : ".*", + "type" : "string" + }, + "example" : "transitemt" + }, { + "name" : "stop", + "in" : "query", + "description" : "The stop id of the stop to retrieve.", + "required" : true, + "schema" : { + "type" : "string" + }, + "example" : 1234 + } ], + "responses" : { + "200" : { + "description" : "Lines retrieved successfully.", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/NetworkLine" + } + } + }, + "application/xml" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/NetworkLine" + } + } + } + } + } + } + } + }, + "/network/schedule/{provider}" : { + "get" : { + "tags" : [ "Carta", "Map" ], + "summary" : "Returns the stop schedule for a stop id.", + "operationId" : "getSchedule", + "parameters" : [ { + "name" : "provider", + "in" : "path", + "description" : "Sets the identifier of the network provider.", + "required" : true, + "schema" : { + "pattern" : ".*", + "type" : "string" + }, + "example" : "transitemt" + }, { + "name" : "stop", + "in" : "query", + "description" : "The stop id of the stop to retrieve.", + "required" : true, + "schema" : { + "type" : "string" + }, + "example" : 1234 + }, { + "name" : "date", + "in" : "query", + "description" : "The date specified as YYYYMMDD.", + "required" : true, + "schema" : { + "type" : "string" + }, + "example" : 20150131 + }, { + "name" : "location", + "in" : "query", + "description" : "The user location specified as a coordinate (latitude,longitude) used as context for the name resolution.", + "schema" : { + "type" : "string" + }, + "example" : "50.689782,7.159647" + }, { + "name" : "uid", + "in" : "query", + "description" : "The globally unique user identifier which should be a UUID (if provided).", + "schema" : { + "type" : "string" + }, + "example" : "003b90ec-96cb-4262-ab90-49c966f4913b" + } ], + "responses" : { + "200" : { + "description" : "Stops retrieved successfully.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/StopSchedule" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/StopSchedule" + } + } + } + } + } + } + }, + "/network/stop/{provider}" : { + "get" : { + "tags" : [ "Carta", "Map" ], + "summary" : "Returns the network stops around a partciular position.", + "operationId" : "getStops", + "parameters" : [ { + "name" : "provider", + "in" : "path", + "description" : "Legacy parameter that restricts the search to a single repository.", + "required" : true, + "schema" : { + "pattern" : ".*", + "type" : "string" + }, + "example" : "transitemt" + }, { + "name" : "q", + "in" : "query", + "description" : "A coordinate to retrieve the nearest stops defined as a WGS84 latitude,longitude.", + "required" : true, + "schema" : { + "type" : "string" + }, + "example" : "50.689782,7.159647" + }, { + "name" : "limit", + "in" : "query", + "description" : "The maximum number of results to return.", + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 3 + } + } ], + "responses" : { + "200" : { + "description" : "Stops retrieved successfully.", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/NetworkStop" + } + } + }, + "application/xml" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/NetworkStop" + } + } + } + } + } + } + } + }, + "/parking" : { + "get" : { + "tags" : [ "Carta", "Map" ], + "summary" : "Returns the parkings for a particular query.", + "operationId" : "getParkings", + "parameters" : [ { + "name" : "q", + "in" : "query", + "description" : "The query to resolve (i.e. a name or a coordinate with latitude, longitude or a range of two coordinates).", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "limit", + "in" : "query", + "description" : "The maximum number of locations to return.", + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 3 + } + } ], + "responses" : { + "200" : { + "description" : "Parkings retrieved successfully.", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Parking" + } + } + }, + "application/xml" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Parking" + } + } + } + } + }, + "400" : { + "description" : "Invalid request parameters." + } + } + } + }, + "/tile/{z}/{x}/{y}.jpg" : { + "get" : { + "tags" : [ "Carta", "Tile" ], + "summary" : "Returns a jpg for the x and y coordinate at the specified zoom level z.", + "operationId" : "getDefaultJpegTile", + "parameters" : [ { + "name" : "x", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "y", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "z", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "cache", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "enable" + } + }, { + "name" : "debug", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "disable" + } + }, { + "name" : "lang", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "default" + } + } ], + "responses" : { + "200" : { + "description" : "Image retrieved successfully.", + "content" : { + "image/jpeg " : { + "schema" : { + "type" : "string" + } + } + } + } + } + } + }, + "/tile/{z}/{x}/{y}.png" : { + "get" : { + "tags" : [ "Carta", "Tile" ], + "summary" : "Returns a png for the x and y coordinate at the specified zoom level z.", + "operationId" : "getDefaultPngTile", + "parameters" : [ { + "name" : "x", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "y", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "z", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "cache", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "enable" + } + }, { + "name" : "debug", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "disable" + } + }, { + "name" : "lang", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "default" + } + } ], + "responses" : { + "200" : { + "description" : "Image retrieved successfully.", + "content" : { + "image/png " : { + "schema" : { + "type" : "string" + } + } + } + } + } + } + }, + "/tile/{setup}/{z}/{x}/{y}.jpg" : { + "get" : { + "tags" : [ "Carta", "Tile" ], + "summary" : "Returns a jpg rendered with the specified setup for the x and y coordinate at the specified zoom level z.", + "operationId" : "getJpegTile", + "parameters" : [ { + "name" : "setup", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "x", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "y", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "z", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "cache", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "enable" + } + }, { + "name" : "debug", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "disable" + } + }, { + "name" : "lang", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "default" + } + } ], + "responses" : { + "200" : { + "description" : "Image retrieved successfully.", + "content" : { + "image/jpeg " : { + "schema" : { + "type" : "string" + } + } + } + } + } + } + }, + "/tile/{setup}/{z}/{x}/{y}.png" : { + "get" : { + "tags" : [ "Carta", "Tile" ], + "summary" : "Returns a png rendered with the specified setup for the x and y coordinate at the specified zoom level z.", + "operationId" : "getPngTile", + "parameters" : [ { + "name" : "setup", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "x", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "y", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "z", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "cache", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "enable" + } + }, { + "name" : "debug", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "disable" + } + }, { + "name" : "lang", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "default" + } + } ], + "responses" : { + "200" : { + "description" : "Image retrieved successfully.", + "content" : { + "image/png " : { + "schema" : { + "type" : "string" + } + } + } + } + } + } + }, + "/tile/{z}/{x}/{y}.geojson" : { + "get" : { + "tags" : [ "Carta", "Tile" ], + "summary" : "Retrieves the vector data for a particular x, y tile at a specific zoom level z.", + "operationId" : "getFeatures", + "parameters" : [ { + "name" : "x", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "y", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "z", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "precision", + "in" : "query", + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : -1 + } + }, { + "name" : "rings", + "in" : "query", + "schema" : { + "type" : "boolean", + "default" : true + } + }, { + "name" : "filterId", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "0" + } + } ], + "responses" : { + "200" : { + "description" : "Features retrieved successfully.", + "content" : { + "application/geo+json" : { + "schema" : { + "$ref" : "#/components/schemas/FeatureCollection" + } + } + } + }, + "400" : { + "description" : "Bad request parameters." + } + } + } + }, + "/tile/{z}/{x}/{y}.bin" : { + "get" : { + "tags" : [ "Carta", "Tile" ], + "summary" : "Retrieves the vector data for the map tile x/y at zoom level z in a compact, binary format.", + "operationId" : "getBinaryVectorTile", + "parameters" : [ { + "name" : "x", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "y", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "z", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "filterId", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "0" + } + }, { + "name" : "clipping", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "yes" + } + }, { + "name" : "zoomOffset", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "0" + } + } ], + "responses" : { + "200" : { + "description" : "Tile retrieved successfully.", + "content" : { + "application/octet-stream" : { + "schema" : { + "type" : "string" + } + } + } + }, + "400" : { + "description" : "Bad request parameters." + } + } + } + }, + "/tile/{z}/{x}/{y}.json" : { + "get" : { + "tags" : [ "Carta", "Tile" ], + "summary" : "Retrieves the vector data for the map tile x/y at zoom level z as a GeoJSON feature collection.", + "operationId" : "getGeoJsonVectorTile", + "parameters" : [ { + "name" : "x", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "y", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "z", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "filterId", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "0" + } + }, { + "name" : "clipping", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "yes" + } + }, { + "name" : "zoomOffset", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "0" + } + } ], + "responses" : { + "200" : { + "description" : "Tile retrieved successfully.", + "content" : { + "application/geo+json" : { + "schema" : { + "$ref" : "#/components/schemas/FeatureCollection" + } + } + } + }, + "400" : { + "description" : "Bad request parameters." + } + } + } + } + }, + "components" : { + "schemas" : { + "Crs" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "name", "link" ] + }, + "properties" : { + "type" : "object", + "additionalProperties" : { + "type" : "object" + } + } + } + }, + "Feature" : { + "type" : "object", + "properties" : { + "crs" : { + "$ref" : "#/components/schemas/Crs" + }, + "bbox" : { + "type" : "array", + "items" : { + "type" : "number", + "format" : "double" + } + }, + "properties" : { + "type" : "object", + "additionalProperties" : { + "type" : "object" + } + }, + "geometry" : { + "$ref" : "#/components/schemas/GeoJsonObject" + }, + "id" : { + "type" : "string" + } + } + }, + "FeatureCollection" : { + "type" : "object", + "properties" : { + "crs" : { + "$ref" : "#/components/schemas/Crs" + }, + "bbox" : { + "type" : "array", + "items" : { + "type" : "number", + "format" : "double" + } + }, + "features" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Feature" + } + } + } + }, + "GeoJsonObject" : { + "required" : [ "type" ], + "type" : "object", + "properties" : { + "crs" : { + "$ref" : "#/components/schemas/Crs" + }, + "bbox" : { + "type" : "array", + "items" : { + "type" : "number", + "format" : "double" + } + }, + "type" : { + "type" : "string" + } + }, + "discriminator" : { + "propertyName" : "type" + } + }, + "GeometryCollection" : { + "type" : "object", + "allOf" : [ { + "$ref" : "#/components/schemas/GeoJsonObject" + }, { + "type" : "object", + "properties" : { + "geometries" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/GeoJsonObject" + } + } + } + } ] + }, + "LineString" : { + "type" : "object", + "allOf" : [ { + "$ref" : "#/components/schemas/GeoJsonObject" + }, { + "type" : "object", + "properties" : { + "coordinates" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/LngLatAlt" + } + } + } + } ] + }, + "LngLatAlt" : { + "type" : "object", + "properties" : { + "longitude" : { + "type" : "number", + "format" : "double" + }, + "latitude" : { + "type" : "number", + "format" : "double" + }, + "altitude" : { + "type" : "number", + "format" : "double" + }, + "additionalElements" : { + "type" : "array", + "items" : { + "type" : "number", + "format" : "double" + } + } + } + }, + "MultiLineString" : { + "type" : "object", + "allOf" : [ { + "$ref" : "#/components/schemas/GeoJsonObject" + }, { + "type" : "object", + "properties" : { + "coordinates" : { + "type" : "array", + "items" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/LngLatAlt" + } + } + } + } + } ] + }, + "MultiPoint" : { + "type" : "object", + "allOf" : [ { + "$ref" : "#/components/schemas/GeoJsonObject" + }, { + "type" : "object", + "properties" : { + "coordinates" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/LngLatAlt" + } + } + } + } ] + }, + "MultiPolygon" : { + "type" : "object", + "allOf" : [ { + "$ref" : "#/components/schemas/GeoJsonObject" + }, { + "type" : "object", + "properties" : { + "coordinates" : { + "type" : "array", + "items" : { + "type" : "array", + "items" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/LngLatAlt" + } + } + } + } + } + } ] + }, + "Point" : { + "type" : "object", + "allOf" : [ { + "$ref" : "#/components/schemas/GeoJsonObject" + }, { + "type" : "object", + "properties" : { + "coordinates" : { + "$ref" : "#/components/schemas/LngLatAlt" + } + } + } ] + }, + "Polygon" : { + "type" : "object", + "allOf" : [ { + "$ref" : "#/components/schemas/GeoJsonObject" + }, { + "type" : "object", + "properties" : { + "coordinates" : { + "type" : "array", + "items" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/LngLatAlt" + } + } + } + } + } ] + }, + "Coordinate" : { + "required" : [ "latitude", "longitude" ], + "type" : "object", + "properties" : { + "longitude" : { + "type" : "number", + "description" : "The longitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "latitude" : { + "type" : "number", + "description" : "The latitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + } + }, + "description" : "Represents a WGS84 coordinate with longitude and latitude." + }, + "LevelCoordinate" : { + "required" : [ "latitude", "level", "longitude" ], + "type" : "object", + "description" : "Represents a coordinate on a level.", + "allOf" : [ { + "$ref" : "#/components/schemas/Coordinate" + }, { + "type" : "object", + "properties" : { + "longitude" : { + "type" : "number", + "description" : "The longitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "latitude" : { + "type" : "number", + "description" : "The latitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "level" : { + "type" : "integer", + "description" : "The level of the coordinate (0=ground level, +=above ground, -=below ground)", + "format" : "int32", + "xml" : { + "attribute" : true + } + } + } + } ] + }, + "Location" : { + "required" : [ "id", "latitude", "level", "longitude", "subtypes", "type" ], + "type" : "object", + "description" : "Represents an address or place at a particular location.", + "allOf" : [ { + "$ref" : "#/components/schemas/LevelCoordinate" + }, { + "type" : "object", + "properties" : { + "longitude" : { + "type" : "number", + "description" : "The longitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "latitude" : { + "type" : "number", + "description" : "The latitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "level" : { + "type" : "integer", + "description" : "The level of the coordinate (0=ground level, +=above ground, -=below ground)", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "type" : { + "type" : "string", + "description" : "The type of the address.", + "xml" : { + "attribute" : true + }, + "enum" : [ "COUNTRY", "STATE", "COUNTY", "CITY", "SUBURB", "NEIGHBORHOOD", "LOCALITY", "STREET", "BUILDING", "TRANSIT", "PARKING", "ADMINISTRATION", "EDUCATION", "HEALTHCARE", "TOURISM", "INDOOR", "CHARGING" ] + }, + "id" : { + "type" : "string", + "description" : "A unique id for this location.", + "xml" : { + "attribute" : true + } + }, + "subtypes" : { + "type" : "array", + "description" : "The subtype of the address.", + "items" : { + "type" : "string", + "description" : "The subtype of the address.", + "enum" : [ "INDOOR_DOORWAY", "INDOOR_ELEVATOR", "INDOOR_ESCALATOR", "INDOOR_RAMP", "INDOOR_STAIRS", "INDOOR_RESTROOM", "INDOOR_INFORMATION", "INDOOR_CHECKPOINT", "LEVEL_SAME", "LEVEL_UP", "LEVEL_DOWN", "LEVEL_UPDOWN", "LIMIT_MEN", "LIMIT_WOMEN", "LIMIT_UNISEX", "PASS_IN", "PASS_OUT", "PASS_INOUT", "TRANSIT_STATION", "TRANSIT_GROUP", "TRANSIT_TRAM", "TRANSIT_METRO", "TRANSIT_RAIL", "TRANSIT_BUS", "TRANSIT_FERRY", "TRANSIT_CABLECAR", "TRANSIT_GONDOLA", "TRANSIT_FUNICULAR", "TRANSIT_TROLLEYBUS", "TRANSIT_MONORAIL", "TRANSIT_BIKE", "TRANSIT_SCOOTER", "TRANSIT_CAR", "EDUCATION_SCHOOL", "EDUCATION_COLLEGE", "EDUCATION_UNIVERSITY", "HEALTHCARE_HOSPITAL", "HEALTH_SANATORIUM", "ADMINISTRATION_TOWNHALL", "TOURISM_WORSHIP", "TOURISM_ATTRACTION", "TOURISM_ARTWORK", "TOURISM_AQUARIUM", "TOURISM_ZOO", "TOURISM_MUSEUM", "TOURISM_GALLERY", "TOURISM_THEME_PARK", "TOURISM_VIEWPOINT", "TOURISM_PICNIC_SITE", "TOURISM_ALPINE_HUT", "TOURISM_INFORMATION", "TOURISM_HOTEL", "TOURISM_MOTEL", "TOURISM_HOSTEL", "TOURISM_APARTMENT", "TOURISM_CHALET", "TOURISM_GUEST_HOUSE", "TOURISM_CAMP_SITE", "TOURISM_CARAVAN_SITE", "CITY_CITY", "CITY_TOWN", "CITY_VILLAGE", "CITY_HAMLET", "CITY_DWELLING", "STREET_MOTORWAY", "STREET_MOTORWAY_LINK", "STREET_TRUNK", "STREET_TRUNK_LINK", "STREET_PRIMARY", "STREET_PRIMARY_LINK", "STREET_SECONDARY", "STREET_SECONDARY_LINK", "STREET_TERTIARY", "STREET_TERTIARY_LINK", "STREET_RESIDENTIAL", "STREET_LIVING_STREET", "STREET_SERVICE", "STREET_TRACK", "STREET_PEDESTRIAN", "STREET_SQUARE", "COUNTY_COUNTY", "COUNTY_DISTRICT", "COUNTY_REGION", "COUNTY_PROVINCE", "COUNTY_ISLAND", "COUNTY_POSTAL", "CHARGING_REGULAR", "CHARGING_QUICK", "CHARGING_DC_CHADEMO", "CHARGING_DC_COMBO", "CHARGING_AC_TYPE2", "CHARGING_AC_SCHUKO" ] + } + }, + "country" : { + "type" : "string", + "description" : "The enclosing country.", + "xml" : { + "attribute" : true + } + }, + "state" : { + "type" : "string", + "description" : "The enclosing state.", + "xml" : { + "attribute" : true + } + }, + "county" : { + "type" : "string", + "description" : "The enclosing region.", + "xml" : { + "attribute" : true + } + }, + "city" : { + "type" : "string", + "description" : "The city name.", + "xml" : { + "attribute" : true + } + }, + "suburb" : { + "type" : "string", + "description" : "The enclosing suburb.", + "xml" : { + "attribute" : true + } + }, + "neighborhood" : { + "type" : "string", + "description" : "The enclosing neighborhood.", + "xml" : { + "attribute" : true + } + }, + "locality" : { + "type" : "string", + "description" : "The enclosing locality.", + "xml" : { + "attribute" : true + } + }, + "street" : { + "type" : "string", + "description" : "The street.", + "xml" : { + "attribute" : true + } + }, + "building" : { + "type" : "string", + "description" : "The building number.", + "xml" : { + "attribute" : true + } + }, + "postcode" : { + "type" : "string", + "description" : "The post code.", + "xml" : { + "attribute" : true + } + }, + "name" : { + "type" : "string", + "description" : "The name of the place.", + "xml" : { + "attribute" : true + } + }, + "links" : { + "type" : "object", + "additionalProperties" : { + "type" : "string", + "description" : "The links to external sytems." + }, + "description" : "The links to external sytems." + } + } + } ] + }, + "AbstractStop" : { + "required" : [ "id", "latitude", "level", "longitude", "name", "provider" ], + "type" : "object", + "description" : "Represents a stop in the transit network.", + "allOf" : [ { + "$ref" : "#/components/schemas/LevelCoordinate" + }, { + "type" : "object", + "properties" : { + "longitude" : { + "type" : "number", + "description" : "The longitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "latitude" : { + "type" : "number", + "description" : "The latitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "level" : { + "type" : "integer", + "description" : "The level of the coordinate (0=ground level, +=above ground, -=below ground)", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "provider" : { + "type" : "string", + "description" : "The provider of the stop.", + "xml" : { + "attribute" : true + } + }, + "id" : { + "type" : "string", + "description" : "The internal id of the stop.", + "xml" : { + "attribute" : true + } + }, + "code" : { + "type" : "string", + "description" : "The optional code of the stop.", + "xml" : { + "attribute" : true + } + }, + "name" : { + "type" : "string", + "description" : "The name of the stop.", + "xml" : { + "attribute" : true + } + } + } + } ] + }, + "CyclingStep" : { + "type" : "object", + "description" : "Flattened to break circular reference" + }, + "Direction" : { + "type" : "object", + "properties" : { + "routes" : { + "type" : "array", + "description" : "A sequence of alternative routes.", + "xml" : { + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/Route" + } + } + }, + "description" : "Represents a response to a route request." + }, + "DrivingStep" : { + "required" : [ "distance", "startTime", "stopTime" ], + "type" : "object", + "description" : "A step to be taken by car.", + "allOf" : [ { + "$ref" : "#/components/schemas/StreetStep" + }, { + "$ref" : "#/components/schemas/Step" + } ] + }, + "Emission" : { + "type" : "object", + "properties" : { + "carbonDioxide" : { + "type" : "number", + "description" : "Carbon dioxide emissions in g.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "carbonMonoxide" : { + "type" : "number", + "description" : "Carbon monoxide emissions in g.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "hydroCarbons" : { + "type" : "number", + "description" : "Hydro carbons emissions in g.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "nitrogenOxides" : { + "type" : "number", + "description" : "Nitrogen oxides emissions in g.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "particles" : { + "type" : "number", + "description" : "Particles in g.", + "format" : "double", + "xml" : { + "attribute" : true + } + } + }, + "description" : "Represents the pollutant emissions of a route." + }, + "IndoorSegment" : { + "required" : [ "distance", "duration", "endLevel", "exit", "startLevel", "turn", "type" ], + "type" : "object", + "description" : "A particular way segment in an indoor environment.", + "allOf" : [ { + "$ref" : "#/components/schemas/Segment" + }, { + "type" : "object", + "properties" : { + "coordinates" : { + "type" : "string", + "description" : "A sequence of coordinates as string encoded polyline.", + "xml" : { + "attribute" : true + } + }, + "duration" : { + "type" : "integer", + "description" : "The duration in seconds.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "distance" : { + "type" : "number", + "description" : "The distance traveled by this segment in meters.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "type" : { + "type" : "string", + "description" : "Represents the type of the street.", + "xml" : { + "attribute" : true + }, + "enum" : [ "OTHER", "MOTORWAY", "TRUNK", "PRIMARY", "SECONDARY", "TERTIARY", "UNCLASSIFIED", "RESIDENTIAL", "SERVICE", "MOTORWAY_LINK", "TRUNK_LINK", "PRIMARY_LINK", "SECONDARY_LINK", "TERTIARY_LINK", "LIVING_STREET", "PEDESTRIAN", "TRACK", "FOOTWAY", "CYCLEWAY", "BRIDLEWAY", "STEPS", "PATH" ] + }, + "turn" : { + "type" : "string", + "description" : "Represents the type of turn to be made.", + "xml" : { + "attribute" : true + }, + "enum" : [ "CONTINUE", "KEEP_LEFT", "SLIGHT_LEFT", "TURN_LEFT", "SHARP_LEFT", "KEEP_RIGHT", "SLIGHT_RIGHT", "TURN_RIGHT", "SHARP_RIGHT", "U_TURN", "ROUND_ABOUT" ] + }, + "exit" : { + "type" : "integer", + "description" : "The exit number for round abouts or 0, if the type is not roundabout.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "startLevel" : { + "type" : "integer", + "description" : "The level of the segment.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "endLevel" : { + "type" : "integer", + "description" : "The end level of the segment.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "zoneName" : { + "type" : "string", + "description" : "The name of the zone through which the segment runs.", + "xml" : { + "attribute" : true + } + }, + "summaries" : { + "type" : "array", + "description" : "Optional textual summary of the segment which jointly describe the step.", + "xml" : { + "wrapped" : true + }, + "items" : { + "type" : "string", + "description" : "Optional textual summary of the segment which jointly describe the step.", + "xml" : { + "name" : "summary" + } + } + }, + "notifications" : { + "type" : "array", + "description" : "Optional textual notifications to be shown during the segment.", + "xml" : { + "wrapped" : true + }, + "items" : { + "type" : "string", + "description" : "Optional textual notifications to be shown during the segment.", + "xml" : { + "name" : "notification" + } + } + } + } + } ] + }, + "IndoorStep" : { + "required" : [ "distance", "startTime", "stopTime" ], + "type" : "object", + "description" : "Represents a step to be taken in a building.", + "allOf" : [ { + "$ref" : "#/components/schemas/Step" + }, { + "type" : "object", + "properties" : { + "segments" : { + "type" : "array", + "description" : "The segments of the step.", + "xml" : { + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/IndoorSegment" + } + } + } + } ] + }, + "Line" : { + "required" : [ "code", "direction", "headsign", "name", "provider", "type" ], + "type" : "object", + "properties" : { + "code" : { + "type" : "string", + "description" : "The short code of the line.", + "xml" : { + "attribute" : true + } + }, + "name" : { + "type" : "string", + "description" : "The name of the line.", + "xml" : { + "attribute" : true + } + }, + "type" : { + "type" : "string", + "description" : "Represents a line type of a public transit line.", + "xml" : { + "attribute" : true + }, + "enum" : [ "TRAM", "METRO", "RAIL", "BUS", "FERRY", "CABLECAR", "GONDOLA", "FUNICULAR", "TROLLEYBUS", "MONORAIL", "BIKE", "CAR" ] + }, + "direction" : { + "type" : "integer", + "description" : "The direction of the line.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "headsign" : { + "type" : "string", + "description" : "The headsign of the line.", + "xml" : { + "attribute" : true + } + }, + "color" : { + "type" : "string", + "description" : "The line color to be used as ARGB hex string.", + "xml" : { + "attribute" : true + } + }, + "agency" : { + "$ref" : "#/components/schemas/TransitAgency" + }, + "provider" : { + "type" : "string", + "description" : "The provider of the line.", + "xml" : { + "attribute" : true + } + } + }, + "description" : "Represents information about a transit line." + }, + "LineStatus" : { + "type" : "object", + "properties" : { + "scheduledDeparture" : { + "$ref" : "#/components/schemas/RouteDateTime" + }, + "expectedDeparture" : { + "$ref" : "#/components/schemas/RouteDateTime" + }, + "expectedPlatform" : { + "type" : "string", + "description" : "The expected departure platform.", + "xml" : { + "attribute" : true + } + }, + "canceled" : { + "type" : "boolean", + "description" : "A flag to indicate whether the trip is cancelled.", + "xml" : { + "attribute" : true + } + } + }, + "description" : "Represents an upcoming departure with real-time updates." + }, + "Parking" : { + "required" : [ "accessibility", "free", "latitude", "longitude", "side", "time", "total", "type" ], + "type" : "object", + "description" : "Represents a parking at a particular geographic coordinate.", + "allOf" : [ { + "$ref" : "#/components/schemas/Coordinate" + }, { + "type" : "object", + "properties" : { + "longitude" : { + "type" : "number", + "description" : "The longitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "latitude" : { + "type" : "number", + "description" : "The latitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "name" : { + "type" : "string", + "description" : "The optional name of the parking.", + "xml" : { + "attribute" : true + } + }, + "type" : { + "type" : "string", + "description" : "Represents the type of parking.", + "xml" : { + "attribute" : true + }, + "enum" : [ "STREET", "BAY", "LOT", "GARAGE" ] + }, + "side" : { + "type" : "string", + "description" : "Represents the side on which the parking is located.", + "xml" : { + "attribute" : true + }, + "enum" : [ "NONE", "LEFT", "RIGHT" ] + }, + "accessibility" : { + "type" : "string", + "description" : "Represents the wheel chair accessiblity of the parking.", + "xml" : { + "attribute" : true + }, + "enum" : [ "UNKNOWN", "NONE", "PARTIALLY", "FULLY" ] + }, + "total" : { + "type" : "integer", + "description" : "The total number of spaces at the location.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "free" : { + "type" : "integer", + "description" : "The number of free spaces at the location or -1 if not known.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "time" : { + "type" : "integer", + "description" : "The time of the last update of the free spaces information or -1, if the update time is not available or the free spaces are not determined.", + "format" : "int64", + "xml" : { + "attribute" : true + } + }, + "code" : { + "type" : "string", + "description" : "The provider-specific code of the parking place.", + "xml" : { + "attribute" : true + } + }, + "provider" : { + "type" : "string", + "description" : "The provider of the parking place.", + "xml" : { + "attribute" : true + } + } + } + } ] + }, + "ParkingStep" : { + "required" : [ "distance", "parking", "startTime", "stopTime" ], + "type" : "object", + "description" : "A step to represent the parking of a car at a particular parking.", + "allOf" : [ { + "$ref" : "#/components/schemas/Step" + }, { + "type" : "object", + "properties" : { + "parking" : { + "$ref" : "#/components/schemas/Parking" + } + } + } ] + }, + "Route" : { + "required" : [ "distance", "duration", "sourceCoordinate", "sourceLevel", "targetCoordinate", "targetLevel" ], + "type" : "object", + "properties" : { + "sourceCoordinate" : { + "$ref" : "#/components/schemas/Coordinate" + }, + "targetCoordinate" : { + "$ref" : "#/components/schemas/Coordinate" + }, + "sourceLevel" : { + "type" : "integer", + "description" : "The level of the source coordinate.", + "format" : "int32" + }, + "targetLevel" : { + "type" : "integer", + "description" : "The level of the target coordinate.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "distance" : { + "type" : "number", + "description" : "The total distance in meters.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "duration" : { + "type" : "integer", + "description" : "The total trip duration in seconds.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "emission" : { + "$ref" : "#/components/schemas/Emission" + }, + "steps" : { + "type" : "array", + "description" : "The sequence of steps to take.", + "xml" : { + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/Step" + } + } + }, + "description" : "Represents a number of steps that lead from an origin to a destination." + }, + "RouteDateTime" : { + "required" : [ "date", "time" ], + "type" : "object", + "properties" : { + "time" : { + "type" : "integer", + "description" : "The time in seconds from midnight.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "date" : { + "type" : "string", + "description" : "The date provided as YYYYMMDD.", + "example" : "20111231", + "xml" : { + "attribute" : true + } + } + }, + "description" : "Represents a date and time." + }, + "ScooterStep" : { + "required" : [ "distance", "startTime", "stopTime" ], + "type" : "object", + "description" : "A step to be taken by e-scooter.", + "allOf" : [ { + "$ref" : "#/components/schemas/StreetStep" + }, { + "$ref" : "#/components/schemas/Step" + } ] + }, + "Segment" : { + "required" : [ "distance", "duration", "exit", "turn", "type" ], + "type" : "object", + "properties" : { + "coordinates" : { + "type" : "string", + "description" : "A sequence of coordinates as string encoded polyline.", + "xml" : { + "attribute" : true + } + }, + "duration" : { + "type" : "integer", + "description" : "The duration in seconds.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "distance" : { + "type" : "number", + "description" : "The distance traveled by this segment in meters.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "type" : { + "type" : "string", + "description" : "Represents the type of the street.", + "xml" : { + "attribute" : true + }, + "enum" : [ "OTHER", "MOTORWAY", "TRUNK", "PRIMARY", "SECONDARY", "TERTIARY", "UNCLASSIFIED", "RESIDENTIAL", "SERVICE", "MOTORWAY_LINK", "TRUNK_LINK", "PRIMARY_LINK", "SECONDARY_LINK", "TERTIARY_LINK", "LIVING_STREET", "PEDESTRIAN", "TRACK", "FOOTWAY", "CYCLEWAY", "BRIDLEWAY", "STEPS", "PATH" ] + }, + "turn" : { + "type" : "string", + "description" : "Represents the type of turn to be made.", + "xml" : { + "attribute" : true + }, + "enum" : [ "CONTINUE", "KEEP_LEFT", "SLIGHT_LEFT", "TURN_LEFT", "SHARP_LEFT", "KEEP_RIGHT", "SLIGHT_RIGHT", "TURN_RIGHT", "SHARP_RIGHT", "U_TURN", "ROUND_ABOUT" ] + }, + "exit" : { + "type" : "integer", + "description" : "The exit number for round abouts or 0, if the type is not roundabout.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "summaries" : { + "type" : "array", + "description" : "Optional textual summary of the segment which jointly describe the step.", + "xml" : { + "wrapped" : true + }, + "items" : { + "type" : "string", + "description" : "Optional textual summary of the segment which jointly describe the step.", + "xml" : { + "name" : "summary" + } + } + } + }, + "description" : "Represents a common base class for segments in steps." + }, + "Step" : { + "type" : "object", + "description" : "Flattened to break circular reference" + }, + "StreetSegment" : { + "required" : [ "distance", "duration", "exit", "turn", "type" ], + "type" : "object", + "description" : "A path on a particular road.", + "allOf" : [ { + "$ref" : "#/components/schemas/Segment" + }, { + "type" : "object", + "properties" : { + "coordinates" : { + "type" : "string", + "description" : "A sequence of coordinates as string encoded polyline.", + "xml" : { + "attribute" : true + } + }, + "duration" : { + "type" : "integer", + "description" : "The duration in seconds.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "distance" : { + "type" : "number", + "description" : "The distance traveled by this segment in meters.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "type" : { + "type" : "string", + "description" : "Represents the type of the street.", + "xml" : { + "attribute" : true + }, + "enum" : [ "OTHER", "MOTORWAY", "TRUNK", "PRIMARY", "SECONDARY", "TERTIARY", "UNCLASSIFIED", "RESIDENTIAL", "SERVICE", "MOTORWAY_LINK", "TRUNK_LINK", "PRIMARY_LINK", "SECONDARY_LINK", "TERTIARY_LINK", "LIVING_STREET", "PEDESTRIAN", "TRACK", "FOOTWAY", "CYCLEWAY", "BRIDLEWAY", "STEPS", "PATH" ] + }, + "turn" : { + "type" : "string", + "description" : "Represents the type of turn to be made.", + "xml" : { + "attribute" : true + }, + "enum" : [ "CONTINUE", "KEEP_LEFT", "SLIGHT_LEFT", "TURN_LEFT", "SHARP_LEFT", "KEEP_RIGHT", "SLIGHT_RIGHT", "TURN_RIGHT", "SHARP_RIGHT", "U_TURN", "ROUND_ABOUT" ] + }, + "exit" : { + "type" : "integer", + "description" : "The exit number for round abouts or 0, if the type is not roundabout.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "road" : { + "type" : "string", + "description" : "The name of the road.", + "xml" : { + "attribute" : true + } + }, + "summaries" : { + "type" : "array", + "description" : "Optional textual summary of the segment which jointly describe the step.", + "xml" : { + "wrapped" : true + }, + "items" : { + "type" : "string", + "description" : "Optional textual summary of the segment which jointly describe the step.", + "xml" : { + "name" : "summary" + } + } + } + } + } ] + }, + "StreetStep" : { + "type" : "object", + "description" : "Flattened to break circular reference" + }, + "TransitAgency" : { + "required" : [ "name" ], + "type" : "object", + "properties" : { + "name" : { + "type" : "string", + "description" : "The name of the agency.", + "xml" : { + "attribute" : true + } + }, + "url" : { + "type" : "string", + "description" : "An url to the agency.", + "xml" : { + "attribute" : true + } + } + }, + "description" : "Represents a transport network operator." + }, + "TransitIncident" : { + "required" : [ "cause", "effect", "translated" ], + "type" : "object", + "properties" : { + "cause" : { + "type" : "string", + "description" : "Represents the reason for an incident.", + "xml" : { + "attribute" : true + }, + "enum" : [ "UNKNOWN_CAUSE", "OTHER_CAUSE", "TECHNICAL_PROBLEM", "STRIKE", "DEMONSTRATION", "ACCIDENT", "HOLIDAY", "WEATHER", "MAINTENANCE", "CONSTRUCTION", "POLICE_ACTIVITY", "MEDICAL_EMERGENCY", "SOCIAL_CULTURAL_EVENT" ] + }, + "effect" : { + "type" : "string", + "description" : "Represents the effect of an incident.", + "xml" : { + "attribute" : true + }, + "enum" : [ "NO_SERVICE", "REDUCED_SERVICE", "SIGNIFICANT_DELAYS", "DETOUR", "ADDITIONAL_SERVICE", "MODIFIED_SERVICE", "OTHER_EFFECT", "UNKNOWN_EFFECT", "STOP_MOVED" ] + }, + "title" : { + "type" : "string", + "description" : "The title of the incident.", + "xml" : { + "attribute" : true + } + }, + "details" : { + "type" : "string", + "description" : "The details on the incident.", + "xml" : { + "attribute" : true + } + }, + "hyperlink" : { + "type" : "string", + "description" : "A hyperlink with more details.", + "xml" : { + "attribute" : true + } + }, + "translated" : { + "type" : "boolean", + "description" : "A flag to indicate whether the incident is automatically translated.", + "xml" : { + "attribute" : true + } + } + }, + "description" : "Represents an incident on a particular transit route or step." + }, + "TransitStep" : { + "required" : [ "crowd", "distance", "line", "startTime", "stopTime" ], + "type" : "object", + "description" : "Represents a step that is supposed to be taken by some form public transport.", + "allOf" : [ { + "$ref" : "#/components/schemas/Step" + }, { + "type" : "object", + "properties" : { + "line" : { + "$ref" : "#/components/schemas/Line" + }, + "id" : { + "type" : "string", + "description" : "The internal trip identification.", + "xml" : { + "attribute" : true + } + }, + "crowd" : { + "type" : "string", + "description" : "Represents the expected crowd level during a step.", + "xml" : { + "attribute" : true + }, + "enum" : [ "LEVEL_UNKNOWN", "LEVEL_LOW", "LEVEL_MEDIUM", "LEVEL_HIGH" ] + }, + "realTime" : { + "$ref" : "#/components/schemas/LineStatus" + }, + "stops" : { + "type" : "array", + "description" : "The sequence of stops that the transit vehicle will pass through.", + "xml" : { + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/TransitStop" + } + }, + "incidents" : { + "type" : "array", + "description" : "A set of incidents that affect this step.", + "xml" : { + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/TransitIncident" + } + } + } + } ] + }, + "TransitStop" : { + "required" : [ "arrivalTime", "departureTime", "id", "latitude", "level", "longitude", "name", "provider" ], + "type" : "object", + "description" : "Represents a transit stop with a particular timing in a transit step.", + "allOf" : [ { + "$ref" : "#/components/schemas/AbstractStop" + }, { + "type" : "object", + "properties" : { + "longitude" : { + "type" : "number", + "description" : "The longitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "latitude" : { + "type" : "number", + "description" : "The latitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "level" : { + "type" : "integer", + "description" : "The level of the coordinate (0=ground level, +=above ground, -=below ground)", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "provider" : { + "type" : "string", + "description" : "The provider of the stop.", + "xml" : { + "attribute" : true + } + }, + "id" : { + "type" : "string", + "description" : "The internal id of the stop.", + "xml" : { + "attribute" : true + } + }, + "code" : { + "type" : "string", + "description" : "The optional code of the stop.", + "xml" : { + "attribute" : true + } + }, + "name" : { + "type" : "string", + "description" : "The name of the stop.", + "xml" : { + "attribute" : true + } + }, + "arrivalTime" : { + "type" : "integer", + "description" : "The expected arrival time in seconds from midnight.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "departureTime" : { + "type" : "integer", + "description" : "The expected departure time in seconds from midnight.", + "format" : "int32", + "xml" : { + "attribute" : true + } + } + } + } ] + }, + "WalkingStep" : { + "required" : [ "distance", "startTime", "stopTime" ], + "type" : "object", + "description" : "A step to be taken on foot.", + "allOf" : [ { + "$ref" : "#/components/schemas/StreetStep" + }, { + "$ref" : "#/components/schemas/Step" + } ] + }, + "NetworkLine" : { + "required" : [ "code", "direction", "headsign", "name", "provider", "type" ], + "type" : "object", + "description" : "Represents information about a line in a transit network.", + "allOf" : [ { + "$ref" : "#/components/schemas/Line" + }, { + "type" : "object", + "properties" : { + "code" : { + "type" : "string", + "description" : "The short code of the line.", + "xml" : { + "attribute" : true + } + }, + "name" : { + "type" : "string", + "description" : "The name of the line.", + "xml" : { + "attribute" : true + } + }, + "type" : { + "type" : "string", + "description" : "Represents a line type of a public transit line.", + "xml" : { + "attribute" : true + }, + "enum" : [ "TRAM", "METRO", "RAIL", "BUS", "FERRY", "CABLECAR", "GONDOLA", "FUNICULAR", "TROLLEYBUS", "MONORAIL", "BIKE", "CAR" ] + }, + "direction" : { + "type" : "integer", + "description" : "The direction of the line.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "headsign" : { + "type" : "string", + "description" : "The headsign of the line.", + "xml" : { + "attribute" : true + } + }, + "color" : { + "type" : "string", + "description" : "The line color to be used as ARGB hex string.", + "xml" : { + "attribute" : true + } + }, + "agency" : { + "$ref" : "#/components/schemas/TransitAgency" + }, + "provider" : { + "type" : "string", + "description" : "The provider of the line.", + "xml" : { + "attribute" : true + } + }, + "shape" : { + "type" : "string", + "description" : "A sequence of coordinates as string encoded polyline.", + "xml" : { + "attribute" : true + } + }, + "stops" : { + "type" : "array", + "description" : "The sequence of stops from the start to the end of the line.", + "xml" : { + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/NetworkStop" + } + } + } + } ] + }, + "NetworkStop" : { + "required" : [ "id", "latitude", "level", "longitude", "name", "provider" ], + "type" : "object", + "description" : "Represents a stop in a transit network.", + "allOf" : [ { + "$ref" : "#/components/schemas/AbstractStop" + }, { + "type" : "object", + "properties" : { + "longitude" : { + "type" : "number", + "description" : "The longitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "latitude" : { + "type" : "number", + "description" : "The latitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "level" : { + "type" : "integer", + "description" : "The level of the coordinate (0=ground level, +=above ground, -=below ground)", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "provider" : { + "type" : "string", + "description" : "The provider of the stop.", + "xml" : { + "attribute" : true + } + }, + "id" : { + "type" : "string", + "description" : "The internal id of the stop.", + "xml" : { + "attribute" : true + } + }, + "code" : { + "type" : "string", + "description" : "The optional code of the stop.", + "xml" : { + "attribute" : true + } + }, + "name" : { + "type" : "string", + "description" : "The name of the stop.", + "xml" : { + "attribute" : true + } + }, + "lines" : { + "type" : "array", + "description" : "The lines passing through the stop.", + "xml" : { + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/NetworkLine" + } + } + } + } ] + }, + "LineSchedule" : { + "required" : [ "code", "direction", "headsign", "name", "provider", "type" ], + "type" : "object", + "description" : "Represents the schedule for a particular line on a stop.", + "allOf" : [ { + "$ref" : "#/components/schemas/Line" + }, { + "type" : "object", + "properties" : { + "code" : { + "type" : "string", + "description" : "The short code of the line.", + "xml" : { + "attribute" : true + } + }, + "name" : { + "type" : "string", + "description" : "The name of the line.", + "xml" : { + "attribute" : true + } + }, + "type" : { + "type" : "string", + "description" : "Represents a line type of a public transit line.", + "xml" : { + "attribute" : true + }, + "enum" : [ "TRAM", "METRO", "RAIL", "BUS", "FERRY", "CABLECAR", "GONDOLA", "FUNICULAR", "TROLLEYBUS", "MONORAIL", "BIKE", "CAR" ] + }, + "direction" : { + "type" : "integer", + "description" : "The direction of the line.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "headsign" : { + "type" : "string", + "description" : "The headsign of the line.", + "xml" : { + "attribute" : true + } + }, + "color" : { + "type" : "string", + "description" : "The line color to be used as ARGB hex string.", + "xml" : { + "attribute" : true + } + }, + "agency" : { + "$ref" : "#/components/schemas/TransitAgency" + }, + "provider" : { + "type" : "string", + "description" : "The provider of the line.", + "xml" : { + "attribute" : true + } + }, + "departures" : { + "type" : "array", + "description" : "The planned departure times of the line at the stop.", + "xml" : { + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/RouteDateTime" + } + }, + "etas" : { + "type" : "array", + "description" : "The real-time arrival times of the line at the stop.", + "xml" : { + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/LineStatus" + } + }, + "incidents" : { + "type" : "array", + "description" : "The incidents that may affect the schedule of the line.", + "xml" : { + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/TransitIncident" + } + } + } + } ] + }, + "StopSchedule" : { + "required" : [ "id", "latitude", "level", "longitude", "name", "provider" ], + "type" : "object", + "description" : "Represents a schedule for the lines going through a stop.", + "allOf" : [ { + "$ref" : "#/components/schemas/AbstractStop" + }, { + "type" : "object", + "properties" : { + "longitude" : { + "type" : "number", + "description" : "The longitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "latitude" : { + "type" : "number", + "description" : "The latitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "level" : { + "type" : "integer", + "description" : "The level of the coordinate (0=ground level, +=above ground, -=below ground)", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "provider" : { + "type" : "string", + "description" : "The provider of the stop.", + "xml" : { + "attribute" : true + } + }, + "id" : { + "type" : "string", + "description" : "The internal id of the stop.", + "xml" : { + "attribute" : true + } + }, + "code" : { + "type" : "string", + "description" : "The optional code of the stop.", + "xml" : { + "attribute" : true + } + }, + "name" : { + "type" : "string", + "description" : "The name of the stop.", + "xml" : { + "attribute" : true + } + }, + "lines" : { + "type" : "array", + "description" : "The schedules for lines stopping at the stop.", + "xml" : { + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/LineSchedule" + } + } + } + } ] + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/carta_orig.json b/src/main/resources/carta_orig.json new file mode 100644 index 0000000..a82f32d --- /dev/null +++ b/src/main/resources/carta_orig.json @@ -0,0 +1,2945 @@ +{ + "openapi" : "3.0.0", + "info" : { + "title" : "LocosLab Carta Service", + "description" : "Locoslab Carta Service Api", + "termsOfService" : "https://www.locoslab.com", + "contact" : { + "name" : "LocosLab GmbH", + "url" : "https://www.locoslab.com", + "email" : "info@locoslab.com" + }, + "license" : { + "name" : "LocosLab License", + "url" : "https://www.locoslab.com" + }, + "version" : "1.0" + }, + "servers" : [ { + "url" : "/carta", + "description" : "LocosLab GmbH" + } ], + "paths" : { + "/location/{id}/geometry" : { + "get" : { + "tags" : [ "Carta", "Geo" ], + "summary" : "Returns the geometry for the location with the specified id.", + "operationId" : "getGeometry", + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "The location id to retrieve.", + "required" : true, + "schema" : { + "pattern" : "[a-zA-Z]+|.*", + "type" : "string" + } + }, { + "name" : "location", + "in" : "query", + "description" : "The user location specified as a coordinate (latitude,longitude) used as context for the name resolution.", + "schema" : { + "type" : "string" + }, + "example" : "50.689782,7.159647" + }, { + "name" : "uid", + "in" : "query", + "description" : "The globally unique user identifier which should be a UUID (if provided).", + "schema" : { + "type" : "string" + }, + "example" : "003b90ec-96cb-4262-ab90-49c966f4913b" + } ], + "responses" : { + "200" : { + "description" : "Geometry retrieved successfully.", + "content" : { + "application/geo+json" : { + "schema" : { + "$ref" : "#/components/schemas/GeoJsonObject" + } + } + } + }, + "400" : { + "description" : "Bad request parameters." + } + } + } + }, + "/location/{id}" : { + "get" : { + "tags" : [ "Carta", "Geo" ], + "summary" : "Returns the location with the specified id.", + "operationId" : "getLocation", + "parameters" : [ { + "name" : "id", + "in" : "path", + "description" : "The location id to retrieve.", + "required" : true, + "schema" : { + "pattern" : "[a-zA-Z]+|.*", + "type" : "string" + } + }, { + "name" : "location", + "in" : "query", + "description" : "The user location specified as a coordinate (latitude,longitude) used as context for the name resolution.", + "schema" : { + "type" : "string" + }, + "example" : "50.689782,7.159647" + }, { + "name" : "uid", + "in" : "query", + "description" : "The globally unique user identifier which should be a UUID (if provided).", + "schema" : { + "type" : "string" + }, + "example" : "003b90ec-96cb-4262-ab90-49c966f4913b" + } ], + "responses" : { + "200" : { + "description" : "Location retrieved successfully.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Location" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/Location" + } + } + } + }, + "400" : { + "description" : "Bad request parameters." + }, + "404" : { + "description" : "Location not found." + } + } + } + }, + "/location/search" : { + "get" : { + "tags" : [ "Carta", "Geo" ], + "summary" : "Returns a list of locations for a particular query.", + "operationId" : "searchLocations", + "parameters" : [ { + "name" : "q", + "in" : "query", + "description" : "The query to resolve (i.e. a name or a coordinate with latitude, longitude or a range of two coordinates).", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "type", + "in" : "query", + "description" : "A comma-separated list of location types to filter.", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "COUNTRY", "STATE", "COUNTY", "CITY", "SUBURB", "NEIGHBORHOOD", "LOCALITY", "STREET", "BUILDING", "TRANSIT", "PARKING", "ADMINISTRATION", "EDUCATION", "HEALTHCARE", "TOURISM", "INDOOR", "CHARGING" ] + } + } + }, { + "name" : "subtype", + "in" : "query", + "description" : "A comma-separated list of location sub types to filter.", + "schema" : { + "type" : "array", + "items" : { + "type" : "string", + "enum" : [ "INDOOR_DOORWAY", "INDOOR_ELEVATOR", "INDOOR_ESCALATOR", "INDOOR_RAMP", "INDOOR_STAIRS", "INDOOR_RESTROOM", "INDOOR_INFORMATION", "INDOOR_CHECKPOINT", "LEVEL_SAME", "LEVEL_UP", "LEVEL_DOWN", "LEVEL_UPDOWN", "LIMIT_MEN", "LIMIT_WOMEN", "LIMIT_UNISEX", "PASS_IN", "PASS_OUT", "PASS_INOUT", "TRANSIT_STATION", "TRANSIT_GROUP", "TRANSIT_TRAM", "TRANSIT_METRO", "TRANSIT_RAIL", "TRANSIT_BUS", "TRANSIT_FERRY", "TRANSIT_CABLECAR", "TRANSIT_GONDOLA", "TRANSIT_FUNICULAR", "TRANSIT_TROLLEYBUS", "TRANSIT_MONORAIL", "TRANSIT_BIKE", "TRANSIT_SCOOTER", "TRANSIT_CAR", "EDUCATION_SCHOOL", "EDUCATION_COLLEGE", "EDUCATION_UNIVERSITY", "HEALTHCARE_HOSPITAL", "HEALTH_SANATORIUM", "ADMINISTRATION_TOWNHALL", "TOURISM_WORSHIP", "TOURISM_ATTRACTION", "TOURISM_ARTWORK", "TOURISM_AQUARIUM", "TOURISM_ZOO", "TOURISM_MUSEUM", "TOURISM_GALLERY", "TOURISM_THEME_PARK", "TOURISM_VIEWPOINT", "TOURISM_PICNIC_SITE", "TOURISM_ALPINE_HUT", "TOURISM_INFORMATION", "TOURISM_HOTEL", "TOURISM_MOTEL", "TOURISM_HOSTEL", "TOURISM_APARTMENT", "TOURISM_CHALET", "TOURISM_GUEST_HOUSE", "TOURISM_CAMP_SITE", "TOURISM_CARAVAN_SITE", "CITY_CITY", "CITY_TOWN", "CITY_VILLAGE", "CITY_HAMLET", "CITY_DWELLING", "STREET_MOTORWAY", "STREET_MOTORWAY_LINK", "STREET_TRUNK", "STREET_TRUNK_LINK", "STREET_PRIMARY", "STREET_PRIMARY_LINK", "STREET_SECONDARY", "STREET_SECONDARY_LINK", "STREET_TERTIARY", "STREET_TERTIARY_LINK", "STREET_RESIDENTIAL", "STREET_LIVING_STREET", "STREET_SERVICE", "STREET_TRACK", "STREET_PEDESTRIAN", "STREET_SQUARE", "COUNTY_COUNTY", "COUNTY_DISTRICT", "COUNTY_REGION", "COUNTY_PROVINCE", "COUNTY_ISLAND", "COUNTY_POSTAL", "CHARGING_REGULAR", "CHARGING_QUICK", "CHARGING_DC_CHADEMO", "CHARGING_DC_COMBO", "CHARGING_AC_TYPE2", "CHARGING_AC_SCHUKO" ] + } + } + }, { + "name" : "limit", + "in" : "query", + "description" : "The maximum number of locations to return.", + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 3 + } + }, { + "name" : "location", + "in" : "query", + "description" : "The user location specified as a coordinate (latitude,longitude) used as context for the name resolution.", + "schema" : { + "type" : "string" + }, + "example" : "50.689782,7.159647" + }, { + "name" : "uid", + "in" : "query", + "description" : "The globally unique user identifier which should be a UUID (if provided).", + "schema" : { + "type" : "string" + }, + "example" : "003b90ec-96cb-4262-ab90-49c966f4913b" + } ], + "responses" : { + "200" : { + "description" : "Locations retrieved successfully.", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Location" + } + } + }, + "application/xml" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Location" + } + } + } + } + }, + "400" : { + "description" : "Bad request parameters." + } + } + } + }, + "/direction" : { + "get" : { + "tags" : [ "Carta", "Map" ], + "summary" : "Computes directions for reaching a destination from an origin.", + "operationId" : "getDirection", + "parameters" : [ { + "name" : "arrival_time", + "in" : "query", + "description" : "The desired arrival time in epoch seconds (from midnight January 1, 1970 UTC).", + "schema" : { + "type" : "integer", + "format" : "int64" + }, + "example" : 1478680000 + }, { + "name" : "departure_time", + "in" : "query", + "description" : "The desired departure time in epoch seconds (from midnight January 1, 1970 UTC). Set to now, if neither arrival nor departure time is specified.", + "schema" : { + "type" : "integer", + "format" : "int64" + }, + "example" : 1478680000 + }, { + "name" : "alternatives", + "in" : "query", + "description" : "The maximum number of alternative routes to compute.", + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 3 + }, + "example" : 5 + }, { + "name" : "origin", + "in" : "query", + "description" : "The origin of the route as name, coordinate (latitude,longitude) or coordinate with level (latitude,longitude,level).", + "required" : true, + "schema" : { + "type" : "string" + }, + "example" : "Bonn, Germany" + }, { + "name" : "destination", + "in" : "query", + "description" : "The destination of the route as name, coordinate (latitude,longitude) or coordinate with level (latitude,longitude,level).", + "required" : true, + "schema" : { + "type" : "string" + }, + "example" : "50.689782,7.159647,0" + }, { + "name" : "mode", + "in" : "query", + "description" : "The movement modality type of the routes to compute.", + "required" : true, + "schema" : { + "type" : "string" + }, + "example" : "walking" + }, { + "name" : "walking_speed", + "in" : "query", + "description" : "The walking speed (in meters per second) to compute the duration of walking steps.", + "schema" : { + "type" : "number", + "format" : "double", + "default" : 1.4 + }, + "example" : 2.0 + }, { + "name" : "transfer_time", + "in" : "query", + "description" : "The time period (in seconds) to introduce for transfers between vehicles in transit steps.", + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 120 + }, + "example" : 180 + }, { + "name" : "accessible", + "in" : "query", + "description" : "A flag to indicate that the routing should consider restrictions for persons with wheelchairs.", + "schema" : { + "type" : "boolean", + "default" : false + }, + "example" : true + }, { + "name" : "parking", + "in" : "query", + "description" : "A flag to indicate that a driving route should include a parking steop nearby the destination with a walking step to the final destination.", + "schema" : { + "type" : "boolean", + "default" : false + }, + "example" : true + }, { + "name" : "type", + "in" : "query", + "description" : "A list of vehicle types used during transit routing specified as a comma-separated list (0=tram, 1=subway, 2=rail, 3=bus, 4=ferry, 5=cablecar, 6=gondola, 7=funicular, 8=trolleybus, 9=monorail).", + "schema" : { + "type" : "string" + }, + "example" : "1,2,3" + }, { + "name" : "range", + "in" : "query", + "description" : "The time range in seconds for range raptor.", + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 5400 + }, + "example" : 3600 + }, { + "name" : "location", + "in" : "query", + "description" : "The user location specified as a coordinate (latitude,longitude) used as context for the name resolution.", + "schema" : { + "type" : "string" + }, + "example" : "50.689782,7.159647" + }, { + "name" : "uid", + "in" : "query", + "description" : "The globally unique user identifier which should be a UUID (if provided).", + "schema" : { + "type" : "string" + }, + "example" : "003b90ec-96cb-4262-ab90-49c966f4913b" + } ], + "responses" : { + "200" : { + "description" : "Directions computed successfully.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Direction" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/Direction" + } + } + } + }, + "400" : { + "description" : "Bad request parameters." + } + } + } + }, + "/network/line/{provider}" : { + "get" : { + "tags" : [ "Carta", "Map" ], + "summary" : "Returns the network lines for a stop id.", + "operationId" : "getLines", + "parameters" : [ { + "name" : "provider", + "in" : "path", + "description" : "Sets the identifier of the network provider.", + "required" : true, + "schema" : { + "pattern" : ".*", + "type" : "string" + }, + "example" : "transitemt" + }, { + "name" : "stop", + "in" : "query", + "description" : "The stop id of the stop to retrieve.", + "required" : true, + "schema" : { + "type" : "string" + }, + "example" : 1234 + } ], + "responses" : { + "200" : { + "description" : "Lines retrieved successfully.", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/NetworkLine" + } + } + }, + "application/xml" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/NetworkLine" + } + } + } + } + } + } + } + }, + "/network/schedule/{provider}" : { + "get" : { + "tags" : [ "Carta", "Map" ], + "summary" : "Returns the stop schedule for a stop id.", + "operationId" : "getSchedule", + "parameters" : [ { + "name" : "provider", + "in" : "path", + "description" : "Sets the identifier of the network provider.", + "required" : true, + "schema" : { + "pattern" : ".*", + "type" : "string" + }, + "example" : "transitemt" + }, { + "name" : "stop", + "in" : "query", + "description" : "The stop id of the stop to retrieve.", + "required" : true, + "schema" : { + "type" : "string" + }, + "example" : 1234 + }, { + "name" : "date", + "in" : "query", + "description" : "The date specified as YYYYMMDD.", + "required" : true, + "schema" : { + "type" : "string" + }, + "example" : 20150131 + }, { + "name" : "location", + "in" : "query", + "description" : "The user location specified as a coordinate (latitude,longitude) used as context for the name resolution.", + "schema" : { + "type" : "string" + }, + "example" : "50.689782,7.159647" + }, { + "name" : "uid", + "in" : "query", + "description" : "The globally unique user identifier which should be a UUID (if provided).", + "schema" : { + "type" : "string" + }, + "example" : "003b90ec-96cb-4262-ab90-49c966f4913b" + } ], + "responses" : { + "200" : { + "description" : "Stops retrieved successfully.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/StopSchedule" + } + }, + "application/xml" : { + "schema" : { + "$ref" : "#/components/schemas/StopSchedule" + } + } + } + } + } + } + }, + "/network/stop/{provider}" : { + "get" : { + "tags" : [ "Carta", "Map" ], + "summary" : "Returns the network stops around a partciular position.", + "operationId" : "getStops", + "parameters" : [ { + "name" : "provider", + "in" : "path", + "description" : "Legacy parameter that restricts the search to a single repository.", + "required" : true, + "schema" : { + "pattern" : ".*", + "type" : "string" + }, + "example" : "transitemt" + }, { + "name" : "q", + "in" : "query", + "description" : "A coordinate to retrieve the nearest stops defined as a WGS84 latitude,longitude.", + "required" : true, + "schema" : { + "type" : "string" + }, + "example" : "50.689782,7.159647" + }, { + "name" : "limit", + "in" : "query", + "description" : "The maximum number of results to return.", + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 3 + } + } ], + "responses" : { + "200" : { + "description" : "Stops retrieved successfully.", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/NetworkStop" + } + } + }, + "application/xml" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/NetworkStop" + } + } + } + } + } + } + } + }, + "/parking" : { + "get" : { + "tags" : [ "Carta", "Map" ], + "summary" : "Returns the parkings for a particular query.", + "operationId" : "getParkings", + "parameters" : [ { + "name" : "q", + "in" : "query", + "description" : "The query to resolve (i.e. a name or a coordinate with latitude, longitude or a range of two coordinates).", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "limit", + "in" : "query", + "description" : "The maximum number of locations to return.", + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : 3 + } + } ], + "responses" : { + "200" : { + "description" : "Parkings retrieved successfully.", + "content" : { + "application/json" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Parking" + } + } + }, + "application/xml" : { + "schema" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Parking" + } + } + } + } + }, + "400" : { + "description" : "Invalid request parameters." + } + } + } + }, + "/tile/{z}/{x}/{y}.jpg" : { + "get" : { + "tags" : [ "Carta", "Tile" ], + "summary" : "Returns a jpg for the x and y coordinate at the specified zoom level z.", + "operationId" : "getDefaultJpegTile", + "parameters" : [ { + "name" : "x", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "y", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "z", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "cache", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "enable" + } + }, { + "name" : "debug", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "disable" + } + }, { + "name" : "lang", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "default" + } + } ], + "responses" : { + "200" : { + "description" : "Image retrieved successfully.", + "content" : { + "image/jpeg " : { + "schema" : { + "type" : "string" + } + } + } + } + } + } + }, + "/tile/{z}/{x}/{y}.png" : { + "get" : { + "tags" : [ "Carta", "Tile" ], + "summary" : "Returns a png for the x and y coordinate at the specified zoom level z.", + "operationId" : "getDefaultPngTile", + "parameters" : [ { + "name" : "x", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "y", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "z", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "cache", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "enable" + } + }, { + "name" : "debug", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "disable" + } + }, { + "name" : "lang", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "default" + } + } ], + "responses" : { + "200" : { + "description" : "Image retrieved successfully.", + "content" : { + "image/png " : { + "schema" : { + "type" : "string" + } + } + } + } + } + } + }, + "/tile/{setup}/{z}/{x}/{y}.jpg" : { + "get" : { + "tags" : [ "Carta", "Tile" ], + "summary" : "Returns a jpg rendered with the specified setup for the x and y coordinate at the specified zoom level z.", + "operationId" : "getJpegTile", + "parameters" : [ { + "name" : "setup", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "x", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "y", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "z", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "cache", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "enable" + } + }, { + "name" : "debug", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "disable" + } + }, { + "name" : "lang", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "default" + } + } ], + "responses" : { + "200" : { + "description" : "Image retrieved successfully.", + "content" : { + "image/jpeg " : { + "schema" : { + "type" : "string" + } + } + } + } + } + } + }, + "/tile/{setup}/{z}/{x}/{y}.png" : { + "get" : { + "tags" : [ "Carta", "Tile" ], + "summary" : "Returns a png rendered with the specified setup for the x and y coordinate at the specified zoom level z.", + "operationId" : "getPngTile", + "parameters" : [ { + "name" : "setup", + "in" : "path", + "required" : true, + "schema" : { + "type" : "string" + } + }, { + "name" : "x", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "y", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "z", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "cache", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "enable" + } + }, { + "name" : "debug", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "disable" + } + }, { + "name" : "lang", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "default" + } + } ], + "responses" : { + "200" : { + "description" : "Image retrieved successfully.", + "content" : { + "image/png " : { + "schema" : { + "type" : "string" + } + } + } + } + } + } + }, + "/tile/{z}/{x}/{y}.geojson" : { + "get" : { + "tags" : [ "Carta", "Tile" ], + "summary" : "Retrieves the vector data for a particular x, y tile at a specific zoom level z.", + "operationId" : "getFeatures", + "parameters" : [ { + "name" : "x", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "y", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "z", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "precision", + "in" : "query", + "schema" : { + "type" : "integer", + "format" : "int32", + "default" : -1 + } + }, { + "name" : "rings", + "in" : "query", + "schema" : { + "type" : "boolean", + "default" : true + } + }, { + "name" : "filterId", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "0" + } + } ], + "responses" : { + "200" : { + "description" : "Features retrieved successfully.", + "content" : { + "application/geo+json" : { + "schema" : { + "$ref" : "#/components/schemas/FeatureCollection" + } + } + } + }, + "400" : { + "description" : "Bad request parameters." + } + } + } + }, + "/tile/{z}/{x}/{y}.bin" : { + "get" : { + "tags" : [ "Carta", "Tile" ], + "summary" : "Retrieves the vector data for the map tile x/y at zoom level z in a compact, binary format.", + "operationId" : "getBinaryVectorTile", + "parameters" : [ { + "name" : "x", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "y", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "z", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "filterId", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "0" + } + }, { + "name" : "clipping", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "yes" + } + }, { + "name" : "zoomOffset", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "0" + } + } ], + "responses" : { + "200" : { + "description" : "Tile retrieved successfully.", + "content" : { + "application/octet-stream" : { + "schema" : { + "type" : "string" + } + } + } + }, + "400" : { + "description" : "Bad request parameters." + } + } + } + }, + "/tile/{z}/{x}/{y}.json" : { + "get" : { + "tags" : [ "Carta", "Tile" ], + "summary" : "Retrieves the vector data for the map tile x/y at zoom level z as a GeoJSON feature collection.", + "operationId" : "getGeoJsonVectorTile", + "parameters" : [ { + "name" : "x", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "y", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "z", + "in" : "path", + "required" : true, + "schema" : { + "type" : "integer", + "format" : "int32" + } + }, { + "name" : "filterId", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "0" + } + }, { + "name" : "clipping", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "yes" + } + }, { + "name" : "zoomOffset", + "in" : "query", + "schema" : { + "type" : "string", + "default" : "0" + } + } ], + "responses" : { + "200" : { + "description" : "Tile retrieved successfully.", + "content" : { + "application/geo+json" : { + "schema" : { + "$ref" : "#/components/schemas/FeatureCollection" + } + } + } + }, + "400" : { + "description" : "Bad request parameters." + } + } + } + } + }, + "components" : { + "schemas" : { + "Crs" : { + "type" : "object", + "properties" : { + "type" : { + "type" : "string", + "enum" : [ "name", "link" ] + }, + "properties" : { + "type" : "object", + "additionalProperties" : { + "type" : "object" + } + } + } + }, + "Feature" : { + "type" : "object", + "properties" : { + "crs" : { + "$ref" : "#/components/schemas/Crs" + }, + "bbox" : { + "type" : "array", + "items" : { + "type" : "number", + "format" : "double" + } + }, + "properties" : { + "type" : "object", + "additionalProperties" : { + "type" : "object" + } + }, + "geometry" : { + "$ref" : "#/components/schemas/GeoJsonObject" + }, + "id" : { + "type" : "string" + } + } + }, + "FeatureCollection" : { + "type" : "object", + "properties" : { + "crs" : { + "$ref" : "#/components/schemas/Crs" + }, + "bbox" : { + "type" : "array", + "items" : { + "type" : "number", + "format" : "double" + } + }, + "features" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/Feature" + } + } + } + }, + "GeoJsonObject" : { + "required" : [ "type" ], + "type" : "object", + "properties" : { + "crs" : { + "$ref" : "#/components/schemas/Crs" + }, + "bbox" : { + "type" : "array", + "items" : { + "type" : "number", + "format" : "double" + } + }, + "type" : { + "type" : "string" + } + }, + "discriminator" : { + "propertyName" : "type" + } + }, + "GeometryCollection" : { + "type" : "object", + "allOf" : [ { + "$ref" : "#/components/schemas/GeoJsonObject" + }, { + "type" : "object", + "properties" : { + "geometries" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/GeoJsonObject" + } + } + } + } ] + }, + "LineString" : { + "type" : "object", + "allOf" : [ { + "$ref" : "#/components/schemas/GeoJsonObject" + }, { + "type" : "object", + "properties" : { + "coordinates" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/LngLatAlt" + } + } + } + } ] + }, + "LngLatAlt" : { + "type" : "object", + "properties" : { + "longitude" : { + "type" : "number", + "format" : "double" + }, + "latitude" : { + "type" : "number", + "format" : "double" + }, + "altitude" : { + "type" : "number", + "format" : "double" + }, + "additionalElements" : { + "type" : "array", + "items" : { + "type" : "number", + "format" : "double" + } + } + } + }, + "MultiLineString" : { + "type" : "object", + "allOf" : [ { + "$ref" : "#/components/schemas/GeoJsonObject" + }, { + "type" : "object", + "properties" : { + "coordinates" : { + "type" : "array", + "items" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/LngLatAlt" + } + } + } + } + } ] + }, + "MultiPoint" : { + "type" : "object", + "allOf" : [ { + "$ref" : "#/components/schemas/GeoJsonObject" + }, { + "type" : "object", + "properties" : { + "coordinates" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/LngLatAlt" + } + } + } + } ] + }, + "MultiPolygon" : { + "type" : "object", + "allOf" : [ { + "$ref" : "#/components/schemas/GeoJsonObject" + }, { + "type" : "object", + "properties" : { + "coordinates" : { + "type" : "array", + "items" : { + "type" : "array", + "items" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/LngLatAlt" + } + } + } + } + } + } ] + }, + "Point" : { + "type" : "object", + "allOf" : [ { + "$ref" : "#/components/schemas/GeoJsonObject" + }, { + "type" : "object", + "properties" : { + "coordinates" : { + "$ref" : "#/components/schemas/LngLatAlt" + } + } + } ] + }, + "Polygon" : { + "type" : "object", + "allOf" : [ { + "$ref" : "#/components/schemas/GeoJsonObject" + }, { + "type" : "object", + "properties" : { + "coordinates" : { + "type" : "array", + "items" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/LngLatAlt" + } + } + } + } + } ] + }, + "Coordinate" : { + "required" : [ "latitude", "longitude" ], + "type" : "object", + "properties" : { + "longitude" : { + "type" : "number", + "description" : "The longitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "latitude" : { + "type" : "number", + "description" : "The latitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + } + }, + "description" : "Represents a WGS84 coordinate with longitude and latitude." + }, + "LevelCoordinate" : { + "required" : [ "latitude", "level", "longitude" ], + "type" : "object", + "description" : "Represents a coordinate on a level.", + "allOf" : [ { + "$ref" : "#/components/schemas/Coordinate" + }, { + "type" : "object", + "properties" : { + "longitude" : { + "type" : "number", + "description" : "The longitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "latitude" : { + "type" : "number", + "description" : "The latitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "level" : { + "type" : "integer", + "description" : "The level of the coordinate (0=ground level, +=above ground, -=below ground)", + "format" : "int32", + "xml" : { + "attribute" : true + } + } + } + } ] + }, + "Location" : { + "required" : [ "id", "latitude", "level", "longitude", "subtypes", "type" ], + "type" : "object", + "description" : "Represents an address or place at a particular location.", + "allOf" : [ { + "$ref" : "#/components/schemas/LevelCoordinate" + }, { + "type" : "object", + "properties" : { + "longitude" : { + "type" : "number", + "description" : "The longitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "latitude" : { + "type" : "number", + "description" : "The latitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "level" : { + "type" : "integer", + "description" : "The level of the coordinate (0=ground level, +=above ground, -=below ground)", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "type" : { + "type" : "string", + "description" : "The type of the address.", + "xml" : { + "attribute" : true + }, + "enum" : [ "COUNTRY", "STATE", "COUNTY", "CITY", "SUBURB", "NEIGHBORHOOD", "LOCALITY", "STREET", "BUILDING", "TRANSIT", "PARKING", "ADMINISTRATION", "EDUCATION", "HEALTHCARE", "TOURISM", "INDOOR", "CHARGING" ] + }, + "id" : { + "type" : "string", + "description" : "A unique id for this location.", + "xml" : { + "attribute" : true + } + }, + "subtypes" : { + "type" : "array", + "description" : "The subtype of the address.", + "items" : { + "type" : "string", + "description" : "The subtype of the address.", + "enum" : [ "INDOOR_DOORWAY", "INDOOR_ELEVATOR", "INDOOR_ESCALATOR", "INDOOR_RAMP", "INDOOR_STAIRS", "INDOOR_RESTROOM", "INDOOR_INFORMATION", "INDOOR_CHECKPOINT", "LEVEL_SAME", "LEVEL_UP", "LEVEL_DOWN", "LEVEL_UPDOWN", "LIMIT_MEN", "LIMIT_WOMEN", "LIMIT_UNISEX", "PASS_IN", "PASS_OUT", "PASS_INOUT", "TRANSIT_STATION", "TRANSIT_GROUP", "TRANSIT_TRAM", "TRANSIT_METRO", "TRANSIT_RAIL", "TRANSIT_BUS", "TRANSIT_FERRY", "TRANSIT_CABLECAR", "TRANSIT_GONDOLA", "TRANSIT_FUNICULAR", "TRANSIT_TROLLEYBUS", "TRANSIT_MONORAIL", "TRANSIT_BIKE", "TRANSIT_SCOOTER", "TRANSIT_CAR", "EDUCATION_SCHOOL", "EDUCATION_COLLEGE", "EDUCATION_UNIVERSITY", "HEALTHCARE_HOSPITAL", "HEALTH_SANATORIUM", "ADMINISTRATION_TOWNHALL", "TOURISM_WORSHIP", "TOURISM_ATTRACTION", "TOURISM_ARTWORK", "TOURISM_AQUARIUM", "TOURISM_ZOO", "TOURISM_MUSEUM", "TOURISM_GALLERY", "TOURISM_THEME_PARK", "TOURISM_VIEWPOINT", "TOURISM_PICNIC_SITE", "TOURISM_ALPINE_HUT", "TOURISM_INFORMATION", "TOURISM_HOTEL", "TOURISM_MOTEL", "TOURISM_HOSTEL", "TOURISM_APARTMENT", "TOURISM_CHALET", "TOURISM_GUEST_HOUSE", "TOURISM_CAMP_SITE", "TOURISM_CARAVAN_SITE", "CITY_CITY", "CITY_TOWN", "CITY_VILLAGE", "CITY_HAMLET", "CITY_DWELLING", "STREET_MOTORWAY", "STREET_MOTORWAY_LINK", "STREET_TRUNK", "STREET_TRUNK_LINK", "STREET_PRIMARY", "STREET_PRIMARY_LINK", "STREET_SECONDARY", "STREET_SECONDARY_LINK", "STREET_TERTIARY", "STREET_TERTIARY_LINK", "STREET_RESIDENTIAL", "STREET_LIVING_STREET", "STREET_SERVICE", "STREET_TRACK", "STREET_PEDESTRIAN", "STREET_SQUARE", "COUNTY_COUNTY", "COUNTY_DISTRICT", "COUNTY_REGION", "COUNTY_PROVINCE", "COUNTY_ISLAND", "COUNTY_POSTAL", "CHARGING_REGULAR", "CHARGING_QUICK", "CHARGING_DC_CHADEMO", "CHARGING_DC_COMBO", "CHARGING_AC_TYPE2", "CHARGING_AC_SCHUKO" ] + } + }, + "country" : { + "type" : "string", + "description" : "The enclosing country.", + "xml" : { + "attribute" : true + } + }, + "state" : { + "type" : "string", + "description" : "The enclosing state.", + "xml" : { + "attribute" : true + } + }, + "county" : { + "type" : "string", + "description" : "The enclosing region.", + "xml" : { + "attribute" : true + } + }, + "city" : { + "type" : "string", + "description" : "The city name.", + "xml" : { + "attribute" : true + } + }, + "suburb" : { + "type" : "string", + "description" : "The enclosing suburb.", + "xml" : { + "attribute" : true + } + }, + "neighborhood" : { + "type" : "string", + "description" : "The enclosing neighborhood.", + "xml" : { + "attribute" : true + } + }, + "locality" : { + "type" : "string", + "description" : "The enclosing locality.", + "xml" : { + "attribute" : true + } + }, + "street" : { + "type" : "string", + "description" : "The street.", + "xml" : { + "attribute" : true + } + }, + "building" : { + "type" : "string", + "description" : "The building number.", + "xml" : { + "attribute" : true + } + }, + "postcode" : { + "type" : "string", + "description" : "The post code.", + "xml" : { + "attribute" : true + } + }, + "name" : { + "type" : "string", + "description" : "The name of the place.", + "xml" : { + "attribute" : true + } + }, + "links" : { + "type" : "object", + "additionalProperties" : { + "type" : "string", + "description" : "The links to external sytems." + }, + "description" : "The links to external sytems." + } + } + } ] + }, + "AbstractStop" : { + "required" : [ "id", "latitude", "level", "longitude", "name", "provider" ], + "type" : "object", + "description" : "Represents a stop in the transit network.", + "allOf" : [ { + "$ref" : "#/components/schemas/LevelCoordinate" + }, { + "type" : "object", + "properties" : { + "longitude" : { + "type" : "number", + "description" : "The longitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "latitude" : { + "type" : "number", + "description" : "The latitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "level" : { + "type" : "integer", + "description" : "The level of the coordinate (0=ground level, +=above ground, -=below ground)", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "provider" : { + "type" : "string", + "description" : "The provider of the stop.", + "xml" : { + "attribute" : true + } + }, + "id" : { + "type" : "string", + "description" : "The internal id of the stop.", + "xml" : { + "attribute" : true + } + }, + "code" : { + "type" : "string", + "description" : "The optional code of the stop.", + "xml" : { + "attribute" : true + } + }, + "name" : { + "type" : "string", + "description" : "The name of the stop.", + "xml" : { + "attribute" : true + } + } + } + } ] + }, + "CyclingStep" : { + "required" : [ "distance", "startTime", "stopTime" ], + "type" : "object", + "description" : "A step to be taken by bicycle.", + "allOf" : [ { + "$ref" : "#/components/schemas/StreetStep" + }, { + "type" : "object", + "properties" : { + "coordinates" : { + "type" : "string", + "description" : "A sequence of coordinates as string encoded polyline.", + "xml" : { + "attribute" : true + } + }, + "startTime" : { + "type" : "integer", + "description" : "The start time in seconds from midnight.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "stopTime" : { + "type" : "integer", + "description" : "The stop time in seconds from midnight.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "distance" : { + "type" : "number", + "description" : "The distance traveled by this step in meters.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "summaries" : { + "type" : "array", + "description" : "Optional textual summary of the step.", + "xml" : { + "wrapped" : true + }, + "items" : { + "type" : "string", + "description" : "Optional textual summary of the step.", + "xml" : { + "name" : "summary" + } + } + }, + "segments" : { + "type" : "array", + "description" : "The street segments to follow.", + "xml" : { + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/StreetSegment" + } + } + } + }, { + "$ref" : "#/components/schemas/Step" + } ] + }, + "Direction" : { + "type" : "object", + "properties" : { + "routes" : { + "type" : "array", + "description" : "A sequence of alternative routes.", + "xml" : { + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/Route" + } + } + }, + "description" : "Represents a response to a route request." + }, + "DrivingStep" : { + "required" : [ "distance", "startTime", "stopTime" ], + "type" : "object", + "description" : "A step to be taken by car.", + "allOf" : [ { + "$ref" : "#/components/schemas/StreetStep" + }, { + "$ref" : "#/components/schemas/Step" + } ] + }, + "Emission" : { + "type" : "object", + "properties" : { + "carbonDioxide" : { + "type" : "number", + "description" : "Carbon dioxide emissions in g.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "carbonMonoxide" : { + "type" : "number", + "description" : "Carbon monoxide emissions in g.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "hydroCarbons" : { + "type" : "number", + "description" : "Hydro carbons emissions in g.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "nitrogenOxides" : { + "type" : "number", + "description" : "Nitrogen oxides emissions in g.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "particles" : { + "type" : "number", + "description" : "Particles in g.", + "format" : "double", + "xml" : { + "attribute" : true + } + } + }, + "description" : "Represents the pollutant emissions of a route." + }, + "IndoorSegment" : { + "required" : [ "distance", "duration", "endLevel", "exit", "startLevel", "turn", "type" ], + "type" : "object", + "description" : "A particular way segment in an indoor environment.", + "allOf" : [ { + "$ref" : "#/components/schemas/Segment" + }, { + "type" : "object", + "properties" : { + "coordinates" : { + "type" : "string", + "description" : "A sequence of coordinates as string encoded polyline.", + "xml" : { + "attribute" : true + } + }, + "duration" : { + "type" : "integer", + "description" : "The duration in seconds.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "distance" : { + "type" : "number", + "description" : "The distance traveled by this segment in meters.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "type" : { + "type" : "string", + "description" : "Represents the type of the street.", + "xml" : { + "attribute" : true + }, + "enum" : [ "OTHER", "MOTORWAY", "TRUNK", "PRIMARY", "SECONDARY", "TERTIARY", "UNCLASSIFIED", "RESIDENTIAL", "SERVICE", "MOTORWAY_LINK", "TRUNK_LINK", "PRIMARY_LINK", "SECONDARY_LINK", "TERTIARY_LINK", "LIVING_STREET", "PEDESTRIAN", "TRACK", "FOOTWAY", "CYCLEWAY", "BRIDLEWAY", "STEPS", "PATH" ] + }, + "turn" : { + "type" : "string", + "description" : "Represents the type of turn to be made.", + "xml" : { + "attribute" : true + }, + "enum" : [ "CONTINUE", "KEEP_LEFT", "SLIGHT_LEFT", "TURN_LEFT", "SHARP_LEFT", "KEEP_RIGHT", "SLIGHT_RIGHT", "TURN_RIGHT", "SHARP_RIGHT", "U_TURN", "ROUND_ABOUT" ] + }, + "exit" : { + "type" : "integer", + "description" : "The exit number for round abouts or 0, if the type is not roundabout.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "startLevel" : { + "type" : "integer", + "description" : "The level of the segment.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "endLevel" : { + "type" : "integer", + "description" : "The end level of the segment.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "zoneName" : { + "type" : "string", + "description" : "The name of the zone through which the segment runs.", + "xml" : { + "attribute" : true + } + }, + "summaries" : { + "type" : "array", + "description" : "Optional textual summary of the segment which jointly describe the step.", + "xml" : { + "wrapped" : true + }, + "items" : { + "type" : "string", + "description" : "Optional textual summary of the segment which jointly describe the step.", + "xml" : { + "name" : "summary" + } + } + }, + "notifications" : { + "type" : "array", + "description" : "Optional textual notifications to be shown during the segment.", + "xml" : { + "wrapped" : true + }, + "items" : { + "type" : "string", + "description" : "Optional textual notifications to be shown during the segment.", + "xml" : { + "name" : "notification" + } + } + } + } + } ] + }, + "IndoorStep" : { + "required" : [ "distance", "startTime", "stopTime" ], + "type" : "object", + "description" : "Represents a step to be taken in a building.", + "allOf" : [ { + "$ref" : "#/components/schemas/Step" + }, { + "type" : "object", + "properties" : { + "segments" : { + "type" : "array", + "description" : "The segments of the step.", + "xml" : { + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/IndoorSegment" + } + } + } + } ] + }, + "Line" : { + "required" : [ "code", "direction", "headsign", "name", "provider", "type" ], + "type" : "object", + "properties" : { + "code" : { + "type" : "string", + "description" : "The short code of the line.", + "xml" : { + "attribute" : true + } + }, + "name" : { + "type" : "string", + "description" : "The name of the line.", + "xml" : { + "attribute" : true + } + }, + "type" : { + "type" : "string", + "description" : "Represents a line type of a public transit line.", + "xml" : { + "attribute" : true + }, + "enum" : [ "TRAM", "METRO", "RAIL", "BUS", "FERRY", "CABLECAR", "GONDOLA", "FUNICULAR", "TROLLEYBUS", "MONORAIL", "BIKE", "CAR" ] + }, + "direction" : { + "type" : "integer", + "description" : "The direction of the line.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "headsign" : { + "type" : "string", + "description" : "The headsign of the line.", + "xml" : { + "attribute" : true + } + }, + "color" : { + "type" : "string", + "description" : "The line color to be used as ARGB hex string.", + "xml" : { + "attribute" : true + } + }, + "agency" : { + "$ref" : "#/components/schemas/TransitAgency" + }, + "provider" : { + "type" : "string", + "description" : "The provider of the line.", + "xml" : { + "attribute" : true + } + } + }, + "description" : "Represents information about a transit line." + }, + "LineStatus" : { + "type" : "object", + "properties" : { + "scheduledDeparture" : { + "$ref" : "#/components/schemas/RouteDateTime" + }, + "expectedDeparture" : { + "$ref" : "#/components/schemas/RouteDateTime" + }, + "expectedPlatform" : { + "type" : "string", + "description" : "The expected departure platform.", + "xml" : { + "attribute" : true + } + }, + "canceled" : { + "type" : "boolean", + "description" : "A flag to indicate whether the trip is cancelled.", + "xml" : { + "attribute" : true + } + } + }, + "description" : "Represents an upcoming departure with real-time updates." + }, + "Parking" : { + "required" : [ "accessibility", "free", "latitude", "longitude", "side", "time", "total", "type" ], + "type" : "object", + "description" : "Represents a parking at a particular geographic coordinate.", + "allOf" : [ { + "$ref" : "#/components/schemas/Coordinate" + }, { + "type" : "object", + "properties" : { + "longitude" : { + "type" : "number", + "description" : "The longitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "latitude" : { + "type" : "number", + "description" : "The latitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "name" : { + "type" : "string", + "description" : "The optional name of the parking.", + "xml" : { + "attribute" : true + } + }, + "type" : { + "type" : "string", + "description" : "Represents the type of parking.", + "xml" : { + "attribute" : true + }, + "enum" : [ "STREET", "BAY", "LOT", "GARAGE" ] + }, + "side" : { + "type" : "string", + "description" : "Represents the side on which the parking is located.", + "xml" : { + "attribute" : true + }, + "enum" : [ "NONE", "LEFT", "RIGHT" ] + }, + "accessibility" : { + "type" : "string", + "description" : "Represents the wheel chair accessiblity of the parking.", + "xml" : { + "attribute" : true + }, + "enum" : [ "UNKNOWN", "NONE", "PARTIALLY", "FULLY" ] + }, + "total" : { + "type" : "integer", + "description" : "The total number of spaces at the location.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "free" : { + "type" : "integer", + "description" : "The number of free spaces at the location or -1 if not known.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "time" : { + "type" : "integer", + "description" : "The time of the last update of the free spaces information or -1, if the update time is not available or the free spaces are not determined.", + "format" : "int64", + "xml" : { + "attribute" : true + } + }, + "code" : { + "type" : "string", + "description" : "The provider-specific code of the parking place.", + "xml" : { + "attribute" : true + } + }, + "provider" : { + "type" : "string", + "description" : "The provider of the parking place.", + "xml" : { + "attribute" : true + } + } + } + } ] + }, + "ParkingStep" : { + "required" : [ "distance", "parking", "startTime", "stopTime" ], + "type" : "object", + "description" : "A step to represent the parking of a car at a particular parking.", + "allOf" : [ { + "$ref" : "#/components/schemas/Step" + }, { + "type" : "object", + "properties" : { + "parking" : { + "$ref" : "#/components/schemas/Parking" + } + } + } ] + }, + "Route" : { + "required" : [ "distance", "duration", "sourceCoordinate", "sourceLevel", "targetCoordinate", "targetLevel" ], + "type" : "object", + "properties" : { + "sourceCoordinate" : { + "$ref" : "#/components/schemas/Coordinate" + }, + "targetCoordinate" : { + "$ref" : "#/components/schemas/Coordinate" + }, + "sourceLevel" : { + "type" : "integer", + "description" : "The level of the source coordinate.", + "format" : "int32" + }, + "targetLevel" : { + "type" : "integer", + "description" : "The level of the target coordinate.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "distance" : { + "type" : "number", + "description" : "The total distance in meters.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "duration" : { + "type" : "integer", + "description" : "The total trip duration in seconds.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "emission" : { + "$ref" : "#/components/schemas/Emission" + }, + "steps" : { + "type" : "array", + "description" : "The sequence of steps to take.", + "xml" : { + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/Step" + } + } + }, + "description" : "Represents a number of steps that lead from an origin to a destination." + }, + "RouteDateTime" : { + "required" : [ "date", "time" ], + "type" : "object", + "properties" : { + "time" : { + "type" : "integer", + "description" : "The time in seconds from midnight.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "date" : { + "type" : "string", + "description" : "The date provided as YYYYMMDD.", + "example" : "20111231", + "xml" : { + "attribute" : true + } + } + }, + "description" : "Represents a date and time." + }, + "ScooterStep" : { + "required" : [ "distance", "startTime", "stopTime" ], + "type" : "object", + "description" : "A step to be taken by e-scooter.", + "allOf" : [ { + "$ref" : "#/components/schemas/StreetStep" + }, { + "$ref" : "#/components/schemas/Step" + } ] + }, + "Segment" : { + "required" : [ "distance", "duration", "exit", "turn", "type" ], + "type" : "object", + "properties" : { + "coordinates" : { + "type" : "string", + "description" : "A sequence of coordinates as string encoded polyline.", + "xml" : { + "attribute" : true + } + }, + "duration" : { + "type" : "integer", + "description" : "The duration in seconds.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "distance" : { + "type" : "number", + "description" : "The distance traveled by this segment in meters.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "type" : { + "type" : "string", + "description" : "Represents the type of the street.", + "xml" : { + "attribute" : true + }, + "enum" : [ "OTHER", "MOTORWAY", "TRUNK", "PRIMARY", "SECONDARY", "TERTIARY", "UNCLASSIFIED", "RESIDENTIAL", "SERVICE", "MOTORWAY_LINK", "TRUNK_LINK", "PRIMARY_LINK", "SECONDARY_LINK", "TERTIARY_LINK", "LIVING_STREET", "PEDESTRIAN", "TRACK", "FOOTWAY", "CYCLEWAY", "BRIDLEWAY", "STEPS", "PATH" ] + }, + "turn" : { + "type" : "string", + "description" : "Represents the type of turn to be made.", + "xml" : { + "attribute" : true + }, + "enum" : [ "CONTINUE", "KEEP_LEFT", "SLIGHT_LEFT", "TURN_LEFT", "SHARP_LEFT", "KEEP_RIGHT", "SLIGHT_RIGHT", "TURN_RIGHT", "SHARP_RIGHT", "U_TURN", "ROUND_ABOUT" ] + }, + "exit" : { + "type" : "integer", + "description" : "The exit number for round abouts or 0, if the type is not roundabout.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "summaries" : { + "type" : "array", + "description" : "Optional textual summary of the segment which jointly describe the step.", + "xml" : { + "wrapped" : true + }, + "items" : { + "type" : "string", + "description" : "Optional textual summary of the segment which jointly describe the step.", + "xml" : { + "name" : "summary" + } + } + } + }, + "description" : "Represents a common base class for segments in steps." + }, + "Step" : { + "required" : [ "distance", "startTime", "stopTime", "type" ], + "type" : "object", + "properties" : { + "coordinates" : { + "type" : "string", + "description" : "A sequence of coordinates as string encoded polyline.", + "xml" : { + "attribute" : true + } + }, + "startTime" : { + "type" : "integer", + "description" : "The start time in seconds from midnight.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "stopTime" : { + "type" : "integer", + "description" : "The stop time in seconds from midnight.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "distance" : { + "type" : "number", + "description" : "The distance traveled by this step in meters.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "summaries" : { + "type" : "array", + "description" : "Optional textual summary of the step.", + "xml" : { + "wrapped" : true + }, + "items" : { + "type" : "string", + "description" : "Optional textual summary of the step.", + "xml" : { + "name" : "summary" + } + } + }, + "type" : { + "type" : "string" + } + }, + "description" : "The sequence of steps to take.", + "discriminator" : { + "propertyName" : "type", + "mapping" : { + "TransitStep" : "#/components/schemas/TransitStep", + "ParkingStep" : "#/components/schemas/ParkingStep", + "DrivingStep" : "#/components/schemas/DrivingStep", + "CyclingStep" : "#/components/schemas/CyclingStep", + "ScooterStep" : "#/components/schemas/ScooterStep", + "WalkingStep" : "#/components/schemas/WalkingStep", + "IndoorStep" : "#/components/schemas/IndoorStep" + } + }, + "anyOf" : [ { + "$ref" : "#/components/schemas/TransitStep" + }, { + "$ref" : "#/components/schemas/ParkingStep" + }, { + "$ref" : "#/components/schemas/DrivingStep" + }, { + "$ref" : "#/components/schemas/CyclingStep" + }, { + "$ref" : "#/components/schemas/ScooterStep" + }, { + "$ref" : "#/components/schemas/WalkingStep" + }, { + "$ref" : "#/components/schemas/IndoorStep" + } ] + }, + "StreetSegment" : { + "required" : [ "distance", "duration", "exit", "turn", "type" ], + "type" : "object", + "description" : "A path on a particular road.", + "allOf" : [ { + "$ref" : "#/components/schemas/Segment" + }, { + "type" : "object", + "properties" : { + "coordinates" : { + "type" : "string", + "description" : "A sequence of coordinates as string encoded polyline.", + "xml" : { + "attribute" : true + } + }, + "duration" : { + "type" : "integer", + "description" : "The duration in seconds.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "distance" : { + "type" : "number", + "description" : "The distance traveled by this segment in meters.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "type" : { + "type" : "string", + "description" : "Represents the type of the street.", + "xml" : { + "attribute" : true + }, + "enum" : [ "OTHER", "MOTORWAY", "TRUNK", "PRIMARY", "SECONDARY", "TERTIARY", "UNCLASSIFIED", "RESIDENTIAL", "SERVICE", "MOTORWAY_LINK", "TRUNK_LINK", "PRIMARY_LINK", "SECONDARY_LINK", "TERTIARY_LINK", "LIVING_STREET", "PEDESTRIAN", "TRACK", "FOOTWAY", "CYCLEWAY", "BRIDLEWAY", "STEPS", "PATH" ] + }, + "turn" : { + "type" : "string", + "description" : "Represents the type of turn to be made.", + "xml" : { + "attribute" : true + }, + "enum" : [ "CONTINUE", "KEEP_LEFT", "SLIGHT_LEFT", "TURN_LEFT", "SHARP_LEFT", "KEEP_RIGHT", "SLIGHT_RIGHT", "TURN_RIGHT", "SHARP_RIGHT", "U_TURN", "ROUND_ABOUT" ] + }, + "exit" : { + "type" : "integer", + "description" : "The exit number for round abouts or 0, if the type is not roundabout.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "road" : { + "type" : "string", + "description" : "The name of the road.", + "xml" : { + "attribute" : true + } + }, + "summaries" : { + "type" : "array", + "description" : "Optional textual summary of the segment which jointly describe the step.", + "xml" : { + "wrapped" : true + }, + "items" : { + "type" : "string", + "description" : "Optional textual summary of the segment which jointly describe the step.", + "xml" : { + "name" : "summary" + } + } + } + } + } ] + }, + "StreetStep" : { + "required" : [ "distance", "startTime", "stopTime", "type" ], + "type" : "object", + "properties" : { + "type" : { + "type" : "string" + } + }, + "description" : "Represents a step within a vehicle that runs on a particular road in which the user will enter with a particular turn.", + "discriminator" : { + "propertyName" : "type", + "mapping" : { + "WalkingStep" : "#/components/schemas/WalkingStep", + "DrivingStep" : "#/components/schemas/DrivingStep", + "CyclingStep" : "#/components/schemas/CyclingStep", + "ScooterStep" : "#/components/schemas/ScooterStep" + } + }, + "allOf" : [ { + "$ref" : "#/components/schemas/Step" + } ], + "anyOf" : [ { + "$ref" : "#/components/schemas/WalkingStep" + }, { + "$ref" : "#/components/schemas/CyclingStep" + }, { + "$ref" : "#/components/schemas/DrivingStep" + }, { + "$ref" : "#/components/schemas/ScooterStep" + } ] + }, + "TransitAgency" : { + "required" : [ "name" ], + "type" : "object", + "properties" : { + "name" : { + "type" : "string", + "description" : "The name of the agency.", + "xml" : { + "attribute" : true + } + }, + "url" : { + "type" : "string", + "description" : "An url to the agency.", + "xml" : { + "attribute" : true + } + } + }, + "description" : "Represents a transport network operator." + }, + "TransitIncident" : { + "required" : [ "cause", "effect", "translated" ], + "type" : "object", + "properties" : { + "cause" : { + "type" : "string", + "description" : "Represents the reason for an incident.", + "xml" : { + "attribute" : true + }, + "enum" : [ "UNKNOWN_CAUSE", "OTHER_CAUSE", "TECHNICAL_PROBLEM", "STRIKE", "DEMONSTRATION", "ACCIDENT", "HOLIDAY", "WEATHER", "MAINTENANCE", "CONSTRUCTION", "POLICE_ACTIVITY", "MEDICAL_EMERGENCY", "SOCIAL_CULTURAL_EVENT" ] + }, + "effect" : { + "type" : "string", + "description" : "Represents the effect of an incident.", + "xml" : { + "attribute" : true + }, + "enum" : [ "NO_SERVICE", "REDUCED_SERVICE", "SIGNIFICANT_DELAYS", "DETOUR", "ADDITIONAL_SERVICE", "MODIFIED_SERVICE", "OTHER_EFFECT", "UNKNOWN_EFFECT", "STOP_MOVED" ] + }, + "title" : { + "type" : "string", + "description" : "The title of the incident.", + "xml" : { + "attribute" : true + } + }, + "details" : { + "type" : "string", + "description" : "The details on the incident.", + "xml" : { + "attribute" : true + } + }, + "hyperlink" : { + "type" : "string", + "description" : "A hyperlink with more details.", + "xml" : { + "attribute" : true + } + }, + "translated" : { + "type" : "boolean", + "description" : "A flag to indicate whether the incident is automatically translated.", + "xml" : { + "attribute" : true + } + } + }, + "description" : "Represents an incident on a particular transit route or step." + }, + "TransitStep" : { + "required" : [ "crowd", "distance", "line", "startTime", "stopTime" ], + "type" : "object", + "description" : "Represents a step that is supposed to be taken by some form public transport.", + "allOf" : [ { + "$ref" : "#/components/schemas/Step" + }, { + "type" : "object", + "properties" : { + "line" : { + "$ref" : "#/components/schemas/Line" + }, + "id" : { + "type" : "string", + "description" : "The internal trip identification.", + "xml" : { + "attribute" : true + } + }, + "crowd" : { + "type" : "string", + "description" : "Represents the expected crowd level during a step.", + "xml" : { + "attribute" : true + }, + "enum" : [ "LEVEL_UNKNOWN", "LEVEL_LOW", "LEVEL_MEDIUM", "LEVEL_HIGH" ] + }, + "realTime" : { + "$ref" : "#/components/schemas/LineStatus" + }, + "stops" : { + "type" : "array", + "description" : "The sequence of stops that the transit vehicle will pass through.", + "xml" : { + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/TransitStop" + } + }, + "incidents" : { + "type" : "array", + "description" : "A set of incidents that affect this step.", + "xml" : { + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/TransitIncident" + } + } + } + } ] + }, + "TransitStop" : { + "required" : [ "arrivalTime", "departureTime", "id", "latitude", "level", "longitude", "name", "provider" ], + "type" : "object", + "description" : "Represents a transit stop with a particular timing in a transit step.", + "allOf" : [ { + "$ref" : "#/components/schemas/AbstractStop" + }, { + "type" : "object", + "properties" : { + "longitude" : { + "type" : "number", + "description" : "The longitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "latitude" : { + "type" : "number", + "description" : "The latitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "level" : { + "type" : "integer", + "description" : "The level of the coordinate (0=ground level, +=above ground, -=below ground)", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "provider" : { + "type" : "string", + "description" : "The provider of the stop.", + "xml" : { + "attribute" : true + } + }, + "id" : { + "type" : "string", + "description" : "The internal id of the stop.", + "xml" : { + "attribute" : true + } + }, + "code" : { + "type" : "string", + "description" : "The optional code of the stop.", + "xml" : { + "attribute" : true + } + }, + "name" : { + "type" : "string", + "description" : "The name of the stop.", + "xml" : { + "attribute" : true + } + }, + "arrivalTime" : { + "type" : "integer", + "description" : "The expected arrival time in seconds from midnight.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "departureTime" : { + "type" : "integer", + "description" : "The expected departure time in seconds from midnight.", + "format" : "int32", + "xml" : { + "attribute" : true + } + } + } + } ] + }, + "WalkingStep" : { + "required" : [ "distance", "startTime", "stopTime" ], + "type" : "object", + "description" : "A step to be taken on foot.", + "allOf" : [ { + "$ref" : "#/components/schemas/StreetStep" + }, { + "$ref" : "#/components/schemas/Step" + } ] + }, + "NetworkLine" : { + "required" : [ "code", "direction", "headsign", "name", "provider", "type" ], + "type" : "object", + "description" : "Represents information about a line in a transit network.", + "allOf" : [ { + "$ref" : "#/components/schemas/Line" + }, { + "type" : "object", + "properties" : { + "code" : { + "type" : "string", + "description" : "The short code of the line.", + "xml" : { + "attribute" : true + } + }, + "name" : { + "type" : "string", + "description" : "The name of the line.", + "xml" : { + "attribute" : true + } + }, + "type" : { + "type" : "string", + "description" : "Represents a line type of a public transit line.", + "xml" : { + "attribute" : true + }, + "enum" : [ "TRAM", "METRO", "RAIL", "BUS", "FERRY", "CABLECAR", "GONDOLA", "FUNICULAR", "TROLLEYBUS", "MONORAIL", "BIKE", "CAR" ] + }, + "direction" : { + "type" : "integer", + "description" : "The direction of the line.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "headsign" : { + "type" : "string", + "description" : "The headsign of the line.", + "xml" : { + "attribute" : true + } + }, + "color" : { + "type" : "string", + "description" : "The line color to be used as ARGB hex string.", + "xml" : { + "attribute" : true + } + }, + "agency" : { + "$ref" : "#/components/schemas/TransitAgency" + }, + "provider" : { + "type" : "string", + "description" : "The provider of the line.", + "xml" : { + "attribute" : true + } + }, + "shape" : { + "type" : "string", + "description" : "A sequence of coordinates as string encoded polyline.", + "xml" : { + "attribute" : true + } + }, + "stops" : { + "type" : "array", + "description" : "The sequence of stops from the start to the end of the line.", + "xml" : { + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/NetworkStop" + } + } + } + } ] + }, + "NetworkStop" : { + "required" : [ "id", "latitude", "level", "longitude", "name", "provider" ], + "type" : "object", + "description" : "Represents a stop in a transit network.", + "allOf" : [ { + "$ref" : "#/components/schemas/AbstractStop" + }, { + "type" : "object", + "properties" : { + "longitude" : { + "type" : "number", + "description" : "The longitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "latitude" : { + "type" : "number", + "description" : "The latitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "level" : { + "type" : "integer", + "description" : "The level of the coordinate (0=ground level, +=above ground, -=below ground)", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "provider" : { + "type" : "string", + "description" : "The provider of the stop.", + "xml" : { + "attribute" : true + } + }, + "id" : { + "type" : "string", + "description" : "The internal id of the stop.", + "xml" : { + "attribute" : true + } + }, + "code" : { + "type" : "string", + "description" : "The optional code of the stop.", + "xml" : { + "attribute" : true + } + }, + "name" : { + "type" : "string", + "description" : "The name of the stop.", + "xml" : { + "attribute" : true + } + }, + "lines" : { + "type" : "array", + "description" : "The lines passing through the stop.", + "xml" : { + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/NetworkLine" + } + } + } + } ] + }, + "LineSchedule" : { + "required" : [ "code", "direction", "headsign", "name", "provider", "type" ], + "type" : "object", + "description" : "Represents the schedule for a particular line on a stop.", + "allOf" : [ { + "$ref" : "#/components/schemas/Line" + }, { + "type" : "object", + "properties" : { + "code" : { + "type" : "string", + "description" : "The short code of the line.", + "xml" : { + "attribute" : true + } + }, + "name" : { + "type" : "string", + "description" : "The name of the line.", + "xml" : { + "attribute" : true + } + }, + "type" : { + "type" : "string", + "description" : "Represents a line type of a public transit line.", + "xml" : { + "attribute" : true + }, + "enum" : [ "TRAM", "METRO", "RAIL", "BUS", "FERRY", "CABLECAR", "GONDOLA", "FUNICULAR", "TROLLEYBUS", "MONORAIL", "BIKE", "CAR" ] + }, + "direction" : { + "type" : "integer", + "description" : "The direction of the line.", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "headsign" : { + "type" : "string", + "description" : "The headsign of the line.", + "xml" : { + "attribute" : true + } + }, + "color" : { + "type" : "string", + "description" : "The line color to be used as ARGB hex string.", + "xml" : { + "attribute" : true + } + }, + "agency" : { + "$ref" : "#/components/schemas/TransitAgency" + }, + "provider" : { + "type" : "string", + "description" : "The provider of the line.", + "xml" : { + "attribute" : true + } + }, + "departures" : { + "type" : "array", + "description" : "The planned departure times of the line at the stop.", + "xml" : { + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/RouteDateTime" + } + }, + "etas" : { + "type" : "array", + "description" : "The real-time arrival times of the line at the stop.", + "xml" : { + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/LineStatus" + } + }, + "incidents" : { + "type" : "array", + "description" : "The incidents that may affect the schedule of the line.", + "xml" : { + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/TransitIncident" + } + } + } + } ] + }, + "StopSchedule" : { + "required" : [ "id", "latitude", "level", "longitude", "name", "provider" ], + "type" : "object", + "description" : "Represents a schedule for the lines going through a stop.", + "allOf" : [ { + "$ref" : "#/components/schemas/AbstractStop" + }, { + "type" : "object", + "properties" : { + "longitude" : { + "type" : "number", + "description" : "The longitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "latitude" : { + "type" : "number", + "description" : "The latitude in WGS84 degrees.", + "format" : "double", + "xml" : { + "attribute" : true + } + }, + "level" : { + "type" : "integer", + "description" : "The level of the coordinate (0=ground level, +=above ground, -=below ground)", + "format" : "int32", + "xml" : { + "attribute" : true + } + }, + "provider" : { + "type" : "string", + "description" : "The provider of the stop.", + "xml" : { + "attribute" : true + } + }, + "id" : { + "type" : "string", + "description" : "The internal id of the stop.", + "xml" : { + "attribute" : true + } + }, + "code" : { + "type" : "string", + "description" : "The optional code of the stop.", + "xml" : { + "attribute" : true + } + }, + "name" : { + "type" : "string", + "description" : "The name of the stop.", + "xml" : { + "attribute" : true + } + }, + "lines" : { + "type" : "array", + "description" : "The schedules for lines stopping at the stop.", + "xml" : { + "wrapped" : true + }, + "items" : { + "$ref" : "#/components/schemas/LineSchedule" + } + } + } + } ] + } + } + } +} \ No newline at end of file