openapi: 3.1.1
info:
  title: Document
  version: 2.0.0
  description: "Container schemas fetched from beckn.yaml. This cannot be extended as it is a reserved schema in beckn protocol. Any additional properties added to this schema can only be made using its *Attributes property"
  license:
    name: CC-BY-NC-SA 4.0 International
  contact:
    name: Beckn Labs
    url: https://beckn.io
components:
  schemas:
    Document:
      x-iri: https://schema.nfh.global/Document/v2.0
      description: A document, that can be parsed, printed, download or displayed. This has intentionally been kept separate from MediaFile as they may contain additional attributes like signature, schema etc.
      title: Document
      x-tags:
      - common
      type: object
      properties:
        label:
          description: The display name of the media file
          type: string
        mimeType:
          description: MIME type if 'data' is provided (application/pdf, image/png, application/json).
          type: string
        standard:
          description: Describes the schema type in case the document follows a standard schema like a verifiableCredential
          type: string
        url:
          description: URL to the document
          type: string
          format: uri
        security:
          type: object
          properties:
            checksum:
              type: string
            checksumAlgorithm:
              type: string
              enum:
              - SHA256
              - SHA512
              - OTHER
            signature:
              type: string
            signatureAlgorithm:
              type: string
              description: e.g., Ed25519, ES256
            keyId:
              type: string
      required:
      - label
      - url
      - mimeType
      additionalProperties: false
