openapi: 3.0.0
info:
  title: IDUnion Trust List API
  description: |
    IDUnion Trust List API
  version: 0.0.1
servers:
  - url: /api/v1
    description: ''
paths:
  /health:
    get:
      operationId: HealthCheck
      responses:
        '200':
          description: IDUnion Trust List health check
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthStatus'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /tl:
    post:
      operationId: TlCreate
      description: |
        Creates a Trust List based on the specified payload.
      security:
        - accessToken: []
      requestBody:
        description: |
          Trust List create payload.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TlPayload'
      responses:
        '200':
          description: The created Trust List
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tl'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /tl/directory:
    get:
      parameters:
        - in: query
          name: search
          required: false
          schema:
            type: string
      operationId: TlList
      description: |
        Provides a list of public Trusted Lists
      responses:
        '200':
          description: Trust List list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TlPublicInfoList'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /tl/directory/{tl_id}:
    get:
      parameters:
        - in: path
          name: tl_id
          required: true
          schema:
            type: string
      operationId: TlGetPublicInfo
      description: |
        Provides a public information about a specific Trusted List
      responses:
        '200':
          description: Trusted List public info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TlPublicInfo'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /tl/owner:
    get:
      operationId: TlListByOwner
      description: |
        Provides a list of Trusted Lists for an authenticated owner
      security:
        - accessToken: []
      responses:
        '200':
          description: Trust List list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TlList'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /{tl_id}:
    parameters:
      - in: path
        name: tl_id
        required: true
        schema:
          type: string
    get:
      operationId: TlGet
      description: |
        Gets the specified Trust List
      security:
        - accessToken: []
      responses:
        '200':
          description: Trust List meta info resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tl'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
    patch:
      operationId: TlPatch
      description: |
        Updates a Trust List based on the specified payload.
      security:
        - accessToken: []
      requestBody:
        description: |
          Trust List create payload.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TlPayload'
      responses:
        '200':
          description: The created Trust List
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tl'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
    delete:
      operationId: TlDelete
      description: |
        Destroys the Trust List.
      security:
        - accessToken: []
      responses:
        '204':
          description: |
            The Trust List was destroyed.
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /tlrs/{org_name}:
    parameters:
      - in: path
        name: org_name
        required: true
        schema:
          type: string
    get:
      operationId: TlrSearch
      description: |
        Retrieves a list of Trust List Records.
      responses:
        '200':
          description: Trust List Records
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TlrList'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /{tl_id}/tlrs:
    parameters:
      - in: path
        name: tl_id
        required: true
        schema:
          type: string
    get:
      operationId: TlrsGet
      description: |
        Retrieves a list of Trust List records.
      security:
        - accessToken: []
      responses:
        '200':
          description: Trust List records resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TlrList'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
    post:
      operationId: TlrCreate
      description: >
        Directly creates a new Trusted List Record.

        When a Certificate Signing Request is provided, it will also issue an
        x509 certificate and update the ETSI TS 119 6**
      security:
        - accessToken: []
      requestBody:
        description: |
          Trust List Record Create Payload.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TlrCreatePayload'
      responses:
        '200':
          description: An identifier of the newly created DID Document.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TlrCreatedResult'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /{tl_id}/dids/{tlr_id}/verificationMethod:
    parameters:
      - in: path
        name: tl_id
        required: true
        description: Trust List Identifier
        schema:
          $ref: '#/components/schemas/TlId'
      - in: path
        name: tlr_id
        required: true
        description: Trust List Record Identifier
        schema:
          $ref: '#/components/schemas/TlrId'
    post:
      operationId: DidVerificationMethodAdd
      description: |
        Adds DID Verification method.
      security:
        - accessToken: []
      requestBody:
        description: |
          Verification method.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerificationMethodCreatePayload'
      responses:
        '204':
          description: |
            Verification method was added.
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
    patch:
      operationId: DidVerificationMethodPatch
      description: |
        Adds DID Verification method.
      security:
        - accessToken: []
      requestBody:
        description: |
          Verification method.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerificationMethodPatchPayload'
      responses:
        '204':
          description: |
            Verification method was added.
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /{tl_id}/dids/suggest:
    parameters:
      - in: path
        name: tl_id
        required: true
        schema:
          type: string
    get:
      operationId: DidSuggest
      description: |
        Suggests a DID
      security:
        - accessToken: []
      responses:
        '200':
          description: Suggested DID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Did'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /{tl_id}/etsi/tsl.xml:
    parameters:
      - in: path
        name: tl_id
        required: true
        schema:
          type: string
    get:
      operationId: EtsiTlGet
      description: |
        Returns an ETSI Trusted list
      security:
        - accessToken: []
      responses:
        '200':
          description: ETSI 119 612 Trusted list
          content:
            application/xml:
              schema:
                type: object
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          description: Resource not found
        '500':
          $ref: '#/components/responses/InternalServerError'
  /{tl_id}/vp/{did}/{id}:
    parameters:
      - in: path
        name: tl_id
        required: true
        schema:
          type: string
      - in: path
        name: did
        required: true
        schema:
          type: string
      - in: path
        name: id
        required: true
        schema:
          type: string
    get:
      operationId: VpGet
      description: |
        Gets a Verifiable Presentation.
      security:
        - accessToken: []
      responses:
        '200':
          description: Verifiable Presentation resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VpResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /{tl_id}/{tlr_id}:
    parameters:
      - in: path
        name: tl_id
        required: true
        description: Trust List Identifier
        schema:
          $ref: '#/components/schemas/TlId'
      - in: path
        name: tlr_id
        required: true
        description: Trust List Record Identifier
        schema:
          $ref: '#/components/schemas/TlrId'
    get:
      operationId: TlrGet
      description: |
        Retrieves a specific Trust List record
      responses:
        '200':
          description: |
            Trust List record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tlr'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          description: Resource not found
        '500':
          $ref: '#/components/responses/InternalServerError'
    delete:
      operationId: TlrDelete
      security:
        - accessToken: []
      description: |
        Removes a specific Trust List Record
      responses:
        '204':
          description: |
            Trust List record successfully removed
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          description: Resource not found
        '500':
          $ref: '#/components/responses/InternalServerError'
  /{tl_id}/{tlr_id}/trust-chain:
    parameters:
      - in: path
        name: tl_id
        required: true
        description: Trust List Identifier
        schema:
          $ref: '#/components/schemas/TlId'
      - in: path
        name: tlr_id
        required: true
        description: Trust List Record Identifier
        schema:
          $ref: '#/components/schemas/TlrId'
    get:
      operationId: TlrTrustChainGet
      description: |
        Gets Trust List Records that make up a single Trust Chain
      responses:
        '200':
          description: |
            Trust List record
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Tlr'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          description: Resource not found
        '500':
          $ref: '#/components/responses/InternalServerError'
  /{tl_id}/{tlr_id}/did.json:
    parameters:
      - in: path
        name: tl_id
        required: true
        description: Trust List Identifier
        schema:
          $ref: '#/components/schemas/TlId'
      - in: path
        name: tlr_id
        required: true
        description: Trust List Record Identifier
        schema:
          $ref: '#/components/schemas/TlrId'
    get:
      operationId: DidGet
      description: |
        Retrieves a specific DID Document
      responses:
        '200':
          description: |
            DID Document
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DidDocument'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          description: Resource not found
        '500':
          $ref: '#/components/responses/InternalServerError'
  /{tl_id}/onboarding:
    post:
      parameters:
        - in: path
          name: tl_id
          required: true
          description: Trust List identifier
          schema:
            $ref: '#/components/schemas/TlId'
      operationId: OnboardingInit
      description: |
        Initiates the onboarding process to the DID registry.
      requestBody:
        description: |
          DID onboarding init payload.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OnboardingPayload'
      responses:
        '200':
          description: Onboarding response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnboardingResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /onboarding/{verifier_state}:
    parameters:
      - in: path
        name: verifier_state
        required: true
        description: Verifier state
        schema:
          type: string
    get:
      operationId: OnboardingStatus
      responses:
        '200':
          description: Onboarding status response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnboardingStatus'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  securitySchemes:
    accessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
  schemas:
    Error:
      description: Common error message
      type: object
      properties:
        error:
          type: string
        message:
          type: string
      required:
        - error
        - message
    HealthStatus:
      description: Health status of the system
      title: Health Status
      type: object
      properties:
        status:
          title: Status code
          type: string
          enum:
            - ok
            - limited
            - critical
      required:
        - status
    TlPublicInfo:
      title: Trust List public information
      description: |
        Trust List meta info
      properties:
        id:
          $ref: '#/components/schemas/TlId'
        name:
          title: Trust List name
          description: Trust List human-readable name
          type: string
        description:
          title: Trust List description
          description: Trust List description
          type: string
        didBase:
          title: DID base
          type: string
        governanceWalletId:
          title: Governance Wallet ID
          type: string
      required:
        - id
        - name
        - description
        - ownerId
        - didBase
        - governanceWalletId
    Tl:
      title: Trust List
      description: |
        Trust List meta info
      properties:
        id:
          $ref: '#/components/schemas/TlId'
        name:
          title: Trust List name
          description: Trust List human-readable name
          type: string
        description:
          title: Trust List description
          description: Trust List description
          type: string
        didBase:
          title: DID base
          type: string
        governanceWalletId:
          title: Governance Wallet ID
          type: string
        verifierId:
          title: Verifier ID
          type: string
      required:
        - id
        - name
        - description
        - ownerId
        - didBase
        - verifierId
        - governanceWalletId
    TlList:
      title: List of Trust Lists
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Tl'
    TlPublicInfoList:
      title: List of public Trust List info
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/TlPublicInfo'
    TlPayload:
      title: Trust List create payload
      description: |
        Trust List create payload
      properties:
        name:
          title: Trust List name
          description: Trust List human-readable name
          type: string
        description:
          title: Trust List description
          description: Trust List description
          type: string
        suggestedId:
          title: Suggested Trust List ID
          type: string
        governanceWalletId:
          title: Wallet Identifier
          description: The Wallet used by the Trust List for VC interactions
          type: string
        verifierId:
          title: Verifier Identifier
          description: The Verifier used to verify onboarding credentials
          type: string
      required:
        - name
        - description
        - governanceWalletId
        - verifierId
    DidDocumentList:
      title: DID Document List
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Did'
    TlrList:
      title: Trust List Records list
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Tlr'
    OnboardingPayload:
      title: DID onboarding init payload
      properties:
        verifierId:
          title: Verifier ID
          description: >
            The Verifier ID that should be used to verify the onboarding
            credential.
          type: string
        holderEntityId:
          description: |
            Holder identifier, i.e. did:key of the holder
          type: string
      required:
        - verifierId
    OnboardingResponse:
      type: object
      properties:
        verifierUrl:
          description: >-
            Url of verifier authorization server that contains the requested
            verifier scope.
          type: string
        verifierState:
          description: >-
            A code that can be used to match the verified credential for later
            use.
          type: string
      required:
        - verifierUrl
        - verifierState
    VpResponse:
      type: object
      properties:
        vp:
          title: Verifiable Presentation
          type: string
          description: Verifiable Presentation in JWT format
      required:
        - vp
    OnboardingStatus:
      type: object
      properties:
        did:
          description: When the status is completed the DID will be provided.
          type: string
        message:
          description: The status message providing additional info on specific status.
          type: string
        status:
          description: The onboarding process status
          type: string
          enum:
            - in_progress
            - completed
            - error
        tl:
          $ref: '#/components/schemas/Tl'
        verifierUrl:
          description: After the onboarding is initiate this value will be provided
          type: string
      required:
        - status
    TlrCreatePayload:
      title: Trust List Record create payload
      description: The public key material must be provided either as did:key or CSR
      properties:
        didKey:
          $ref: '#/components/schemas/DidKey'
        csr:
          title: Certificate signing request in PEM format
          type: string
        orgName:
          title: Organization Name
          type: string
      required:
        - orgName
    DidKey:
      title: DID Key
      type: string
    TrustChain:
      title: Trust Chain
      type: array
      items:
        $ref: '#/components/schemas/Tlr'
    TlrCreatedResult:
      title: TLR Create result
      type: object
      properties:
        did:
          $ref: '#/components/schemas/Did'
        x509Certificate:
          title: x509 Certificate
          description: >
            If CSR was provided in the payload the response will contain
            certificate issued using this CSR
          type: string
      required:
        - did
    Tlr:
      title: Trust List Record
      type: object
      properties:
        orgName:
          title: Organization Name
          type: string
        id:
          $ref: '#/components/schemas/TlrId'
        did:
          $ref: '#/components/schemas/Did'
        tlId:
          $ref: '#/components/schemas/TlId'
        tlName:
          title: Trust List Name
          type: string
        status:
          title: Record status
          description: |
            Denotes the Trust List record trust status. 
              - Onboarded record is created upon onboarding VC presentation
              - Trusted record is created upon onboarding VC presentation that was issued by an Issuer that is verified by IDunion SCE
              - Revoked record is a result of the Verification Method revocation process
              - Expired record is when the Verification Method in use has expired, due to i.e. Onboarding VC expiration
          type: string
          enum:
            - onboarded
            - trusted
            - revoked
            - expired
        accreditedFor:
          type: array
          items:
            $ref: '#/components/schemas/AccreditedFor'
        onboardingCredentials:
          type: array
          items:
            $ref: '#/components/schemas/OnboardingCredential'
        isRoot:
          type: boolean
          title: Root trust record
      required:
        - id
        - did
        - tlId
        - orgName
        - tlName
        - status
        - onboardingCredentials
        - isRoot
    OnboardingCredential:
      title: Onboarding Credential
      type: object
      properties:
        link:
          type: string
          format: uri
          title: Onboarding VC link
        issuerDid:
          type: string
          title: Issuer DID
        issuerDisplay:
          title: Issuer Display
          type: array
          items:
            $ref: '#/components/schemas/IssuerDisplayItem'
        subject:
          $ref: '#/components/schemas/OnboardingVcSubject'
      required:
        - link
        - issuerDid
        - subject
    IssuerDisplayItem:
      title: Issuer Display item
      type: object
      properties:
        name:
          title: Issuer name
          type: string
        locale:
          title: Display item language
          type: string
        logo:
          $ref: '#/components/schemas/IssuerLogo'
    IssuerLogo:
      title: Issuer Logo
      type: object
      properties:
        uri:
          type: string
        alt_text:
          type: string
    AccreditedFor:
      title: Accredited for
      description: Defines accreditations which were given to specific holder
      type: object
      properties:
        limitJurisdiction:
          type: string
          format: uri
          title: Limit Jurisdiction
          description: >
            Jurisdiction limitation based on geographical region defined by
            https://publications.europa.eu/resource/authority/atu
        schemaId:
          type: string
          format: uri
          title: Verifiable Credential schema
          description: |
            Link to a schema for which the accreditation is given
        types:
          type: string
          title: Verifiable Credential types
          description: |
            Comma separated VC type for which the accreditation is given
    OnboardingVcSubject:
      title: Onboarding VC subject
      type: object
      properties:
        organizationName:
          title: Organization Name
          type: string
        tradeName:
          title: Trade Name
          description: TSP trade name as defined by ETSI TS 119 612 V2.3.1 - 5.4.2
          type: string
        trustListId:
          title: Trusted list ID
          type: string
        onboardingDid:
          title: DID to be onboarded
          description: If not provided, one will be automatically generated.
          type: string
        accreditedFor:
          title: Accredited For
          type: string
        orgAddress:
          $ref: '#/components/schemas/OrgAddress'
        orgWebsite:
          $ref: '#/components/schemas/OrgWebsite'
        contactInfo:
          title: Contact information
          type: object
          properties:
            website:
              $ref: '#/components/schemas/OrgWebsite'
            email:
              $ref: '#/components/schemas/OrgEmail'
          required:
            - website
            - email
        x509Certificate:
          title: x509 Certificate
          type: string
      required:
        - organizationName
        - tradeName
        - trustListId
        - accreditedFor
        - orgAddress
        - orgWebsite
        - contactInfo
    OrgAddress:
      title: Organization Address
      type: object
      properties:
        streetAddress:
          title: Street Address
          type: string
        city:
          title: City
          type: string
        province:
          title: Province
          type: string
        postalCode:
          title: Postal Code
          type: string
        country:
          title: Country
          type: string
      required:
        - streetAddress
        - city
        - postalCode
        - country
    OrgEmail:
      title: Organization Email
      type: string
    OrgWebsite:
      title: Organization Website
      type: string
    DidDocument:
      title: DID Document
      type: object
      properties:
        '@context':
          title: Context
          description: >
            The JSON-LD Context is either a string or a list containing any
            combination of strings and/or ordered maps.

            https://www.w3.org/TR/did-1.0/#dfn-context
          type: array
          items:
            type: string
        controller:
          title: Controller
          description: >
            An entity that has the capability to make changes to a DID document.
            A DID might have more than one DID controller. The DID controller(s)
            can be denoted by the optional controller property at the top level
            of the DID document. Note that a DID controller might be the DID
            subject. 

            https://www.w3.org/TR/did-1.0/#dfn-did-controllers
          type: array
          items:
            $ref: '#/components/schemas/Did'
        id:
          $ref: '#/components/schemas/Did'
        verificationMethod:
          title: Verification Methods
          description: >
            The verificationMethod property is OPTIONAL. If present, the value
            MUST be a set of verification methods, where each verification
            method is expressed using a map. The verification method map MUST
            include the id, type, controller, and specific verification material
            properties that are determined by the value of type and are defined
            in 5.2.1 Verification Material. A verification method MAY include
            additional properties. Verification methods SHOULD be registered in
            the DID Specification Registries [DID-SPEC-REGISTRIES].

            https://www.w3.org/TR/did-1.0/#verification-methods
          type: array
          items:
            $ref: '#/components/schemas/VerificationMethod'
        capabilityInvocation:
          title: Capability Invocation
          description: >
            The capabilityInvocation verification relationship is used to
            specify a verification method that might be used by the DID subject
            to invoke a cryptographic capability, such as the authorization to
            update the DID Document.  

            https://www.w3.org/TR/did-1.0/#capability-invocation
          type: array
          items:
            $ref: '#/components/schemas/Kid'
        authentication:
          title: Authentication
          description: >
            The authentication verification relationship is used to specify how
            the DID subject is expected to be authenticated, for purposes such
            as logging into a website or engaging in any sort of
            challenge-response protocol.  

            https://www.w3.org/TR/did-1.0/#authentication
          type: array
          items:
            $ref: '#/components/schemas/Kid'
        assertionMethod:
          title: Assertion Method
          description: >
            The assertionMethod verification relationship is used to specify how
            the DID subject is expected to express claims, such as for the
            purposes of issuing a Verifiable Credential [VC-DATA-MODEL].   

            https://www.w3.org/TR/did-1.0/#assertion
          type: array
          items:
            $ref: '#/components/schemas/Kid'
        service:
          title: Services
          type: array
          items:
            $ref: '#/components/schemas/ServiceItem'
      required:
        - '@context'
        - id
    ServiceItem:
      title: Service
      description: >
        Services are used in DID documents to express ways of communicating with
        the DID subject or associated entities. A service can be any type of
        service the DID subject wants to advertise, including decentralized
        identity management services for further discovery, authentication,
        authorization, or interaction. 

        https://www.w3.org/TR/did-1.0/#services
      properties:
        id:
          title: ID
          type: string
        type:
          title: Type
          type: string
        serviceEndpoint:
          title: Service Endpoint
          description: >
            The value of the serviceEndpoint property MUST be a string, a map,
            or a set composed of one or more strings and/or maps. All string
            values MUST be valid URIs conforming to [RFC3986] and normalized
            according to the Normalization and Comparison rules in RFC3986 and
            to any normalization rules in its applicable URI scheme
            specification. 

            https://www.w3.org/TR/did-1.0/#dfn-serviceendpoint
          type: string
      required:
        - id
        - type
        - serviceEndpoint
    VerificationMethod:
      title: Verification Method
      properties:
        controller:
          $ref: '#/components/schemas/Did'
        id:
          $ref: '#/components/schemas/Kid'
        type:
          title: Type
          description: >
            The value of the type property MUST be a string that references
            exactly one verification method type. In order to maximize global
            interoperability, the verification method type SHOULD be registered
            in the DID Specification Registries [DID-SPEC-REGISTRIES].
          type: string
        revoked:
          title: Revoked
          description: >
            DateTimeStamp string specifying when the verification method MUST
            NOT be used.
          type: string
          format: date-time
      additionalProperties: true
      required:
        - controller
        - id
        - type
    VerificationMethodCreatePayload:
      title: Verification Method create payload
      properties:
        controller:
          $ref: '#/components/schemas/Did'
        id:
          $ref: '#/components/schemas/Kid'
        type:
          title: Type
          description: >
            The value of the type property MUST be a string that references
            exactly one verification method type. In order to maximize global
            interoperability, the verification method type SHOULD be registered
            in the DID Specification Registries [DID-SPEC-REGISTRIES].
          type: string
      additionalProperties: true
      required:
        - controller
        - id
        - type
    VerificationMethodPatchPayload:
      title: Verification Method patch payload
      properties:
        controller:
          $ref: '#/components/schemas/Did'
        id:
          $ref: '#/components/schemas/Kid'
        revoked:
          title: Revoked
          description: >
            DateTimeStamp string specifying when the verification method MUST
            NOT be used.
          type: string
          format: date-time
      required:
        - id
    Kid:
      title: Key ID
      type: string
    Did:
      title: DID
      type: string
    TlrId:
      title: Trust List Record ID
      type: string
    TlId:
      title: Trust List ID
      type: string
  responses:
    UnauthorizedError:
      description: Access token is missing or invalid
    BadRequestError:
      description: Bad input detected for the endpoint
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
