openapi: 3.1.0
info:
  title: TMT API
  description: API working with Test cases in run
  version: 1.0.0
paths:
  /api/v2/rpc (LIST_MULTIPLE_LINKS_TEST_CASES_IN_RUN):
    post:
      summary: Get available test cases to add to run
      description: >
        List the cases within a given suite that are available to add into Run.
        This excludes the cases already in Run.

        <br/>This accepts a parent node as a starting point for searching, which
        can be Test suite or Test folder, then it will returns all the available
        nodes (Test folders and Test cases) of this parent node.

        <br/>For a test folder you might have in the response, you can
        continually use this endpoint to search recursively until all test cases
        are found.

        <br/>**This is not applicable for closed run**

        <br/>

        <br/>**Notice**: TMT currently uses this operation to travel the test
        case tree. Thus it can reused by API Client to get the test cases of a
        suite too. However, this "tree traversal" process might too complicated
        for API client, then this operation is subject to change by providing a
        new operation for easily getting all test cases of a suite in Run
      parameters:
        - $ref: '#/components/parameters/ProjectIdHeader'
        - $ref: '#/components/parameters/SubProjectIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetAvailableCaseRequest'
              examples:
                $ref: example/GET_AVAILABLE_TEST_CASES-request.json
      responses:
        '200':
          description: Return list of direct cases and folder under the parent node.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAvailableCaseResponse'
                examples:
                  $ref: example/GET_AVAILABLE_TEST_CASES-response.json
  /api/v2/rpc (GET_TEST_CASE_EXECUTION):
    post:
      summary: Get test case execution detail
      description: Return detailed information of a test execution document
      parameters:
        - $ref: '#/components/parameters/ProjectIdHeader'
        - $ref: '#/components/parameters/SubProjectIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetTestExecutionDocumentRequest'
              examples:
                $ref: example/GET_TEST_CASE_EXECUTION-request.json
      responses:
        '200':
          description: Content of the test execution
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestExecutionDocumentResponse'
                examples:
                  $ref: example/GET_TEST_CASE_EXECUTION-response.json
  /api/v2/rpc (GET_TEST_CASE_EXECUTIONS):
    post:
      summary: Get test case executions
      description: Return detailed information of multiple test execution documents
      parameters:
        - $ref: '#/components/parameters/ProjectIdHeader'
        - $ref: '#/components/parameters/SubProjectIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetTestExecutionsDocumentRequest'
              examples:
                $ref: example/GET_TEST_CASE_EXECUTIONS-request.json
      responses:
        '200':
          description: Content of the test executions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTestExecutionsDocumentResponse'
                examples:
                  $ref: example/GET_TEST_CASE_EXECUTIONS-response.json
  /api/v2/rpc (ADD_TEST_CASES_TO_RUN):
    post:
      summary: Add test cases to run
      description: >
        Add test cases into a test run<br/>

        **Notice:**

        - This is not applicable for closed test run<br/>

        - The test suite must be added into the Run first before adding TC to
        Run<br/>
      parameters:
        - $ref: '#/components/parameters/ProjectIdHeader'
        - $ref: '#/components/parameters/SubProjectIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddTestCasesToRunRequest'
              examples:
                $ref: example/ADD_TEST_CASES_TO_RUN-request.json
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NullDocumentResponse'
                examples:
                  $ref: example/ADD_TEST_CASES_TO_RUN-response.json
  /api/v2/rpc (ADD_TEST_CASES_TO_RUN_BY_ID):
    post:
      summary: Add test cases to run by id
      description: >
        Add test cases into a test run by using test case's id<br/>

        **Notice:**

        - This is not applicable for closed test run<br/>

        - Test suites cointaing test cases which were not added to the test run
        yet will be added automatically<br/>
      parameters:
        - $ref: '#/components/parameters/ProjectIdHeader'
        - $ref: '#/components/parameters/SubProjectIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddTestCasesToRunByIdRequest'
              examples:
                $ref: example/ADD_TEST_CASES_TO_RUN_BY_ID-request.json
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddTestCasesToRunAsyncDocumentResponse'
                examples:
                  $ref: example/ADD_TEST_CASES_TO_RUN_BY_ID-response.json
  /api/v2/rpc (ADD_TEST_CASES_TO_RUN_ASYNC):
    post:
      summary: Add test cases to run async by id
      description: >
        Add test cases of a test suite into a test run. The process submit a
        task request to add the test case into Run asynchronously. The operation
        simply returns the document reference of the task request. Which you can
        refer to get the task status.<br/>

        **Notice:**

        - This is not applicable for closed test run<br/>

        - All test cases must be in the same suite<br/>

        - Test suites containing test cases which were not added to the test run
        yet will be added automatically<br/>
      parameters:
        - $ref: '#/components/parameters/ProjectIdHeader'
        - $ref: '#/components/parameters/SubProjectIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddTestCasesToRunByIdRequest'
              examples:
                $ref: example/ADD_TEST_CASES_TO_RUN_BY_ID-request.json
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NullDocumentResponse'
                examples:
                  $ref: example/ADD_TEST_CASES_TO_RUN_ASYNC-response.json
  /api/v2/rpc (DELETE_TEST_CASES_FROM_RUN):
    post:
      summary: Delete test cases from run
      description: >-
        Delete test cases from run. **This is not applicable for closed test
        run**
      parameters:
        - $ref: '#/components/parameters/ProjectIdHeader'
        - $ref: '#/components/parameters/SubProjectIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteTestCasesFromRunRequest'
              examples:
                $ref: example/DELETE_TEST_CASES_FROM_RUN-request.json
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NullDocumentResponse'
                examples:
                  $ref: example/DELETE_TEST_CASES_FROM_RUN-response.json
  /api/v2/rpc (SAVE_TEST_CASE_EXECUTION):
    post:
      summary: Update a test case execution
      description: >
        Update content of a test case execution. **This is not applicable for
        closed test run**

        <br/>**Notice:** The result must be not **Untested** during the update
        test execution
      parameters:
        - $ref: '#/components/parameters/ProjectIdHeader'
        - $ref: '#/components/parameters/SubProjectIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveTestExecutionRequest'
              examples:
                $ref: example/SAVE_TEST_CASE_EXECUTION-request.json
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModifyDocumentResponse'
                examples:
                  $ref: example/SAVE_TEST_CASE_EXECUTION-response.json
  /api/v2/rpc (SAVE_TEST_EXECUTIONS_ASYNC):
    post:
      summary: Update multiple test case executions
      description: >
        Update content of multiple test case executions. **This is not
        applicable for closed test run**

        <br/>The process submit a task request to modify the test executions
        asynchronously. The operation simply returns the document reference of
        the task request. Which you can refer to get the task status.<br>
      parameters:
        - $ref: '#/components/parameters/ProjectIdHeader'
        - $ref: '#/components/parameters/SubProjectIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveTestExecutionsAsyncRequest'
              examples:
                $ref: example/SAVE_TEST_EXECUTIONS_ASYNC-request.json
      responses:
        '200':
          description: document reference of the task request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SaveTestExecutionsAsyncResponse'
                examples:
                  $ref: example/SAVE_TEST_EXECUTIONS_ASYNC-response.json
