Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 1 addition & 24 deletions MP modules/TOMP-API-NOTIFY.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -209,30 +209,7 @@ components:
$ref: "../TOMP-API-1-CORE.yaml#/components/schemas/packageReference"

assetInfo:
type: object
properties:
location:
$ref: "../TOMP-API-1-CORE.yaml#/components/schemas/placeReference"
assetState:
type: string
description: in case the fare is dependent on being in use or being paused, this field must be used. Default IN_USE
enum: [IN_USE, PAUSED]
default: IN_USE
distance:
$ref: "../TOMP-API-1-CORE.yaml#/components/schemas/float"
description: the travelled distance, in km. Only if applicable.
distanceUnits:
type: string
enum: [KM, MILE]
duration:
$ref: "../TOMP-API-1-CORE.yaml#/components/schemas/normalInt"
description: the time in seconds that the assed is used OR to reach the pickup location (ETA). Only if applicable.
currentCharge:
type: integer
minimum: 0
maximum: 100
description: percentage of charge available

$ref: "../TOMP-API-1-CORE.yaml#/components/schemas/assetInfo"
links:
$ref: "../TOMP-API-1-CORE.yaml#/components/schemas/links"
message:
Expand Down
31 changes: 31 additions & 0 deletions TOMP-API-1-CORE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,37 @@ components:
fee:
$ref: "#/components/schemas/fareStructure"

assetInfo:
x-semantics:
- transmodel: VEHICLE, PARKING BAY, CYCLE STORAGE EQUIPMENT, VEHICLE CHARGING, EQUIPMENT
type: object
description: asset status information
properties:
id:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a legId. The TO and MP know how to derive the assetId from the legId. This way, we avoid the problem of traceablity.

$ref: "#/components/schemas/assetReference"
description: Identifier of an asset. Can be an external reference, but also a (internal) ID
location:
$ref: "#/components/schemas/placeReference"
assetState:
type: string
description: in case the fare is dependent on being in use or being paused, this field must be used. Default IN_USE
enum: [IN_USE, PAUSED]
default: IN_USE
distance:
$ref: "#/components/schemas/float"
description: the travelled distance, in km. Only if applicable.
distanceUnits:
type: string
enum: [KM, MILE]
duration:
$ref: "#/components/schemas/normalInt"
description: the time in seconds that the assed is used OR to reach the pickup location (ETA). Only if applicable.
currentCharge:
type: integer
minimum: 0
maximum: 100
description: percentage of charge available

cargoLimits:
x-semantics:
- transmodel: LUGGAGE ALLOWANCE
Expand Down
43 changes: 43 additions & 0 deletions draft modules/TOMP-API-0-INFORMATION.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,49 @@ paths:
default:
$ref: "../TOMP-API-1-CORE.yaml#/components/responses/errorResponse"

/collections/asset-info/items:
get:
operationId: getAssetInfo
summary: "Retrieve asset info for assets that are assigned to a leg. Only
legs are included that were created on behalf of the calling party."
parameters:
- $ref: "../TOMP-API-1-CORE.yaml#/components/parameters/acceptLanguage"
- $ref: "../TOMP-API-1-CORE.yaml#/components/parameters/authorization"
- $ref: "../TOMP-API-1-CORE.yaml#/components/parameters/optionalLegId"
- $ref: "../TOMP-API-1-CORE.yaml#/components/parameters/limit"
- $ref: "../TOMP-API-1-CORE.yaml#/components/parameters/offset"
- $ref: "../TOMP-API-1-CORE.yaml#/components/parameters/bbox"
security:
- BearerAuth: []
- OpenData: []
tags:
- travel information
responses:
"200":
description: asset info
headers:
Version:
$ref: '../TOMP-API-1-CORE.yaml#/components/headers/version'
Content-Language:
$ref: '../TOMP-API-1-CORE.yaml#/components/headers/contentLanguage'
Digest:
$ref: '../TOMP-API-1-CORE.yaml#/components/headers/digest'
PublicKey:
$ref: '../TOMP-API-1-CORE.yaml#/components/headers/publicKey'
SignedDigest:
$ref: '../TOMP-API-1-CORE.yaml#/components/headers/signedDigest'
content:
application/json:
schema:
type: object
properties:
assets:
type: array
items:
$ref: '../TOMP-API-1-CORE.yaml#/components/schemas/assetInfo'
default:
$ref: "../TOMP-API-1-CORE.yaml#/components/responses/errorResponse"

components:
responses:
userProfilesResponse:
Expand Down