openapi: 3.1.0
info:
  title: TravelDocument
  version: 2.0.0
  description: Schema definition for the TravelDocument entity in the Beckn Mobility
  license:
    name: CC-BY-NC-SA 4.0 International
    url: https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en
  contact:
    name: Beckn Labs
    url: https://beckn.io
components:
  schemas:
    TravelDocument:
      x-iri: https://schema.nfh.global/TravelDocument/v2.0
      type: object
      title: TravelDocument
      description: A document (physical or digital) issued to a passenger proving
        entitlement to travel, used for validation or inspection.
      x-tags:
        - mobility
        - schema-org
        - ride-hailing
      properties:
        documentType:
          description: Type of travel document (e.g. E_TICKET, PDF_TICKET, SMARTCARD,
            BARCODE)
          type: string
        documentNumber:
          description: Unique document number or serial
          type: string
        issuingAuthority:
          description: The operator or authority that issued this document
          $ref: https://schema.nfh.global/Operator/v2.0/attributes.yaml#/components/schemas/Operator
        validFrom:
          description: Start date of the document validity
          type: string
          format: date-time
        validUntil:
          description: Expiry date of the document
          type: string
          format: date-time
        id:
          description: Unique identifier for the entitlement
          type: string
        descriptor:
          description: Human-readable information about the entitlement
          $ref: https://schema.nfh.global/Descriptor/v2.0/attributes.yaml#/components/schemas/Descriptor
        resource:
          description: The resource being accessed against this entitlement
          $ref: https://schema.nfh.global/ContractItem/v2.0/attributes.yaml#/components/schemas/ContractItem
        credentials:
          description: Credential descriptors for the entitlement
          $ref: https://schema.nfh.global/Descriptor/v2.0/attributes.yaml#/components/schemas/Descriptor
      additionalProperties: false