security:
  - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
  schemas:
    GetTestExecutionDocumentRequest:
      allOf:
        - $ref: '#/components/schemas/RpcRequestWithIdAndJsonRpc'
        - type: object
        - required:
            - params
            - method
          properties:
            method:
              type: string
              description: GET_TEST_CASE_EXECUTION
            params:
              type: object
              required:
                - testRunDocRef
                - testCasesDocRef
              properties:
                testRunDocRef:
                  type: string
                  description: test run document reference
                testCasesDocRef:
                  type: string
                  description: test case document reference
      examples:
        - jsonrpc: '2.0'
          id: GET_TEST_CASE_EXECUTION_55e7567c-c3ff-4c76-904f-05508a7bddda
          method: GET_TEST_CASE_EXECUTION
          params:
            testRunDocRef: TestRun-dm/3b53beea-a611-462c-9553-703c4df4d669
            testCaseDocRef: TestCase-dm/20766
    GetTestExecutionsDocumentRequest:
      allOf:
        - $ref: '#/components/schemas/RpcRequestWithIdAndJsonRpc'
        - type: object
        - required:
            - params
            - method
          properties:
            method:
              type: string
              description: GET_TEST_CASE_EXECUTIONS
            params:
              type: object
              required:
                - testRunDocRef
                - page
              properties:
                page:
                  $ref: '#/components/schemas/PageSpec'
                testRunDocRef:
                  type: string
                  description: test run document reference
                testSuiteDocRef:
                  type: string
                  description: >-
                    test suite document reference. It will load only the test
                    executions within this test suite if it is set
      examples:
        - jsonrpc: '2.0'
          id: GetTestExecutionsOperation
          method: GET_TEST_EXECUTIONS
          params:
            testRunDocRef: TestRun-dm/3b53beea-a611-462c-9553-703c4df4d669
            page:
              offset: 0
              limit: 10
    GetTestExecutionsDocumentResponse:
      allOf:
        - $ref: '#/components/schemas/ListDocumentResponse'
        - type: object
          properties:
            result:
              properties:
                entries:
                  items:
                    allOf:
                      - $ref: '#/components/schemas/TestExecutionDocumentResult'
      examples:
        - jsonrpc: '2.0'
          id: GetTestExecutionsOperation
          result:
            fullSize: 3
            page:
              offset: 0
              limit: 10
            entries:
              - docRef: >-
                  TestRunTestCaseAdditionalFields-dm/502a7144-60b4-4e42-93af-649793c6f7c1
                documentModelName: TestRunTestCaseAdditionalFields-dm
                document:
                  id: TestRunTestCaseAdditionalFields-dm
                  Root:
                    General:
                      TenantId: T_1
                      Result: '1'
                      TestRunDocRef: TestRun-dm/3b53beea-a611-462c-9553-703c4df4d669
                      TestSuiteDocRef: TestSuite-dm/20744
                      TestCaseDocRef: TestCase-dm/20763
                      Id: RC_5
                      ProjectId: P_9
                      SubprojectId: SP_1
                      ResultDetails: null
                      Defects: null
                      HasTester: false
                    Metadata:
                      CreatedBy: tmtdev
                      DisplayCreatedOn: '2024-11-14T07:12:08'
                      CreatedOn: 1731568328343
                      EditedBy: tmtdev
                      DisplayEditedOn: '2024-11-14T07:12:08'
                      EditedOn: 1731568328343
                      LatestTestCaseExecutionData:
                        TestRunId: R_4
                        TestCaseId: C_35
                        TestCaseTitle: Advanced Search
                    TestSteps:
                      - Id: b1479160-2865-49ae-b437-0aa9c1a6af51
                        Result: '1'
                        Number: 1
                    DisplayFields:
                      TesterDisplayName: ''
                  __meta:
                    creator: tmtdev
                    modifier: tmtdev
                    createdAt: '2024-11-14T07:12:08'
                    modifiedAt: '2024-11-14T07:12:08'
                    modelReference: TestRunTestCaseAdditionalFields-dm
                    docRef: >-
                      TestRunTestCaseAdditionalFields-dm/502a7144-60b4-4e42-93af-649793c6f7c1
                    modelVersion: null
              - docRef: >-
                  TestRunTestCaseAdditionalFields-dm/1662df01-7cfb-41a2-8f4f-1e2e1d5a4af3
                documentModelName: TestRunTestCaseAdditionalFields-dm
                document:
                  id: TestRunTestCaseAdditionalFields-dm
                  Root:
                    General:
                      TenantId: T_1
                      Result: '1'
                      TestRunDocRef: TestRun-dm/3b53beea-a611-462c-9553-703c4df4d669
                      TestSuiteDocRef: TestSuite-dm/20744
                      TestCaseDocRef: TestCase-dm/20758
                      Id: RC_4
                      ProjectId: P_9
                      SubprojectId: SP_1
                      ResultDetails: null
                      Defects: null
                      HasTester: false
                    Metadata:
                      CreatedBy: trung
                      DisplayCreatedOn: '2024-11-14T07:00:58'
                      CreatedOn: 1731567658860
                      EditedBy: trung
                      DisplayEditedOn: '2024-11-14T07:00:58'
                      EditedOn: 1731567658860
                      LatestTestCaseExecutionData:
                        TestRunId: R_4
                        TestCaseId: C_37
                        TestCaseTitle: Update Product, Update Index
                    TestSteps:
                      - Id: 76cef20c-c068-4993-a2cc-9360353931bb
                        Result: '1'
                        Number: 1
                    DisplayFields:
                      TesterDisplayName: ''
                  __meta:
                    creator: trung
                    modifier: trung
                    createdAt: '2024-11-14T07:00:58'
                    modifiedAt: '2024-11-14T07:00:58'
                    modelReference: TestRunTestCaseAdditionalFields-dm
                    docRef: >-
                      TestRunTestCaseAdditionalFields-dm/1662df01-7cfb-41a2-8f4f-1e2e1d5a4af3
                    modelVersion: null
    DeleteTestCasesFromRunRequest:
      allOf:
        - $ref: '#/components/schemas/RpcRequestWithIdAndJsonRpc'
        - type: object
        - required:
            - params
            - method
          properties:
            method:
              type: string
              description: DELETE_TEST_CASES_FROM_RUN
            params:
              type: object
              required:
                - testRunDocRef
                - testCasesDocRefs
              properties:
                testRunDocRef:
                  type: string
                  description: test run document reference
                testCasesDocRefs:
                  type: array<string>
                  description: list of test case's document references
      examples:
        - id: DELETE_TEST_CASES_FROM_RUN-1
          method: DELETE_TEST_CASES_FROM_RUN
          params:
            testRunDocRef: TestRun-dm/3b53beea-a611-462c-9553-703c4df4d669
            testCaseDocRefs:
              - TestCase-dm/20760
              - TestCase-dm/20755
    AddTestCasesToRunAsyncDocumentResponse:
      allOf:
        - $ref: '#/components/schemas/RpcResult'
        - type: object
          properties:
            result:
              type: string
              description: task request document reference
      examples:
        - jsonrpc: '2.0'
          id: ADD_TEST_CASES_TO_RUN_1
          result: null
    AddTestCasesToRunRequest:
      allOf:
        - $ref: '#/components/schemas/RpcRequestWithIdAndJsonRpc'
        - type: object
        - required:
            - params
            - method
          properties:
            method:
              type: string
              description: ADD_TEST_CASES_TO_RUN
            params:
              type: object
              required:
                - testRunDocRef
                - testCasesDocRefs
              properties:
                testRunDocRef:
                  type: string
                  description: test run document reference
                testCasesDocRefs:
                  type: array<string>
                  description: list of test case's document references
                validateSameTestSuite:
                  type: boolean
                  description: >-
                    Default is TRUE. The API will validate that all test cases
                    belong to the same test suite before adding them to the test
                    run.
      examples:
        - id: ADD_TEST_CASES_TO_RUN_1
          method: ADD_TEST_CASES_TO_RUN
          params:
            testRunDocRef: TestRun-dm/3b53beea-a611-462c-9553-703c4df4d669
            testCaseDocRefs:
              - TestCase-dm/20760
              - TestCase-dm/20755
    AddTestCasesToRunByIdRequest:
      allOf:
        - $ref: '#/components/schemas/RpcRequestWithIdAndJsonRpc'
        - type: object
        - required:
            - params
            - method
          properties:
            method:
              type: string
              description: ADD_TEST_CASES_TO_RUN_BY_ID
            params:
              required:
                - testRunId
                - testCaseIds
              properties:
                testRunId:
                  type: string
                  description: test run id
                testCaseIds:
                  type: array<string>
                  description: list of test case's id
                validateSameTestSuite:
                  type: boolean
                  description: >-
                    Default is TRUE. The API will validate that all test cases
                    belong to the same test suite before adding them to the test
                    run.
      examples:
        - id: ADD_TEST_CASES_TO_RUN_1
          method: ADD_TEST_CASES_TO_RUN_BY_ID
          params:
            testRunId: R_4
            testCaseIds:
              - C_35
              - C_38
    GetAvailableCaseRequest:
      allOf:
        - $ref: '#/components/schemas/RpcRequestWithIdAndJsonRpc'
        - type: object
        - required:
            - method
            - params
          properties:
            method:
              type: string
              description: LIST_MULTIPLE_LINKS_TEST_CASES_IN_RUN
            params:
              type: object
              description: test run document reference
              required:
                - filter
                - testRunFilter
                - sort
                - sources
              properties:
                filter:
                  $ref: '#/components/schemas/FilterSpec'
                  description: >-
                    Filter specification. It is reserved for future. Please pass
                    the empty value
                sort:
                  $ref: '#/components/schemas/SortSpec'
                  description: >-
                    Sort specification. It is reserved for future. Please pass
                    the empty value
                testRunFilter:
                  type: object
                  description: Describe the test run we want to add the test cases into
                  properties:
                    testRunDocRef:
                      type: string
                      description: >-
                        Reference to the test run document, in the format of
                        "TestRun-dm/{id}".
                    isTestCaseFilter:
                      type: boolean
                      description: Must be "false" to load the available test cases
                    resultDocumentModel:
                      type: string
                      description: Must be "TestRunTestCaseTestCase-dm"
                sources:
                  description: >-
                    the parent nodes where you want to load the cases inside. It
                    can be Test suite or Test folder
                  $ref: '#/components/schemas/Sources'
      examples:
        - jsonrpc: '2.0'
          id: >-
            LIST_MULTIPLE_LINKS_TEST_CASES_IN_RUN_ed21f0f4-906b-4eec-9978-1e4777d4356c
          method: LIST_MULTIPLE_LINKS_TEST_CASES_IN_RUN
          params:
            filter: {}
            sort: {}
            testRunFilter:
              testRunDocRef: TestRun-dm/3b53beea-a611-462c-9553-703c4df4d669
              isTestCaseFilter: false
              resultDocumentModel: TestRunTestCaseTestCase-dm
            sources:
              - docRef: TestSuite-dm/20744
                relationshipModel: TestSuiteTestCaseFolder-rm
                role: TestSuite
    GetAvailableCaseResponse:
      allOf:
        - $ref: '#/components/schemas/RpcResult'
        - type: object
          properties:
            result:
              properties:
                source:
                  $ref: '#/components/schemas/RpcResult'
                linkResultEntries:
                  description: >-
                    type is a specification result set. List results is of the
                    pageable type ResultSet\<LinkResultEntry\>
                  allOf:
                    - $ref: '#/components/schemas/ResultSet'
                    - type: object
                      properties:
                        entries:
                          type: array
                          items:
                            $ref: '#/components/schemas/AvailableTestCaseResultEntry'
      examples:
        - jsonrpc: '2.0'
          id: >-
            LIST_MULTIPLE_LINKS_TEST_CASES_IN_RUN_ed21f0f4-906b-4eec-9978-1e4777d4356c
          result:
            - source:
                relationshipModel: TestSuiteTestCaseFolder-rm
                role: TestSuite
                docRef: TestSuite-dm/20744
              linkResultEntries:
                fullSize: 4
                page:
                  offset: 0
                  limit: 4
                entries:
                  - linkRef:
                      linkDescriptor:
                        relationshipModel: TestSuiteTestCaseFolder-rm
                        entities:
                          - role: TestSuite
                            modelName: TestSuite-dm
                            docRef: TestSuite-dm/20744
                          - role: TestCaseFolderSupertype
                            modelName: TestCase-dm
                            docRef: TestCase-dm/20760
                        predecessorLinkRef: null
                        position: TOP
                      id: '19441'
                    document:
                      target:
                        Root:
                          General:
                            Title: Filtering
                            Id: C_36
                            Status: NEW
                            ImportantAdditionForNextTestRun: false
                          Criteria:
                            TimeRelevance: false
                          Risk:
                            RiskLevel: UNDEFINED
                            CombinationLikelihoodImpact: null__null
                  - linkRef:
                      linkDescriptor:
                        relationshipModel: TestSuiteTestCaseFolder-rm
                        entities:
                          - role: TestSuite
                            modelName: TestSuite-dm
                            docRef: TestSuite-dm/20744
                          - role: TestCaseFolderSupertype
                            modelName: TestCase-dm
                            docRef: TestCase-dm/20758
                        predecessorLinkRef: null
                        position: TOP
                      id: '19442'
                    document:
                      target:
                        Root:
                          General:
                            Title: Update Product, Update Index
                            Id: C_37
                            Status: NEW
                            ImportantAdditionForNextTestRun: false
                          Criteria:
                            TimeRelevance: false
                          Risk:
                            RiskLevel: UNDEFINED
                            CombinationLikelihoodImpact: null__null
                  - linkRef:
                      linkDescriptor:
                        relationshipModel: TestSuiteTestCaseFolder-rm
                        entities:
                          - role: TestSuite
                            modelName: TestSuite-dm
                            docRef: TestSuite-dm/20744
                          - role: TestCaseFolderSupertype
                            modelName: TestCase-dm
                            docRef: TestCase-dm/20755
                        predecessorLinkRef: null
                        position: TOP
                      id: '19443'
                    document:
                      target:
                        Root:
                          General:
                            Title: Sold-out Products
                            Id: C_38
                            Status: NEW
                            ImportantAdditionForNextTestRun: false
                          Criteria:
                            TimeRelevance: false
                          Risk:
                            RiskLevel: UNDEFINED
                            CombinationLikelihoodImpact: null__null
                  - linkRef:
                      linkDescriptor:
                        relationshipModel: TestSuiteTestCaseFolder-rm
                        entities:
                          - role: TestSuite
                            modelName: TestSuite-dm
                            docRef: TestSuite-dm/20744
                          - role: TestCaseFolderSupertype
                            modelName: TestFolder-dm
                            docRef: TestFolder-dm/f533a52b-2cf6-4c99-b3e5-e6e4a4c4ed78
                        predecessorLinkRef: null
                        position: TOP
                      id: '947755'
                    document:
                      target:
                        Root:
                          General:
                            Title: search
                            Id: F_4
                            Description: ''
    AvailableTestCaseResultEntry:
      allOf:
        - $ref: '#/components/schemas/LinkResultEntry'
        - type: object
          properties:
            document:
              type: object
              description: SimpleTestCaseDocument or SimpleTestFolderDocument
              oneOf:
                - $ref: '#/components/schemas/SimpleTestCaseDocument'
                - $ref: '#/components/schemas/SimpleTestFolderDocument'
    TestExecutionDocumentResponse:
      allOf:
        - $ref: '#/components/schemas/DocumentResult'
        - type: object
          properties:
            document:
              $ref: '#/components/schemas/TestExecutionTargetDocument'
      examples:
        - jsonrpc: '2.0'
          id: GET_TEST_CASE_EXECUTION_55e7567c-c3ff-4c76-904f-05508a7bddda
          result:
            docRef: TestRunTestCaseTestCase-dm/947761
            documentModelName: TestRunTestCaseTestCase-dm
            document:
              target:
                Root:
                  Criteria:
                    TimeRelevance: false
                    Dependency: INTERRELATION
                    Tags: search,basic
                    SearchableTags: '|[search]|,|[basic]|'
                    Assignment:
                      - value: CUSTOMER_APPROVAL
                    AdditionalToolsAids:
                      - value: DATABASE
                      - value: IMPORT_FILE
                      - value: SCRIPT
                    SearchTags:
                      - Value: search
                      - Value: basic
                    TestFocus:
                      - value: CALCULATION
                  General:
                    ImportantAdditionForNextTestRun: true
                    Status: NEW
                    ProjectId: P_9
                    ProjectVersionNumber: 1.2.0
                    SubprojectId: SP_1
                    TestSuiteId: S_5
                    Title: Simple search
                    Id: C_34
                    TechnicalId: d36ab1ba-62b2-4ee0-aac5-3c596e4c61b1
                    TenantId: T_1
                    HasAssignee: true
                    User: viethuynh
                    Type: FUNCTIONAL
                    Automation: TO_BE_EVALUATED
                    Prioritization: MANDATORY
                    EstimatedExecutionTime: 15
                    Description: Basis seach test
                  AdditionalInfo:
                    TriggeredBy: peter.lange
                    TriggeredAt: 1691563510046
                    CreatingEvent: NEW_VERSION_CREATED
                    Path: >-
                      mgm Webshop$###$Web Frontend$###$04 Browse and search
                      products$###$Simple search
                    CurrentPath: TestSuite-dm/5860
                    SourceTestCaseInfo:
                      Id: C_34
                      TenantId: T_1
                      ProjectId: P_9
                      SubprojectId: SP_1
                      ProjectVersionNumber: 1.1.0
                  Metadata:
                    CreatedBy: peter.parker
                    DisplayCreatedOn: '2023-03-07T13:04:35'
                    CreatedOn: 1678194275028
                    EditedBy: trung
                    DisplayEditedOn: '2024-11-14T07:58:33'
                    EditedOn: 1731571113058
                    IsImported: false
                    AssignedToVersion:
                      AssignedToNumber: 1.2.0
                      AssignedToTitle: August 2023
                  Risk:
                    RiskLevel: UNDEFINED
                    CombinationLikelihoodImpact: null__null
                  Sources:
                    Tickets: TMT-123
                  TestSteps:
                    - 'No': 1
                      Id: 44c23d35-8ff8-4e94-ad98-74720c1f155c
                      Action: enter product title "abc"
                      ExpectedResult: return products containing the "abc" in the title
                __meta:
                  creator: SYSTEM
                  modifier: trung
                  docRef: TestCase-dm/20766
                  modelReference: TestCase-dm
                  createdAt: '2023-08-09T06:45:10'
                  modifiedAt: '2024-11-14T07:58:32'
                  modelVersion: null
                docRef: TestCase-dm/20766
              relationship:
                id: TestRunTestCaseAdditionalFields-dm
                Root:
                  General:
                    TenantId: T_1
                    Result: '1'
                    TestRunDocRef: TestRun-dm/3b53beea-a611-462c-9553-703c4df4d669
                    TestSuiteDocRef: TestSuite-dm/20744
                    TestCaseDocRef: TestCase-dm/20766
                    Id: RC_2
                    ProjectId: P_9
                    SubprojectId: SP_1
                    ResultDetails: null
                    Defects: null
                    HasTester: false
                  Metadata:
                    CreatedBy: trung
                    DisplayCreatedOn: '2024-11-14T06:58:05'
                    CreatedOn: 1731567485440
                    EditedBy: trung
                    DisplayEditedOn: '2024-11-14T06:58:05'
                    EditedOn: 1731567485440
                    LatestTestCaseExecutionData:
                      TestRunId: R_4
                      TestCaseId: C_34
                      TestCaseTitle: Simple search
                  TestSteps:
                    - Id: 44c23d35-8ff8-4e94-ad98-74720c1f155c
                      Result: '1'
                      Number: 1
                __meta:
                  creator: trung
                  modifier: trung
                  createdAt: '2024-11-14T06:58:05'
                  modifiedAt: '2024-11-14T06:58:05'
                  modelReference: TestRunTestCaseAdditionalFields-dm
                  docRef: >-
                    TestRunTestCaseAdditionalFields-dm/b2480120-3f21-4001-81bc-9f8e8801d3fa
                  modelVersion: null
                docRef: >-
                  TestRunTestCaseAdditionalFields-dm/b2480120-3f21-4001-81bc-9f8e8801d3fa
    TestExecutionTargetDocument:
      type: object
      properties:
        target:
          description: Test case document
          allOf:
            - $ref: '#/components/schemas/TestCaseDocument'
        relationship:
          allOf:
            - $ref: '#/components/schemas/TestExecutionDocument'
            - properties:
                id:
                  type: string
                  description: >-
                    The model name of the test execution document (that is the
                    link document between Test case and Test Run)
                  default: TestRunTestCaseAdditionalFields-dm
                docRef:
                  type: string
                  description: >-
                    the document reference of the link document (between Test
                    Case and Test Run)
    SaveTestExecutionRequest:
      allOf:
        - $ref: '#/components/schemas/RpcRequestWithIdAndJsonRpc'
        - type: object
          required:
            - method
            - params
          properties:
            method:
              type: string
              description: SAVE_TEST_CASE_EXECUTION
            params:
              required:
                - docRef
                - document
              properties:
                docRef:
                  type: string
                  description: test execution document reference
                document:
                  description: modified document content
                  $ref: '#/components/schemas/TestExecutionDocument'
      examples:
        - jsonrpc: '2.0'
          id: SAVE_TEST_CASE_EXECUTION_42835c59-72d6-43d5-94d6-95b75aaa415b
          method: SAVE_TEST_CASE_EXECUTION
          params:
            docRef: >-
              TestRunTestCaseAdditionalFields-dm/b2480120-3f21-4001-81bc-9f8e8801d3fa
            document:
              id: TestRunTestCaseAdditionalFields-dm
              Root:
                General:
                  TenantId: T_1
                  Result: '2'
                  TestRunDocRef: TestRun-dm/3b53beea-a611-462c-9553-703c4df4d669
                  TestSuiteDocRef: TestSuite-dm/20744
                  TestCaseDocRef: TestCase-dm/20766
                  Id: RC_2
                  ProjectId: P_9
                  SubprojectId: SP_1
                  ResultDetails: detail
                  Defects: TMT-456
                  HasTester: false
                  Tester: viethuynh
                Metadata:
                  CreatedBy: trung
                  DisplayCreatedOn: '2024-11-14T06:58:05'
                  CreatedOn: 1731567485440
                  EditedBy: trung
                  DisplayEditedOn: '2024-11-14T06:58:05'
                  EditedOn: 1731567485440
                  LatestTestCaseExecutionData:
                    TestRunId: R_4
                    TestCaseId: C_34
                    TestCaseTitle: Simple search
                TestSteps:
                  - Id: 44c23d35-8ff8-4e94-ad98-74720c1f155c
                    Result: '1'
                    Number: 1
                Attachments:
                  - FileName: bapserver-metrix-snapshot 10.55.51.png
                    File:
                      content: null
                      attachment_id: 5a1c0924-9e3c-4144-8a84-f6426c096e51
                      internal_filename: 1731576021318-0f034d9e-45a9-472b-83f1-1afe33b956cf.png
                      original_filename: bapserver-metrix-snapshot 10.55.51.png
                      size: 635194
                      mime_type: image/png
                    CreatedAt: '2024-11-14T09:20:28'
                    UploadOn: '2024-11-14'
                    OriginalFileName: bapserver-metrix-snapshot 10.55.51.png
                    UploadBy: trung
                    Referenced: false
                    CopyNumber: 0
                    ThumbnailId: 128633f6-b8d1-4579-9baa-1086b26eec85
              __meta:
                creator: trung
                modifier: trung
                createdAt: '2024-11-14T06:58:05'
                modifiedAt: '2024-11-14T06:58:05'
                modelReference: TestRunTestCaseAdditionalFields-dm
                docRef: >-
                  TestRunTestCaseAdditionalFields-dm/b2480120-3f21-4001-81bc-9f8e8801d3fa
                modelVersion: null
              docRef: >-
                TestRunTestCaseAdditionalFields-dm/b2480120-3f21-4001-81bc-9f8e8801d3fa
    SaveTestExecutionsAsyncRequest:
      allOf:
        - $ref: '#/components/schemas/RpcRequestWithIdAndJsonRpc'
        - type: object
          required:
            - method
            - params
          properties:
            method:
              type: string
              description: SAVE_TEST_EXECUTIONS_ASYNC
            params:
              required:
                - testRunId
                - decisionOnInvalidTestExecutionResult
                - testExecutions
              properties:
                testRunId:
                  type: string
                  description: Id of the test run
                decisionOnInvalidTestExecutionResult:
                  type: string
                  description: >-
                    Your desired action on invalid test execution result. An
                    invalid test execution has the value in the field Result
                    Detail, but field Result value is still is Untested
                  enum:
                    - SKIP (ignore saving these test executions)
                    - SET_IN_PROGRESS (change the result to In progress value)
                testExecutions:
                  type: array
                  description: List of test execution's contents
                  items:
                    $ref: '#/components/schemas/TestExecutionResultPayload'
      examples:
        - id: SAVE_TEST_EXECUTIONS_ASYNC-123
          method: SAVE_TEST_EXECUTIONS_ASYNC
          params:
            testRunId: R_15
            decisionOnInvalidTestExecutionResult: SET_IN_PROGRESS
            testExecutions:
              - testCaseId: C_19
                tester: tphan
                attachments:
                  FileName: Screenshot 2024-08-19 at 14.13.42.png
                  File:
                    content: null
                    attachment_id: de297d05-1451-4c22-9336-36f8f252f4e1
                    internal_filename: 1724827189603-30ca30ef-09fe-4677-8523-794bc3996af8.png
                    original_filename: Screenshot 2024-08-19 at 14.13.42.png
                    size: 89314
                    mime_type: image/png
                  CreatedAt: '2024-08-28T06:39:50'
                  UploadOn: '2024-08-28'
                  OriginalFileName: Screenshot 2024-08-19 at 14.13.42.png
                  UploadBy: tmtdev
                  Referenced: false
                  CopyNumber: 0
                  ThumbnailId: 5b12dbde-c453-4972-a4f2-a478c7738f6d
                result: '5'
                defects: TMT-1,TMT-2
                details: details
              - testCaseId: C_21
                tester: tphan
                attachments: []
                result: '0'
                defects: TMT-4,TMT-5
                details: details for C_1
    SaveTestExecutionsAsyncResponse:
      allOf:
        - $ref: '#/components/schemas/RpcResult'
        - type: object
          properties:
            result:
              type: string
              description: task request's document reference
      examples:
        - jsonrpc: '2.0'
          id: SAVE_TEST_EXECUTIONS_ASYNC-123
          result: TaskRequest-dm/661666
    TestSuiteExecutionDocument:
      allOf:
        - $ref: '#/components/schemas/schemas-TestSuiteExecutionDocument'
    RpcRequestWithIdAndJsonRpc:
      type: object
      required:
        - id
        - jsonrpc
      properties:
        id:
          type: string
          description: id of the operation
        jsonrpc:
          type: string
          description: must be 2.0
          example: '2.0'
    FilterSpec:
      description: filter specification.
      type: object
      properties:
        fullText:
          type: string
          description: the full text search
        filters:
          type: Array<String>
          description: Array of filter
        lang:
          type: string
          description: requested language
    SortSpec:
      description: type is a specification of the sorting to be applied on the server side.
      type: object
      properties:
        order:
          type: string
        lang:
          type: string
    Source:
      type: object
      properties:
        docRef:
          type: string
          description: the document reference of the document within a relationship
        relationshipModel:
          type: string
          description: name of the relationship model
        role:
          type: string
          description: the role of the document within a relationship
    Sources:
      type: array
      items:
        $ref: '#/components/schemas/Source'
    RpcResult:
      type: object
      properties:
        jsonrpc:
          type: string
          description: request jsonrpc version
        id:
          type: string
          description: id of the operation
        result:
          type: object
    PageSpec:
      description: pagination specification
      type: object
      properties:
        offset:
          type: integer
        limit:
          type: integer
    ResultSet:
      type: object
      properties:
        fullSize:
          type: Long
          description: Total number of the result
        page:
          $ref: '#/components/schemas/PageSpec'
        entries:
          type: object
    Entity:
      type: object
      properties:
        role:
          type: string
          description: Role of the entity that participates into this relationship
        modelName:
          type: string
          description: Model name of the entity that participates into this relationship
        docRef:
          type: string
          description: Document reference of the entity
    LinkDescriptor:
      type: object
      description: Information of entities in the relationship
      properties:
        relationshipModel:
          type: string
          description: Name of the relationship model
        entities:
          type: array
          description: Contains 2 items which are the parent and child
          items:
            $ref: '#/components/schemas/Entity'
        predecessorLinkRef:
          type: string
          description: Link reference of the predecessor
          nullable: true
        position:
          type: number
          description: The position of the node to the predecessorLinkRef
    LinkRef:
      type: object
      description: Represent the link contains the documents
      properties:
        linkDescriptor:
          $ref: '#/components/schemas/LinkDescriptor'
        id:
          type: string
          description: id of the relationship link
    LinkResultEntry:
      type: object
      properties:
        linkRef:
          $ref: '#/components/schemas/LinkRef'
        document:
          type: object
    SimpleTestCaseGeneral:
      type: object
      properties:
        ImportantAdditionForNextTestRun:
          type: boolean
          description: >-
            Indicates if this item is an important addition for the next test
            run (Version delta)
        Status:
          type: string
          description: The current status of this item
          enum:
            - NEW
            - IN_PROGRESS
            - TO_BE_REVIEWED
            - TO_BE_CORRECTED
            - TO_BE_REVIEWED_AGAIN
            - REVIEWED
            - DONE
        Title:
          type: string
          description: The title of this test case.
        Type:
          type: string
          description: The type of test case
          enum:
            - FUNCTIONAL
            - PERFORMANCE
            - SECURITY
            - USABILITY
            - MODEL
        Automation:
          type: string
          description: Indicates the automation status of this test case
          enum:
            - TO_BE_EVALUATED
            - TO_BE_AUTOMATED
            - AUTOMATED
            - AUTOMATED
            - NOT_TO_BE_AUTOMATED
        Prioritization:
          type: string
          description: >-
            Indicates the prioritization level of this test case (e.g.,
            MANDATORY).
          enum:
            - MANDATORY
            - OPTIONAL
            - NO_TEST
        EstimatedExecutionTime:
          type: integer
          description: The estimated time in minutes required to execute this test case.
        Id:
          type: string
          description: The id of the test case. This is unique in a project version
        User:
          type: string
          description: assignee of this test case
    Criteria:
      type: object
      properties:
        TimeRelevance:
          type: boolean
          description: Indicates if time relevance is considered in the criteria.
          default: false
        AdditionalToolsAids:
          type: array
          description: additional tools & aids
          items:
            properties:
              value:
                type: string
                enum:
                  - DATABASE
                  - IMPORT_FILE
                  - SCRIPT
        Assignment:
          type: array
          description: assignment description
          items:
            properties:
              value:
                type: string
                enum:
                  - CUSTOMER_APPROVAL
                  - CUSTOMER_TEST
        Dependency:
          type: string
          description: dependency of the test case
          enum:
            - INTERRELATION
        TestFocus:
          type: string
          description: TestFocus of the test case
          enum:
            - CALCULATION
            - PERMISSION
            - REAL_TIME_CALCULATION
        Tags:
          type: string
          description: tags of the test cases. The values are separated by the comma
        SearchTags:
          type: array
          readOnly: true
          description: >-
            \[**read only**] searchable values for tags. This is an **auto
            generated value**
          items:
            properties:
              value:
                type: string
                description: tag value
    Risk:
      type: object
      properties:
        RiskLevel:
          type: string
          deprecated: true
          description: >-
            \[**Read only**] The risk level of the business logic layer
            associated with this test case (e.g., UNDEFINED)
          enum:
            - LOW
            - MEDIUM
            - HIGH
            - UNDEFINED
        AutoCalculateLikelihood:
          type: boolean
          description: >-
            Determined if Likelihood value is manually input or automatically
            calculated by system
        Likelihood:
          type: string
          description: Likelihood value
          enum:
            - ALMOST_CERTAIN
            - LIKELY
            - POSSIBLE
            - UNLIKELY
            - RARE
        AutoCalculateImpact:
          type: boolean
          description: >-
            Determined if Impact value is manually input or automatically
            calculated by system
        Impact:
          type: string
          description: Impact value
          enum:
            - SERIOUS
            - MAJOR
            - MODERATE
            - MINOR
            - INSIGNIFICANT
        CombinationLikelihoodImpact:
          type: string
          description: >-
            \[**Read only**]A combination of likelihood and impact ratings for
            the risk level. This is an **auto generated value**
    SimpleTestCaseDocument:
      type: object
      description: Simple test case document
      properties:
        General:
          $ref: '#/components/schemas/SimpleTestCaseGeneral'
        Criteria:
          $ref: '#/components/schemas/Criteria'
        Risk:
          $ref: '#/components/schemas/Risk'
        Source:
          type: object
          properties:
            Tickets:
              type: string
              description: Associated ticket reference(s) for this test case.
    SimpleTestFolderGeneral:
      type: object
      properties:
        Title:
          type: string
          description: The title of this test folder.
        Id:
          type: string
          description: The id of the test folder. This is unique in a project version
        Description:
          type: string
          description: The description of the test folder
    SimpleTestFolderDocument:
      type: object
      description: Simple test folder document
      properties:
        General:
          $ref: '#/components/schemas/SimpleTestFolderGeneral'
    DocumentResult:
      type: object
      properties:
        docRef:
          type: string
          description: document reference
        documentModelName:
          type: string
          description: model name
        document:
          type: object
    TestCaseGeneral:
      allOf:
        - $ref: '#/components/schemas/SimpleTestCaseGeneral'
        - type: object
          properties:
            ProjectId:
              type: string
              description: The project's Id associated with this item.
            ProjectVersionNumber:
              type: string
              description: >-
                The version number of the (sub) project associated with this
                item.
            SubprojectId:
              type: string
              description: The subproject's id under the main project.
            TestSuiteId:
              type: string
              description: The test suite's id containing this test case.
            TechnicalId:
              type: string
              description: The technical identifier of the test case, often a UUID.
            TenantId:
              type: string
              description: The tenant id
            HasAssignee:
              type: boolean
              description: Indicates whether this test case has an assignee.
    Conditions:
      type: object
      properties:
        Preconditions:
          type: string
          description: The preconditions required before executing this test case.
    AdditionalInfo:
      type: object
      description: \[**Read only**] Descriptive information for the test case
      properties:
        TriggeredBy:
          type: string
          description: The username of the person who triggered this test case.
        TriggeredAt:
          type: integer
          format: int64
          description: The timestamp of when the test case was triggered.
        CreatingEvent:
          type: string
          description: The event that created this test case (e.g., NEW_VERSION_CREATED).
        Path:
          type: string
          description: The path in the project hierarchy to this test case.
        CurrentPath:
          type: string
          description: The current path or reference ID for the test case.
        SourceTestCaseInfo:
          type: object
          properties:
            Id:
              type: string
              description: The Id of the source test case.
            TenantId:
              type: string
              description: The tenant ID of the source test case.
            ProjectId:
              type: string
              description: The project ID of the source test case.
            SubprojectId:
              type: string
              description: The subproject ID of the source test case.
            ProjectVersionNumber:
              type: string
              description: The version number of the source project for this test case.
    schemas-Sources:
      type: object
      properties:
        Tickets:
          type: string
          description: Associated ticket reference(s) for this test case.
        Documents:
          type: string
          description: Business document associated with this test case.
    TestSteps:
      type: array
      items:
        type: object
        properties:
          'No':
            type: integer
            description: Number of the test step (one based)
          Id:
            type: string
            description: Id of the test step (as UUID format) (it is only unique within TC)
          Action:
            type: string
            description: The action to be performed in this test step.
          ExpectedResult:
            type: string
            description: The expected result upon completion of this test step.
    Metadata:
      type: object
      readOnly: true
      description: >-
        \[**Read only**] Metadata of the document. It will be ignored if
        included in the request of the add/update operations (e.g ADD_DOCUMENT,
        MODIFY_DOCUMENT)
      properties:
        CreatedBy:
          type: string
          description: who created this project
        DisplayCreatedOn:
          type: string
          format: date-time
          description: creation time in the human readable format (UTC time zone)
        CreatedOn:
          type: integer
          description: creation time of the project
        EditedBy:
          description: the last person who edited this project document
          type: string
        DisplayEditedOn:
          type: string
          format: date-time
          description: edited time in the human readable format (UTC time zone)
        EditedOn:
          description: the last edited time of the project
          type: integer
    AssignedToVersion:
      type: object
      description: describe the version info that this test case is associated
      properties:
        AssignedToNumber:
          type: string
          description: version number
        AssignedToTitle:
          type: string
          description: version title
    LatestTestCaseExecutionData:
      type: object
      description: latest test case execution for this test suite.
      properties:
        TestedOn:
          type: string
          format: date-time
          description: The date and time when the test case was last executed.
        TestedBy:
          type: string
          description: The username of the person who executed the test case.
        TestRunId:
          type: string
          description: The test run's id in which this test case was executed.
        TestRunTitle:
          type: string
          description: The title of the test run in which this test case was executed.
        VersionId:
          type: string
          description: >-
            The project version identifier associated with the test case during
            execution.
        VersionTitle:
          type: string
          description: The title of the version associated with the test case.
        TestCaseId:
          type: string
          description: The id of the test case that has the latest execution.
        TestCaseTitle:
          type: string
          description: The name of the test case that has the latest execution
    TestCaseMetadata:
      allOf:
        - $ref: '#/components/schemas/Metadata'
        - type: object
        - properties:
            IsImported:
              type: boolean
              description: >-
                indicate this test case is imported from external party (e.g
                Testrail)
              default: false
            AssignedToVersion:
              $ref: '#/components/schemas/AssignedToVersion'
            LatestTestCaseExecutionData:
              $ref: '#/components/schemas/LatestTestCaseExecutionData'
    File:
      type: object
      properties:
        content:
          type: string
          nullable: true
          description: Content of the file in base64 format.
        attachment_id:
          type: string
          description: Unique identifier for the attachment.
        internal_filename:
          type: string
          description: Internal storage filename for the attachment.
        original_filename:
          type: string
          description: Original name of the uploaded file.
        size:
          type: integer
          description: Size of the file in bytes.
        mime_type:
          type: string
          description: MIME type of the file.
    Attachment:
      type: object
      properties:
        FileName:
          type: string
          description: Name of the file attached.
        CreatedAt:
          type: string
          format: date-time
          description: Timestamp when the attachment was created.
        UploadOn:
          type: string
          format: date
          description: Date when the file was uploaded.
        OriginalFileName:
          type: string
          description: Original filename as provided during upload.
        UploadBy:
          type: string
          description: Username of the uploader.
        Referenced:
          type: boolean
          description: Indicates if the attachment is referenced elsewhere.
        CopyNumber:
          type: integer
          description: Number of times the attachment has been copied.
        ThumbnailId:
          type: string
          description: Identifier for the attachment’s thumbnail image.
        File:
          $ref: '#/components/schemas/File'
    Root:
      type: object
      properties:
        General:
          $ref: '#/components/schemas/TestCaseGeneral'
        Criteria:
          $ref: '#/components/schemas/Criteria'
        Conditions:
          $ref: '#/components/schemas/Conditions'
        AdditionalInfo:
          $ref: '#/components/schemas/AdditionalInfo'
        Sources:
          $ref: '#/components/schemas/schemas-Sources'
        Risk:
          $ref: '#/components/schemas/Risk'
        TestSteps:
          $ref: '#/components/schemas/TestSteps'
        Metadata:
          $ref: '#/components/schemas/TestCaseMetadata'
        Attachments:
          type: array
          items:
            $ref: '#/components/schemas/Attachment'
    Meta:
      type: object
      readOnly: true
      description: >-
        \[**Read only**] Contain the meta data information of the document. **It
        will be ignored if included in the request of the update operations**
        (e.g MODIFY_DOCUMENT)
      properties:
        creator:
          type: string
          readOnly: true
          description: The user who created the document
        modifier:
          type: string
          readOnly: true
          description: The user who last modified the document
        docRef:
          type: string
          description: Reference to the document
        modelReference:
          type: string
          description: Reference to the model associated with the document
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the document was created
        modifiedAt:
          type: string
          format: date-time
          description: Timestamp when the document was last modified
        modelVersion:
          type: string
          nullable: true
          description: Version of the model associated with the document
    TestCaseDocument:
      type: object
      properties:
        Root:
          $ref: '#/components/schemas/Root'
        __meta:
          $ref: '#/components/schemas/Meta'
    ResultCode:
      type: string
      description: Result code associated with the test.
      enum:
        - 1-Untested
        - 2-Passed
        - 3-Blocked
        - 4-Customer
        - 5-Failed (new)
        - 6-Failed (known)
        - 7-In progress
        - 8-On hold (external)
        - 9-On hold (internal)
        - 10-Retest
        - 11-Skipped
    RiskLevelData:
      type: object
      properties:
        TestCaseId:
          type: string
          description: Identifier of the test case
        RiskLevelHeatmap:
          type: string
          description: Risk level category on the heatmap
        CombinationRiskLevel:
          type: string
          description: Combined risk level scores in format 'business__history__scope'
        CombinationSeverityFrequency:
          type: string
          description: Combined severity and frequency values
        RiskLevelBusinessLogic:
          type: string
          description: Business logic risk level score
        Frequency:
          type: string
          description: Frequency of occurrence
        Severity:
          type: string
          description: Severity of impact
        RiskLevelTestHistory:
          type: string
          description: Test history risk level score
        Impact:
          type: string
          description: Impact level assessment
        Likelihood:
          type: string
          description: Likelihood assessment
        CombinationLikelihoodImpact:
          type: string
          description: Combined likelihood and impact values
        RiskLevelHeatmapValue:
          type: string
          description: Numeric value for heatmap risk level
        ReleaseScope:
          type: object
          description: Release scope related risk information
          properties:
            RiskLevelReleaseScope:
              type: string
              description: Release scope risk level score
            TestType:
              type: string
              description: Type of test identifier
            Priority:
              type: string
              description: Priority level identifier
            CombinationTestTypePriority:
              type: string
              description: Combined test type and priority values
    schemas-Root:
      type: object
      properties:
        General:
          type: object
          properties:
            TenantId:
              type: string
              description: Id for the tenant.
            Result:
              $ref: '#/components/schemas/ResultCode'
            TestRunDocRef:
              type: string
              description: >-
                Reference to the test run document in the format
                "TestRun-dm/{ID}".
            TestSuiteDocRef:
              type: string
              description: >-
                Reference to the test suite document in the format
                "TestSuite-dm/{ID}".
            TestCaseDocRef:
              type: string
              description: >-
                Reference to the associated test case document in the format
                "TestCase-dm/{ID}".
            Id:
              type: string
              description: Id of test execution.
            ProjectId:
              type: string
              description: Identifier for the project.
            SubprojectId:
              type: string
              description: Identifier for the subproject.
            ResultDetails:
              type: string
              nullable: true
              description: Additional details related to the result.
            Defects:
              type: string
              nullable: true
              description: Associated defects, if any.
            HasTester:
              type: boolean
              description: Indicates whether a tester is assigned.
        Metadata:
          type: object
          properties:
            CreatedBy:
              type: string
              description: User who created the document.
            DisplayCreatedOn:
              type: string
              format: date-time
              description: Display timestamp for creation in ISO format.
            CreatedOn:
              type: integer
              format: int64
              description: Epoch timestamp for creation.
            EditedBy:
              type: string
              description: User who last edited the document.
            DisplayEditedOn:
              type: string
              format: date-time
              description: Display timestamp for last edit in ISO format.
            EditedOn:
              type: integer
              format: int64
              description: Epoch timestamp for last edit.
            LatestTestCaseExecutionData:
              type: object
              properties:
                TestRunId:
                  type: string
                  description: Identifier for the test run.
                TestCaseId:
                  type: string
                  description: Identifier for the test case.
                TestCaseTitle:
                  type: string
                  description: Title of the test case.
        TestSteps:
          type: array
          items:
            type: object
            properties:
              Id:
                type: string
                description: Unique identifier for the test step.
              Result:
                $ref: '#/components/schemas/ResultCode'
              Number:
                type: integer
                description: Sequential number of the test step.
        RiskLevelData:
          $ref: '#/components/schemas/RiskLevelData'
    TestExecutionDocument:
      type: object
      description: Test execution document
      properties:
        __meta:
          $ref: '#/components/schemas/Meta'
        Root:
          $ref: '#/components/schemas/schemas-Root'
    ListDocumentResponse:
      allOf:
        - $ref: '#/components/schemas/RpcResult'
        - type: object
          properties:
            result:
              type: object
              properties:
                fullSize:
                  type: integer
                  description: Total number of the found item
                page:
                  $ref: '#/components/schemas/PageSpec'
                entries:
                  type: array
    TestExecutionDocumentResult:
      allOf:
        - $ref: '#/components/schemas/DocumentResult'
        - type: object
        - properties:
            document:
              description: Test case document
              $ref: '#/components/schemas/TestExecutionDocument'
    NullDocumentResponse:
      allOf:
        - $ref: '#/components/schemas/RpcResult'
        - type: object
          properties:
            result:
              type: object
              description: null value
      examples:
        - jsonrpc: '2.0'
          id: ADD_TEST_CASES_TO_RUN_1
          result: null
    ModifyDocumentResponse:
      allOf:
        - $ref: '#/components/schemas/RpcResult'
        - type: object
          properties:
            result:
              type: object
              description: null value
      examples:
        - jsonrpc: '2.0'
          id: SAVE_TEST_CASE_EXECUTION_42835c59-72d6-43d5-94d6-95b75aaa415b
          result: null
    TestExecutionResultPayload:
      type: object
      properties:
        testCaseId:
          type: string
          description: Identifier for the test case.
        tester:
          type: string
          description: Username of the tester executing the test case.
        attachments:
          type: array
          description: list of attachments
          items:
            $ref: '#/components/schemas/Attachment'
        result:
          $ref: '#/components/schemas/ResultCode'
        defects:
          type: string
          description: Comma-separated list of defect identifiers.
        details:
          type: string
          description: Additional details for the test execution.
    components-schemas-Root:
      type: object
      properties:
        General:
          type: object
          properties:
            TenantId:
              type: string
              description: Id for the tenant.
            ProjectId:
              type: string
              description: Identifier for the project.
            SubprojectId:
              type: string
              description: Identifier for the subproject.
            Assignee:
              type: string
              nullable: true
              description: Additional details related to the result.
            RecommendedPriority:
              type: object
              properties:
                Value:
                  type: string
                  description: >-
                    The recommended priority level for this suite (e.g., HIGH,
                    MEDIUM, LOW).
    schemas-TestSuiteExecutionDocument:
      type: object
      description: Test suite execution document
      properties:
        __meta:
          $ref: '#/components/schemas/Meta'
        Root:
          $ref: '#/components/schemas/components-schemas-Root'
  parameters:
    ProjectIdHeader:
      name: Project-Id
      in: header
      required: true
      schema:
        type: string
      description: Project Id or the project document reference
    SubProjectIdHeader:
      name: Subproject-Id
      in: header
      required: false
      schema:
        type: string
      description: >-
        Sub Project Id or the project document reference. It might be required
        if you want to access the sub project's resource
