openapi: 3.1.0
info:
  title: WE BUILD Trusted List Audit API
  version: 0.1.0
  description: HTTP API for auditing trusted-list pointers and assessing ETSI TS
    119 612 / TS 119 602 artifacts. Scheme-explicit TS 119 602 XML is validated
    against the integrity-checked pinned V1.1.1 XSD and offline catalog when
    xmllint is available. Applicable artifacts expose synchronized 69-family TS
    119 612 or 81-family TS 119 602 coverage audits and audit-driven
    complete-verdict eligibility.
servers:
  - url: https://trust-inspector.credimi.io
paths:
  /:
    get:
      summary: Browser audit interface
      description: Dependency-free browser interface for LoTL and single-artifact
        assessment. It calls the documented assessment endpoints and does not
        persist uploaded files.
      responses:
        "200":
          description: HTML audit interface.
          content:
            text/html:
              schema:
                type: string
  /healthz:
    get:
      summary: Health check
      responses:
        "200":
          description: Server is healthy.
          content:
            application/json:
              schema:
                type: object
                required:
                  - ok
                  - name
                  - version
                properties:
                  ok:
                    type: boolean
                    const: true
                  name:
                    type: string
                    const: we-build-tl-audit
                  version:
                    type: string
              examples:
                ok:
                  value:
                    ok: true
                    name: we-build-tl-audit
                    version: 0.1.0
  /openapi.yaml:
    get:
      summary: OpenAPI YAML specification
      responses:
        "200":
          description: OpenAPI YAML.
          content:
            application/yaml:
              schema:
                type: string
  /openapi.json:
    get:
      summary: OpenAPI JSON specification
      responses:
        "200":
          description: OpenAPI JSON.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
  /docs:
    get:
      summary: Stoplight Elements documentation UI
      responses:
        "200":
          description: HTML documentation page.
          content:
            text/html:
              schema:
                type: string
  /api/v1/audit/url:
    post:
      summary: Audit a LoTL JSON loaded from URL
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - url
              additionalProperties: false
              properties:
                url:
                  type: string
                  format: uri
                options:
                  $ref: "#/components/schemas/AuditOptions"
                context:
                  $ref: "#/components/schemas/Ts119602ContextOptions"
            examples:
              webuild:
                value:
                  url: https://webuild-consortium.github.io/wp4-trust-group/list_of_trusted_lists.json
                  options:
                    concurrency: 4
                    timeoutMs: 15000
                    strict: false
                    includeJsonLoteChecks: true
                    fetch: true
      responses:
        "200":
          description: Audit completed. Individual fetch failures are represented inside
            the report.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AuditResponse"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
  /api/v1/audit/json:
    post:
      summary: Audit a LoTL supplied as JSON object or string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - lotl
              additionalProperties: false
              properties:
                lotl:
                  oneOf:
                    - type: object
                      additionalProperties: true
                    - type: string
                options:
                  $ref: "#/components/schemas/AuditOptions"
                context:
                  $ref: "#/components/schemas/Ts119602ContextOptions"
            examples:
              minimal:
                value:
                  lotl:
                    LoTE:
                      ListAndSchemeInformation:
                        SchemeOperatorName: Example Operator
                        SchemeName: Example LoTL
                        LoTEType: example
                        LoTESequenceNumber: 1
                        PointersToOtherLoTE: []
                  options:
                    concurrency: 4
                    timeoutMs: 15000
                    strict: false
                    includeJsonLoteChecks: true
                    fetch: true
      responses:
        "200":
          description: Audit completed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AuditResponse"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
  /api/v1/lotl/parse:
    post:
      summary: Parse and summarize a LoTL without fetching pointers
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - lotl
              additionalProperties: false
              properties:
                lotl:
                  oneOf:
                    - type: object
                      additionalProperties: true
                    - type: string
            examples:
              minimal:
                value:
                  lotl:
                    LoTE:
                      ListAndSchemeInformation:
                        SchemeOperatorName: Example Operator
                        PointersToOtherLoTE:
                          - LoTELocation: https://example.test/tl.xml
                            MimeType: application/xml
      responses:
        "200":
          description: Parsed LoTL summary and pointers.
          content:
            application/json:
              schema:
                type: object
                required:
                  - summary
                  - pointers
                properties:
                  summary:
                    $ref: "#/components/schemas/LoTLSummary"
                  pointers:
                    type: array
                    items:
                      $ref: "#/components/schemas/PointerSummary"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
  /api/v1/artifact/assess-url:
    post:
      summary: Assess one referenced artifact URL
      description: TS 119 602 scheme-explicit XML automatically receives a separate
        pinned offline XML Schema finding; unavailable local validator support
        is reported as unsupported. Applicable TS 119 602 artifacts also return
        the complete 81-family ledger coverage audit used by the verdict gate.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - url
              additionalProperties: false
              properties:
                url:
                  type: string
                  format: uri
                declared:
                  $ref: "#/components/schemas/DeclaredPointer"
                options:
                  $ref: "#/components/schemas/ArtifactAssessOptions"
                context:
                  $ref: "#/components/schemas/Ts119602ContextOptions"
            examples:
              xml:
                value:
                  url: https://example.test/tl.xml
                  declared:
                    mimeType: application/xml
                    loteType: http://uri.etsi.org/19602/LoTEType/EUPIDProvidersList
                    schemeOperatorName: Example Operator
                    schemeTerritory: EU
                    pointerCertificateFingerprintsSha256: []
                  options:
                    timeoutMs: 15000
                    strict: false
                    includeJsonLoteChecks: true
      responses:
        "200":
          description: Single artifact assessment result.
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                properties:
                  result:
                    $ref: "#/components/schemas/TrustedListAuditResult"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
  /api/v1/report/markdown:
    post:
      summary: Render Markdown from a machine-readable audit report
      description: Renders the supplied report without adding findings, preserving
        each standard and reference-profile finding ID, status, and severity.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - report
              additionalProperties: false
              properties:
                report:
                  $ref: "#/components/schemas/AuditReport"
            examples:
              emptyReport:
                value:
                  report:
                    schemaVersion: 7
                    tool:
                      name: we-build-tl-audit
                      version: 0.1.0
                    generatedAt: 2026-07-16T00:00:00.000Z
                    input:
                      source: request-body
                      kind: json
                    lotl:
                      pointerCount: 0
                      uniqueLocationCount: 0
                      duplicateLocations: []
                    weBuildProfile:
                      recognized: false
                      recognitionReasons: []
                      listTypeCounts: {}
                      roleCounts: {}
                      pointerConsistency:
                        declaredMimeMismatches: 0
                        duplicateLocations: 0
                        pointersMissingServiceDigitalIdentities: 0
                        pointersMissingQualifiers: 0
                        pointerCertificatesParsed: 0
                        pointerCertificatesInvalidAtAssessment: 0
                    fixtureReadiness:
                      usableForWalletTrustFixture: false
                      verdict: not_checked
                      checks: []
                      caveats:
                        - No referenced artifact was assessed.
                    fcafTrustedAuthorities:
                      scenarios: []
                    negativeFixtureDescriptors: []
                    summary:
                      totalPointers: 0
                      fetched: 0
                      fetchFailed: 0
                      xmlArtifacts: 0
                      jsonArtifacts: 0
                      unknownArtifacts: 0
                      ts119612:
                        conformant: 0
                        partiallyConformant: 0
                        nonConformant: 0
                        notApplicable: 0
                        notChecked: 0
                        unsupported: 0
                        inconclusive: 0
                        parseFailed: 0
                      ts119602:
                        conformant: 0
                        partiallyConformant: 0
                        nonConformant: 0
                        notApplicable: 0
                        notChecked: 0
                        unsupported: 0
                        inconclusive: 0
                        parseFailed: 0
                    results: []
      responses:
        "200":
          description: Markdown report.
          content:
            application/json:
              schema:
                type: object
                required:
                  - markdown
                properties:
                  markdown:
                    type: string
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
  /api/audit/lotl:
    post:
      summary: Audit a LoTL from a URL, JSON object, or raw file content
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LoTLAuditRequest"
      responses:
        "200":
          description: Audit completed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AuditResponse"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
  /api/audit/artifact:
    post:
      summary: Assess raw XML, JSON, or compact JAdES TL/LoTE content with optional
        bounded contextual evidence
      description: TS 119 602 scheme-explicit XML automatically receives a separate
        pinned offline XML Schema finding; unavailable local validator support
        is reported as unsupported. Applicable TS 119 602 artifacts also return
        the complete 81-family ledger coverage audit used by the verdict gate.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ArtifactContentRequest"
      responses:
        "200":
          description: Raw artifact assessment result.
          content:
            application/json:
              schema:
                type: object
                required:
                  - result
                properties:
                  result:
                    $ref: "#/components/schemas/TrustedListAuditResult"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
  /api/audit/certificate-chain:
    post:
      summary: Assess an RPAC/WRPAC certificate chain against supplied trust anchors
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CertificateChainRequest"
      responses:
        "200":
          description: Certificate-chain evidence assessment.
          content:
            application/json:
              schema:
                type: object
                required:
                  - assessment
                properties:
                  assessment:
                    $ref: "#/components/schemas/CertificateChainAssessment"
        "400":
          $ref: "#/components/responses/BadRequest"
  /api/audit/fixture-readiness:
    post:
      summary: Assess EUDI and FCAF trust-fixture readiness from a LoTL input
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/LoTLAuditRequest"
      responses:
        "200":
          description: Fixture readiness and deterministic negative descriptors.
          content:
            application/json:
              schema:
                type: object
                required:
                  - fixtureReadiness
                  - fcafTrustedAuthorities
                  - negativeFixtureDescriptors
                properties:
                  fixtureReadiness:
                    $ref: "#/components/schemas/FixtureReadiness"
                  fcafTrustedAuthorities:
                    $ref: "#/components/schemas/FcafTrustedAuthoritiesReadiness"
                  negativeFixtureDescriptors:
                    type: array
                    items:
                      $ref: "#/components/schemas/NegativeFixtureDescriptor"
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
  /api/reports/markdown:
    post:
      summary: Render Markdown from a machine-readable audit report
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - report
              additionalProperties: false
              properties:
                report:
                  $ref: "#/components/schemas/AuditReport"
      responses:
        "200":
          description: Markdown report.
          content:
            application/json:
              schema:
                type: object
                required:
                  - markdown
                properties:
                  markdown:
                    type: string
        "400":
          $ref: "#/components/responses/BadRequest"
        "500":
          $ref: "#/components/responses/InternalError"
