mobileticket / vals-schemata

Validation Services Schemata
1 stars 1 forks source link

Define message format for vehicle ID #1

Closed jschlyter closed 6 years ago

jschlyter commented 6 years ago

We need to define a interoperable message format for vehicle IDs (like XID)

jschlyter commented 6 years ago

We're going to use the standardized payload format once defined. Perhaps @Fromell can provide some pointers to draft schemas?

jschlyter commented 6 years ago

ping @Fromell

jschlyter commented 6 years ago

Draft in b6280ef37a37efc004a69188698408f3b7d603f2

Fromell commented 6 years ago

Proposal of updated schema for vehicleID

# version: 1.0.0

$schema: http://json-schema.org/schema#

type: object
required:
  - identifiers
properties:
  version:
    type: string
  identifiers:
    type: array
    items:
      $ref: '#/definitions/identifier'

definitions:
  identifier:
    type: object
    required:
      - origin
    properties:
      origin:
        type: string
      firstSeen:
        type: string
        format: date-time
      lastSeen:
        type: string
        format: date-time
      EUI48:
        description: "IEEE 48-bit Extended Unique Identifier (EUI-48)"
        type: string
        pattern: "[a-f0-9]{2}(-[a-f0-9]{2}){5}"
      EUI64:
        description: "IEEE 64-bit Global Identifier (EUI-64)"
        type: string
        pattern: "[a-f0-9]{2}(-[a-f0-9]{2}){7}"
      VIN:
        description: "Vehicle Identification Number per ISO 3779:2009"
        type: string
        pattern: "[A-Z0-9]{11,17}"
      vehicleNumber:
        description: Vehicle number
        type: string
        pattern: "[A-Z0-9]{1,16}"
      registrationNumber:
        description: Vehicle license plate
        type: string
      VehicleGID:
        description: Vehicle GID with ITxPT national prefix extention ISO 3166-1
        type: string
        pattern: "[A-Z]{2}.9031[0-9]{3}[0-9]{4}[0-9]{5}"
      TCID:
        description: Transit cloud identifier, ASCII representation of 6-8 byte Hex
        type: string
        pattern: "([a-fA-F0-9]{2}){6,8}"
      UUID:
        description: "Universally unique identifier (UUID) per ISO/IEC 9834-8:2005"
        type: string
        pattern: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
Fromell commented 6 years ago

VehicleGID

SE.9031014003312345 Country= ISO 3166-1 encoding + separator (dot) GIDType= 4 number, 9031 for VehicleGID PTA= 3 number PTO= 4 number Vehicle= 5 number
jschlyter commented 6 years ago

8 updated