components:
  responses:
    BadRequest:
      description: Invalid request.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ApiErrorResponse"
          examples:
            invalid:
              value:
                error:
                  code: invalid_request
                  message: Invalid request body.
    InternalError:
      description: Unexpected internal error.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ApiErrorResponse"
  schemas:
    ConformanceLevel:
      type: string
      enum:
        - conformant
        - partially_conformant
        - non_conformant
        - not_applicable
        - not_checked
        - unsupported
        - inconclusive
        - fetch_failed
        - parse_failed
    CheckStatus:
      type: string
      enum:
        - pass
        - fail
        - warn
        - not_applicable
        - not_checked
        - unsupported
        - inconclusive
    AuditOptions:
      type: object
      additionalProperties: false
      properties:
        concurrency:
          type: integer
          minimum: 1
          default: 4
        timeoutMs:
          type: integer
          minimum: 1
          default: 15000
        strict:
          type: boolean
          default: false
        includeJsonLoteChecks:
          type: boolean
          default: false
          deprecated: true
          description: Retained for compatibility; deterministic local JSON LoTE checks
            always run.
        fetch:
          type: boolean
          default: true
    LoTLAuditRequest:
      type: object
      additionalProperties: false
      oneOf:
        - required:
            - url
        - required:
            - lotl
        - required:
            - content
      properties:
        url:
          type: string
          format: uri
        lotl:
          oneOf:
            - type: object
              additionalProperties: true
            - type: string
        content:
          type: string
        options:
          $ref: "#/components/schemas/AuditOptions"
        context:
          $ref: "#/components/schemas/Ts119602ContextOptions"
        rpacChain:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
    ArtifactContentRequest:
      type: object
      required:
        - content
      additionalProperties: false
      properties:
        content:
          type: string
          minLength: 1
        source:
          type: string
        contentType:
          type: string
        declared:
          $ref: "#/components/schemas/DeclaredPointer"
        options:
          $ref: "#/components/schemas/ArtifactAssessOptions"
        context:
          $ref: "#/components/schemas/Ts119602ContextOptions"
    ContextArtifactInput:
      type: object
      required:
        - content
      additionalProperties: false
      properties:
        content:
          type: string
          minLength: 1
        source:
          type: string
        contentType:
          type: string
    Ts119602ContextOptions:
      type: object
      additionalProperties: false
      description: Explicit prior TL/LoTE evidence and opt-in bounded network checks
        shared by TS 119 612 and TS 119 602 assessment. Dereferencing is
        disabled unless dereference is true.
      properties:
        dereference:
          type: boolean
          default: false
        priorArtifacts:
          type: array
          maxItems: 32
          items:
            $ref: "#/components/schemas/ContextArtifactInput"
        trustedSignerFingerprintsSha256:
          type: array
          maxItems: 64
          items:
            type: string
            pattern: ^[A-Fa-f0-9]{64}$
        ts119612Signer:
          $ref: "#/components/schemas/Ts119612SignerEvidence"
        pointerSigners:
          type: array
          maxItems: 32
          items:
            $ref: "#/components/schemas/TrustListPointerSignerEvidence"
        ts119602:
          $ref: "#/components/schemas/Ts119602ContextualEvidence"
        maxDereferences:
          type: integer
          minimum: 1
          maximum: 32
          default: 16
        maxBytesPerArtifact:
          type: integer
          minimum: 1
          maximum: 20971520
          default: 5242880
        concurrency:
          type: integer
          minimum: 1
          maximum: 32
          default: 4
        maxTraversalDepth:
          type: integer
          minimum: 1
          maximum: 8
          default: 3
    Ts119602ContextualEvidence:
      type: object
      additionalProperties: false
      description: Explicit TS 119 602 human-reviewed resource semantics,
        authoritative registration/contact records, and scheme-defined
        expired-status values.
      properties:
        resources:
          type: array
          maxItems: 32
          items:
            $ref: "#/components/schemas/Ts119602ResourceEvidence"
        authoritative:
          $ref: "#/components/schemas/Ts119602AuthoritativeEvidence"
        expiredServiceStatusUris:
          type: array
          maxItems: 64
          items:
            type: string
            format: uri
    Ts119602ResourceEvidence:
      type: object
      required:
        - location
        - sha256
        - assertions
        - source
        - checkedAt
      additionalProperties: false
      properties:
        location:
          type: string
          format: uri
        sha256:
          type: string
          pattern: ^[A-Fa-f0-9]{64}$
        assertions:
          type: array
          minItems: 1
          uniqueItems: true
          items:
            type: string
            enum:
              - scheme_scope_and_context
              - approval_scheme
              - operator_approval_process
              - entity_approval_process
              - approval_criteria
              - assessor_selection_and_rules
              - separate_body_responsibilities_and_liabilities
              - scheme_contact_information
              - scheme_policy_and_rules
              - list_usage_and_interpretation
              - policy_or_legal_notice
        source:
          type: string
          minLength: 1
        checkedAt:
          type: string
          format: date-time
    Ts119602PostalAddressEvidence:
      type: object
      required:
        - streetAddress
        - country
      additionalProperties: false
      properties:
        streetAddress:
          type: string
          minLength: 1
        country:
          type: string
          minLength: 2
    Ts119602AuthoritativeIdentityEvidence:
      type: object
      required:
        - source
        - checkedAt
        - names
        - postalAddresses
        - electronicAddresses
      additionalProperties: false
      properties:
        source:
          type: string
          minLength: 1
        checkedAt:
          type: string
          format: date-time
        names:
          type: array
          minItems: 1
          maxItems: 64
          items:
            type: string
            minLength: 1
        registrationIdentifiers:
          type: array
          maxItems: 64
          items:
            type: string
            minLength: 1
        postalAddresses:
          type: array
          maxItems: 64
          items:
            $ref: "#/components/schemas/Ts119602PostalAddressEvidence"
        electronicAddresses:
          type: array
          maxItems: 64
          items:
            type: string
            format: uri
        associatedBodies:
          type: array
          maxItems: 64
          items:
            type: string
            minLength: 1
    Ts119602AuthoritativeEntityEvidence:
      type: object
      required:
        - entityPath
        - source
        - checkedAt
        - names
        - postalAddresses
        - electronicAddresses
      additionalProperties: false
      properties:
        entityPath:
          type: string
          minLength: 1
        source:
          type: string
          minLength: 1
        checkedAt:
          type: string
          format: date-time
        names:
          type: array
          minItems: 1
          maxItems: 64
          items:
            type: string
            minLength: 1
        registrationIdentifiers:
          type: array
          maxItems: 64
          items:
            type: string
            minLength: 1
        postalAddresses:
          type: array
          maxItems: 64
          items:
            $ref: "#/components/schemas/Ts119602PostalAddressEvidence"
        electronicAddresses:
          type: array
          maxItems: 64
          items:
            type: string
            format: uri
        associatedBodies:
          type: array
          maxItems: 64
          items:
            type: string
            minLength: 1
    Ts119602AuthoritativeEvidence:
      type: object
      additionalProperties: false
      properties:
        schemeOperator:
          $ref: "#/components/schemas/Ts119602AuthoritativeIdentityEvidence"
        entities:
          type: array
          maxItems: 256
          items:
            $ref: "#/components/schemas/Ts119602AuthoritativeEntityEvidence"
    Ts119612SignerEvidence:
      type: object
      additionalProperties: false
      description: Separately supplied certificate-path and revocation evidence for a
        TS 119 612 TLSO signer. Embedded KeyInfo certificates are never implicit
        trust anchors.
      properties:
        intermediateCertificates:
          type: array
          maxItems: 16
          items:
            type: string
            minLength: 1
        trustAnchors:
          type: array
          maxItems: 16
          items:
            type: string
            minLength: 1
        revocation:
          type: object
          additionalProperties: false
          required:
            - status
            - source
            - checkedAt
            - signerFingerprintSha256
          properties:
            status:
              type: string
              enum:
                - good
                - revoked
                - unknown
            source:
              type: string
              minLength: 1
            checkedAt:
              type: string
              format: date-time
            nextUpdate:
              type: string
              format: date-time
            signerFingerprintSha256:
              type: string
              pattern: ^[A-Fa-f0-9]{64}$
    TrustListPointerSignerEvidence:
      type: object
      required:
        - location
      additionalProperties: false
      description: Separately supplied certificate-path and revocation evidence for
        the signer at one exact LoTELocation.
      properties:
        location:
          type: string
          format: uri
        intermediateCertificates:
          type: array
          maxItems: 16
          items:
            type: string
            minLength: 1
        trustAnchors:
          type: array
          maxItems: 16
          items:
            type: string
            minLength: 1
        revocation:
          type: object
          additionalProperties: false
          required:
            - status
            - source
            - checkedAt
            - signerFingerprintSha256
          properties:
            status:
              type: string
              enum:
                - good
                - revoked
                - unknown
            source:
              type: string
              minLength: 1
            checkedAt:
              type: string
              format: date-time
            nextUpdate:
              type: string
              format: date-time
            signerFingerprintSha256:
              type: string
              pattern: ^[A-Fa-f0-9]{64}$
    CertificateChainRequest:
      type: object
      required:
        - chain
      additionalProperties: false
      properties:
        chain:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        format:
          type: string
          enum:
            - pem
            - der_base64
            - x5c
        trustAnchors:
          type: array
          items:
            type: string
        declaredRole:
          type: string
          enum:
            - wallet_provider
            - pid_provider
            - qeaa_provider
            - pub_eaa_provider
            - access_ca_or_wrpac_provider
            - registration_ca_or_wrprc_provider
            - registrar_or_register
    ArtifactAssessOptions:
      type: object
      additionalProperties: false
      properties:
        timeoutMs:
          type: integer
          minimum: 1
          default: 15000
        strict:
          type: boolean
          default: false
        includeJsonLoteChecks:
          type: boolean
          default: false
          deprecated: true
          description: Retained for compatibility; deterministic local JSON LoTE checks
            always run.
    ApiErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - invalid_request
                - invalid_lotl_json
                - invalid_url
                - assessment_failed
                - internal_error
            message:
              type: string
            details: true
    AuditResponse:
      type: object
      required:
        - report
        - markdown
      properties:
        report:
          $ref: "#/components/schemas/AuditReport"
        markdown:
          type: string
    AuditReport:
      type: object
      required:
        - schemaVersion
        - tool
        - generatedAt
        - input
        - lotl
        - weBuildProfile
        - fixtureReadiness
        - fcafTrustedAuthorities
        - negativeFixtureDescriptors
        - summary
        - results
      properties:
        schemaVersion:
          type: integer
          const: 7
        tool:
          type: object
          required:
            - name
            - version
          properties:
            name:
              type: string
              const: we-build-tl-audit
            version:
              type: string
        generatedAt:
          type: string
          format: date-time
        input:
          type: object
          required:
            - source
            - kind
          properties:
            source:
              type: string
            kind:
              type: string
              enum:
                - file
                - url
                - json
            sha256:
              type: string
        lotl:
          $ref: "#/components/schemas/LoTLSummary"
        weBuildProfile:
          $ref: "#/components/schemas/WeBuildProfileSummary"
        fixtureReadiness:
          $ref: "#/components/schemas/FixtureReadiness"
        fcafTrustedAuthorities:
          $ref: "#/components/schemas/FcafTrustedAuthoritiesReadiness"
        negativeFixtureDescriptors:
          type: array
          items:
            $ref: "#/components/schemas/NegativeFixtureDescriptor"
        summary:
          type: object
          required:
            - totalPointers
            - fetched
            - fetchFailed
            - xmlArtifacts
            - jsonArtifacts
            - unknownArtifacts
            - ts119612
            - ts119602
          properties:
            totalPointers:
              type: integer
              minimum: 0
            fetched:
              type: integer
              minimum: 0
            fetchFailed:
              type: integer
              minimum: 0
            xmlArtifacts:
              type: integer
              minimum: 0
            jsonArtifacts:
              type: integer
              minimum: 0
            unknownArtifacts:
              type: integer
              minimum: 0
            ts119612:
              type: object
              required:
                - conformant
                - partiallyConformant
                - nonConformant
                - notApplicable
                - notChecked
                - unsupported
                - inconclusive
                - parseFailed
              properties:
                conformant:
                  type: integer
                  minimum: 0
                partiallyConformant:
                  type: integer
                  minimum: 0
                nonConformant:
                  type: integer
                  minimum: 0
                notApplicable:
                  type: integer
                  minimum: 0
                notChecked:
                  type: integer
                  minimum: 0
                unsupported:
                  type: integer
                  minimum: 0
                inconclusive:
                  type: integer
                  minimum: 0
                parseFailed:
                  type: integer
                  minimum: 0
            ts119602:
              type: object
              required:
                - conformant
                - partiallyConformant
                - nonConformant
                - notApplicable
                - notChecked
                - unsupported
                - inconclusive
                - parseFailed
              properties:
                conformant:
                  type: integer
                  minimum: 0
                partiallyConformant:
                  type: integer
                  minimum: 0
                nonConformant:
                  type: integer
                  minimum: 0
                notApplicable:
                  type: integer
                  minimum: 0
                notChecked:
                  type: integer
                  minimum: 0
                unsupported:
                  type: integer
                  minimum: 0
                inconclusive:
                  type: integer
                  minimum: 0
                parseFailed:
                  type: integer
                  minimum: 0
        results:
          type: array
          items:
            $ref: "#/components/schemas/TrustedListAuditResult"
    LoTLSummary:
      type: object
      required:
        - pointerCount
        - uniqueLocationCount
        - duplicateLocations
      properties:
        schemeOperatorName:
          type: string
        schemeName:
          type: string
        loteType:
          type: string
        sequenceNumber:
          type: integer
        issueDateTime:
          type: string
        nextUpdate:
          type: string
        pointerCount:
          type: integer
          minimum: 0
        uniqueLocationCount:
          type: integer
          minimum: 0
        duplicateLocations:
          type: array
          items:
            type: string
    WeBuildProfileSummary:
      type: object
      required:
        - recognized
        - recognitionReasons
        - listTypeCounts
        - roleCounts
        - pointerConsistency
      properties:
        recognized:
          type: boolean
        recognitionReasons:
          type: array
          items:
            type: string
        listTypeCounts:
          type: object
          additionalProperties:
            type: integer
            minimum: 0
        roleCounts:
          type: object
          additionalProperties:
            type: integer
            minimum: 0
        pointerConsistency:
          type: object
          required:
            - declaredMimeMismatches
            - duplicateLocations
            - pointersMissingServiceDigitalIdentities
            - pointersMissingQualifiers
            - pointerCertificatesParsed
            - pointerCertificatesInvalidAtAssessment
          properties:
            declaredMimeMismatches:
              type: integer
              minimum: 0
            duplicateLocations:
              type: integer
              minimum: 0
            pointersMissingServiceDigitalIdentities:
              type: integer
              minimum: 0
            pointersMissingQualifiers:
              type: integer
              minimum: 0
            pointerCertificatesParsed:
              type: integer
              minimum: 0
            pointerCertificatesInvalidAtAssessment:
              type: integer
              minimum: 0
    FixtureReadiness:
      type: object
      required:
        - usableForWalletTrustFixture
        - verdict
        - checks
        - caveats
      properties:
        usableForWalletTrustFixture:
          type: boolean
        verdict:
          type: string
          enum:
            - ready
            - not_ready
            - partially_ready
            - not_checked
        checks:
          type: array
          items:
            $ref: "#/components/schemas/CheckResult"
        caveats:
          type: array
          items:
            type: string
        rpacChain:
          type: object
          required:
            - chainStructurallyValid
            - trustedByTlLote
          properties:
            chainStructurallyValid:
              type: boolean
            trustedByTlLote:
              type: boolean
    FcafTrustedAuthoritiesReadiness:
      type: object
      required:
        - scenarios
      properties:
        scenarios:
          type: array
          items:
            $ref: "#/components/schemas/FcafTrustedAuthoritiesScenario"
    FcafTrustedAuthoritiesScenario:
      type: object
      required:
        - id
        - status
        - evidence
        - missingPrerequisites
      properties:
        id:
          type: string
          enum:
            - aki_positive_match_possible
            - aki_no_match_possible
            - etsi_tl_positive_match_possible
            - etsi_tl_no_match_possible
            - etsi_tl_unreachable_negative_possible
            - etsi_tl_invalid_signature_negative_possible
            - etsi_tl_cascading_lotl_tl_possible
            - rpac_chain_to_access_ca_possible
        status:
          type: string
          enum:
            - ready
            - not_ready
            - partially_ready
            - not_checked
        evidence:
          type: object
          additionalProperties: true
        missingPrerequisites:
          type: array
          items:
            type: string
    NegativeFixtureDescriptor:
      type: object
      required:
        - id
        - status
        - title
        - sourceArtifacts
        - evidence
        - steps
        - missingPrerequisites
      properties:
        id:
          type: string
          enum:
            - unknown_access_ca
            - expired_rpac
            - wrong_lote_or_list_type
            - unreachable_tl_url
            - invalid_tl_signature
            - missing_trust_anchor
            - rpac_chain_not_anchored
            - requested_verifier_role_not_present
        status:
          type: string
          enum:
            - ready
            - not_ready
            - partially_ready
            - not_checked
        title:
          type: string
        sourceArtifacts:
          type: array
          items:
            type: string
        evidence:
          type: object
          additionalProperties: true
        steps:
          type: array
          items:
            type: string
        missingPrerequisites:
          type: array
          items:
            type: string
    PointerSummary:
      type: object
      required:
        - index
        - location
        - declared
      properties:
        index:
          type: integer
          minimum: 1
        location:
          type: string
        declared:
          $ref: "#/components/schemas/DeclaredPointer"
    DeclaredPointer:
      type: object
      required:
        - pointerCertificateFingerprintsSha256
      properties:
        mimeType:
          type: string
        loteType:
          type: string
        schemeOperatorName:
          type: string
        schemeTerritory:
          type: string
        pointerCertificateFingerprintsSha256:
          type: array
          items:
            type: string
    TrustedListAuditResult:
      type: object
      required:
        - id
        - index
        - source
        - location
        - declared
        - fetch
        - detected
        - ts119602Classification
        - standardApplicability
        - referenceProfiles
        - ts119612
        - ts119602
      properties:
        id:
          type: string
        index:
          type: integer
          minimum: 1
        source:
          type: string
          description: Assessed artifact source URL or path.
        location:
          type: string
        declared:
          $ref: "#/components/schemas/DeclaredPointer"
        fetch:
          type: object
          required:
            - attempted
            - ok
          properties:
            attempted:
              type: boolean
            ok:
              type: boolean
            status:
              type: integer
            statusText:
              type: string
            finalUrl:
              type: string
            contentType:
              type: string
            durationMs:
              type: integer
              minimum: 0
            sha256:
              type: string
            bytes:
              type: integer
              minimum: 0
            error:
              type: string
        detected:
          type: object
          required:
            - format
            - artifactKind
          properties:
            format:
              type: string
              enum:
                - xml
                - json
                - jws
                - html
                - text
                - empty
                - unknown
            artifactKind:
              type: string
              enum:
                - ts119612_xml_tsl
                - ts119612_xml_lotl
                - xml_lotl_like
                - xml_lote
                - json_lote
                - json_lotl
                - html_error
                - unknown
        ts119602Classification:
          $ref: "#/components/schemas/Ts119602Classification"
        standardApplicability:
          type: object
          required:
            - ts119612
            - ts119602
            - weBuildProfile
            - eudiTrustRole
          properties:
            ts119612:
              $ref: "#/components/schemas/ApplicabilityStatus"
            ts119602:
              $ref: "#/components/schemas/ApplicabilityStatus"
            weBuildProfile:
              $ref: "#/components/schemas/ApplicabilityStatus"
            eudiTrustRole:
              $ref: "#/components/schemas/ApplicabilityStatus"
        ts119612Coverage:
          $ref: "#/components/schemas/Ts119612CoverageAudit"
        ts119602Coverage:
          $ref: "#/components/schemas/Ts119602CoverageAudit"
        referenceProfiles:
          type: object
          required:
            - eudiRiTs119612
            - weBuildTs119612
          additionalProperties: false
          properties:
            eudiRiTs119612:
              $ref: "#/components/schemas/ReferenceProfileAssessment"
            weBuildTs119612:
              $ref: "#/components/schemas/ReferenceProfileAssessment"
        ts119612:
          $ref: "#/components/schemas/StandardAssessment"
        ts119602:
          $ref: "#/components/schemas/StandardAssessment"
        extracted:
          type: object
          additionalProperties: true
          properties:
            tslVersionIdentifier:
              type: string
            tslSequenceNumber:
              type: string
            tslType:
              type: string
            schemeOperatorName:
              type: array
              items:
                type: string
            schemeName:
              type: array
              items:
                type: string
            schemeTerritory:
              type: string
            statusDeterminationApproach:
              type: string
            listIssueDateTime:
              type: string
            nextUpdate:
              type: string
            distributionPoints:
              type: array
              items:
                type: string
            trustServiceProviderCount:
              type: integer
              minimum: 0
            serviceCount:
              type: integer
              minimum: 0
            certificates:
              type: array
              items:
                $ref: "#/components/schemas/CertificateSummary"
            jsonLote:
              type: object
              additionalProperties: true
    StandardAssessment:
      type: object
      required:
        - applicable
        - conformanceLevel
        - score
        - checks
        - mandatoryFailures
        - warnings
      properties:
        applicable:
          type: boolean
        conformanceLevel:
          $ref: "#/components/schemas/ConformanceLevel"
        score:
          oneOf:
            - type: number
              minimum: 0
              maximum: 100
            - type: "null"
        checks:
          type: array
          items:
            $ref: "#/components/schemas/CheckResult"
        mandatoryFailures:
          type: array
          items:
            type: string
        warnings:
          type: array
          items:
            type: string
    Ts119612CoverageAudit:
      type: object
      additionalProperties: false
      required:
        - standard
        - artifactKind
        - ledger
        - applicableImplemented
        - blockers
        - completeVerdictEligible
        - requirements
      properties:
        standard:
          type: object
          additionalProperties: false
          required:
            - document
            - version
            - publicationDate
          properties:
            document:
              type: string
            version:
              type: string
            publicationDate:
              type: string
        artifactKind:
          type: string
          enum:
            - ts119612_xml_tsl
            - ts119612_xml_lotl
        ledger:
          type: object
          additionalProperties: false
          required:
            - total
            - applicable
            - notApplicable
            - implemented
            - partial
            - notImplemented
            - contextual
          properties:
            total:
              type: integer
              minimum: 0
            applicable:
              type: integer
              minimum: 0
            notApplicable:
              type: integer
              minimum: 0
            implemented:
              type: integer
              minimum: 0
            partial:
              type: integer
              minimum: 0
            notImplemented:
              type: integer
              minimum: 0
            contextual:
              type: integer
              minimum: 0
        applicableImplemented:
          type: object
          additionalProperties: false
          required:
            - total
            - conclusive
            - nonConclusive
          properties:
            total:
              type: integer
              minimum: 0
            conclusive:
              type: integer
              minimum: 0
            nonConclusive:
              type: integer
              minimum: 0
        blockers:
          type: object
          additionalProperties: false
          required:
            - partialRequirementIds
            - notImplementedRequirementIds
            - nonConclusiveImplementedRequirementIds
            - contextualRequirementIds
          properties:
            partialRequirementIds:
              type: array
              items:
                type: string
            notImplementedRequirementIds:
              type: array
              items:
                type: string
            nonConclusiveImplementedRequirementIds:
              type: array
              items:
                type: string
            contextualRequirementIds:
              type: array
              items:
                type: string
        completeVerdictEligible:
          type: boolean
        requirements:
          type: array
          items:
            $ref: "#/components/schemas/Ts119612RequirementCoverage"
    Ts119612RequirementCoverage:
      type: object
      additionalProperties: false
      required:
        - requirementId
        - title
        - citations
        - applicability
        - evidenceScope
        - implementationStatus
        - linkedCheckIds
        - observedFindings
        - outcome
        - conclusive
      properties:
        requirementId:
          type: string
        title:
          type: string
        citations:
          type: array
          items:
            type: object
            additionalProperties: false
            required:
              - location
            properties:
              location:
                type: string
              title:
                type: string
        applicability:
          type: string
          enum:
            - applicable
            - not_applicable
        evidenceScope:
          type: string
          enum:
            - local
            - contextual
            - mixed
        implementationStatus:
          type: string
          enum:
            - implemented
            - partial
            - not_implemented
        linkedCheckIds:
          type: array
          items:
            type: string
        observedFindings:
          type: array
          items:
            type: object
            additionalProperties: false
            required:
              - id
              - status
            properties:
              id:
                type: string
              status:
                $ref: "#/components/schemas/CheckStatus"
        outcome:
          type: string
          enum:
            - pass
            - fail
            - warn
            - not_applicable
            - not_checked
            - unsupported
            - inconclusive
            - partial
            - not_implemented
        conclusive:
          type: boolean
    Ts119602CoverageAudit:
      type: object
      additionalProperties: false
      required:
        - standard
        - selection
        - ledger
        - applicableImplemented
        - blockers
        - completeVerdictEligible
        - requirements
      properties:
        standard:
          type: object
          additionalProperties: false
          required:
            - document
            - version
            - publicationDate
          properties:
            document:
              type: string
            version:
              type: string
            publicationDate:
              type: string
        selection:
          type: object
          additionalProperties: false
          required:
            - binding
            - bindingStatus
            - profile
            - profileStatus
            - schemeMode
          properties:
            binding:
              type: string
              enum:
                - scheme_explicit_json
                - scheme_explicit_xml
                - ts119612_alternative_xml
                - unknown
            bindingStatus:
              type: string
              enum:
                - selected
                - candidate
                - unsupported
                - not_applicable
            profile:
              type: string
              enum:
                - pid_providers
                - wallet_providers
                - wrpac_providers
                - wrprc_providers
                - pub_eaa_providers
                - registrars_and_registers
                - unknown
            profileStatus:
              type: string
              enum:
                - selected
                - not_selected
                - conflict
            schemeMode:
              type: string
              enum:
                - implicit
                - explicit
                - unknown
        ledger:
          type: object
          additionalProperties: false
          required:
            - total
            - applicable
            - notApplicable
            - implemented
            - partial
            - notImplemented
            - contextual
          properties:
            total:
              type: integer
              minimum: 0
            applicable:
              type: integer
              minimum: 0
            notApplicable:
              type: integer
              minimum: 0
            implemented:
              type: integer
              minimum: 0
            partial:
              type: integer
              minimum: 0
            notImplemented:
              type: integer
              minimum: 0
            contextual:
              type: integer
              minimum: 0
        applicableImplemented:
          type: object
          additionalProperties: false
          required:
            - total
            - conclusive
            - nonConclusive
          properties:
            total:
              type: integer
              minimum: 0
            conclusive:
              type: integer
              minimum: 0
            nonConclusive:
              type: integer
              minimum: 0
        blockers:
          type: object
          additionalProperties: false
          required:
            - partialRequirementIds
            - notImplementedRequirementIds
            - nonConclusiveImplementedRequirementIds
            - contextualRequirementIds
            - selection
          properties:
            partialRequirementIds:
              type: array
              items:
                type: string
            notImplementedRequirementIds:
              type: array
              items:
                type: string
            nonConclusiveImplementedRequirementIds:
              type: array
              items:
                type: string
            contextualRequirementIds:
              type: array
              items:
                type: string
            selection:
              type: array
              items:
                type: string
                enum:
                  - binding_not_selected
                  - profile_conflict
                  - scheme_mode_unknown
        completeVerdictEligible:
          type: boolean
        requirements:
          type: array
          items:
            $ref: "#/components/schemas/Ts119602RequirementCoverage"
    Ts119602RequirementCoverage:
      allOf:
        - $ref: "#/components/schemas/Ts119612RequirementCoverage"
    Ts119602Classification:
      type: object
      required:
        - dataModel
        - binding
        - bindingStatus
        - profile
        - profileStatus
        - applicability
        - reasons
        - evidence
      properties:
        dataModel:
          type: string
          enum:
            - ts119602
            - ts119612
            - unknown
        binding:
          type: string
          enum:
            - scheme_explicit_json
            - scheme_explicit_xml
            - ts119612_alternative_xml
            - unknown
        bindingStatus:
          type: string
          enum:
            - selected
            - candidate
            - unsupported
            - not_applicable
        profile:
          type: string
          enum:
            - pid_providers
            - wallet_providers
            - wrpac_providers
            - wrprc_providers
            - pub_eaa_providers
            - registrars_and_registers
            - unknown
        profileStatus:
          type: string
          enum:
            - selected
            - not_selected
            - conflict
        applicability:
          $ref: "#/components/schemas/ApplicabilityStatus"
        reasons:
          type: array
          items:
            type: string
        evidence:
          type: object
          additionalProperties: false
          properties:
            rootLocalName:
              type: string
            rootNamespace:
              type: string
            embeddedType:
              type: string
            declaredType:
              type: string
            embeddedProfile:
              type: string
              enum:
                - pid_providers
                - wallet_providers
                - wrpac_providers
                - wrprc_providers
                - pub_eaa_providers
                - registrars_and_registers
                - unknown
            declaredProfile:
              type: string
              enum:
                - pid_providers
                - wallet_providers
                - wrpac_providers
                - wrprc_providers
                - pub_eaa_providers
                - registrars_and_registers
                - unknown
    ApplicabilityStatus:
      type: string
      enum:
        - applicable
        - not_applicable
        - unknown
    ReferenceProfileAssessment:
      type: object
      required:
        - applicability
        - recognized
        - recognitionReasons
        - observedRoles
        - checks
      additionalProperties: false
      properties:
        applicability:
          $ref: "#/components/schemas/ApplicabilityStatus"
        recognized:
          type: boolean
        recognitionReasons:
          type: array
          items:
            type: string
        observedRoles:
          type: array
          uniqueItems: true
          items:
            type: string
            enum:
              - wallet_provider
              - pid_provider
              - qeaa_provider
              - pub_eaa_provider
              - access_ca_or_wrpac_provider
              - registration_ca_or_wrprc_provider
              - registrar_or_register
        checks:
          type: array
          items:
            $ref: "#/components/schemas/CheckResult"
    CheckResult:
      type: object
      required:
        - id
        - category
        - status
        - severity
        - message
      properties:
        id:
          type: string
        category:
          type: string
          enum:
            - fetch
            - parse
            - schema
            - structure
            - dates
            - signature
            - xades
            - services
            - certificates
            - profile
        status:
          $ref: "#/components/schemas/CheckStatus"
        severity:
          type: string
          enum:
            - info
            - warning
            - error
            - critical
        message:
          type: string
        evidence: true
    CertificateSummary:
      type: object
      required:
        - source
      properties:
        source:
          type: string
          enum:
            - pointer
            - xml_signature
            - json_signature
            - service_digital_identity
        subject:
          type: string
        issuer:
          type: string
        serialNumber:
          type: string
        notBefore:
          type: string
        notAfter:
          type: string
        fingerprintSha256:
          type: string
        validAtAssessmentTime:
          type: boolean
    CertificateChainAssessment:
      type: object
      required:
        - certificates
        - trustAnchors
        - chainStructurallyValid
        - trustedByTlLote
        - checks
      properties:
        declaredRole:
          type: string
        certificates:
          type: array
          items:
            $ref: "#/components/schemas/ChainCertificateEvidence"
        trustAnchors:
          type: array
          items:
            $ref: "#/components/schemas/ChainCertificateEvidence"
        chainStructurallyValid:
          type: boolean
        trustedByTlLote:
          type: boolean
        checks:
          type: array
          items:
            $ref: "#/components/schemas/CheckResult"
    ChainCertificateEvidence:
      type: object
      required:
        - position
        - subject
        - issuer
        - serialNumber
        - notBefore
        - notAfter
        - fingerprintSha256
        - validAtAssessmentTime
      properties:
        position:
          type: string
          enum:
            - end_entity
            - intermediate
            - trust_anchor
        subject:
          type: string
        issuer:
          type: string
        serialNumber:
          type: string
        notBefore:
          type: string
        notAfter:
          type: string
        fingerprintSha256:
          type: string
        validAtAssessmentTime:
          type: boolean
        basicConstraintsCa:
          type: boolean
        keyUsage:
          type: array
          items:
            type: string
        extendedKeyUsage:
          type: array
          items:
            type: string
