All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.gematik.test.tiger.testenvmgr.api.TestsApi Maven / Gradle / Ivy

/*
 *
 * Copyright 2024 gematik GmbH
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/**
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.10.0).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
package de.gematik.test.tiger.testenvmgr.api;

import de.gematik.test.tiger.testenvmgr.api.model.ErrorDto;
import de.gematik.test.tiger.testenvmgr.api.model.TestDescriptionDto;
import de.gematik.test.tiger.testenvmgr.api.model.TestExecutionInformationDto;
import de.gematik.test.tiger.testenvmgr.api.model.TestExecutionRequestDto;
import de.gematik.test.tiger.testenvmgr.api.model.TestExecutionResultDto;
import java.util.UUID;
import io.swagger.v3.oas.annotations.ExternalDocumentation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.context.request.NativeWebRequest;
import org.springframework.web.multipart.MultipartFile;

import jakarta.validation.Valid;
import jakarta.validation.constraints.*;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import jakarta.annotation.Generated;

@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-09T12:14:31.265242911+01:00[Europe/Berlin]", comments = "Generator version: 7.10.0")
@Validated
@Tag(name = "tests", description = "start tests and retrieve test results")
public interface TestsApi {

    /**
     * GET /tests : get list of available tests
     * gets the list of available tests that were discovered by the JUnit Platform.
     *
     * @return List of available tests (status code 200)
     *         or Bad Request (status code 400)
     *         or Something went wrong server internally (status code 500)
     *         or The default error response (status code 200)
     */
    @Operation(
        operationId = "getAvailableTests",
        summary = "get list of available tests",
        description = "gets the list of available tests that were discovered by the JUnit Platform.",
        tags = { "tests" },
        responses = {
            @ApiResponse(responseCode = "200", description = "List of available tests", content = {
                @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = TestDescriptionDto.class)))
            }),
            @ApiResponse(responseCode = "400", description = "Bad Request", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = ErrorDto.class))
            }),
            @ApiResponse(responseCode = "500", description = "Something went wrong server internally", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = ErrorDto.class))
            }),
            @ApiResponse(responseCode = "default", description = "The default error response", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = ErrorDto.class))
            })
        }
    )
    @RequestMapping(
        method = RequestMethod.GET,
        value = "/tests",
        produces = { "application/json" }
    )
    
    ResponseEntity> getAvailableTests(
        
    );


    /**
     * GET /tests/runs/{testRunId} : get the results of a test run
     * gets the results of a test run. This includes a global test result and  the results for each test case. In case of failing tests, the failure message is also included. 
     *
     * @param testRunId testRunId for which to get the test results (required)
     * @return the test results for the given testRunId (status code 200)
     *         or The specified resource was not found (status code 404)
     *         or Bad Request (status code 400)
     *         or Something went wrong server internally (status code 500)
     *         or The default error response (status code 200)
     */
    @Operation(
        operationId = "getTestResults",
        summary = "get the results of a test run",
        description = "gets the results of a test run. This includes a global test result and  the results for each test case. In case of failing tests, the failure message is also included. ",
        tags = { "tests" },
        responses = {
            @ApiResponse(responseCode = "200", description = "the test results for the given testRunId", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = TestExecutionResultDto.class))
            }),
            @ApiResponse(responseCode = "404", description = "The specified resource was not found", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = ErrorDto.class))
            }),
            @ApiResponse(responseCode = "400", description = "Bad Request", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = ErrorDto.class))
            }),
            @ApiResponse(responseCode = "500", description = "Something went wrong server internally", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = ErrorDto.class))
            }),
            @ApiResponse(responseCode = "default", description = "The default error response", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = ErrorDto.class))
            })
        }
    )
    @RequestMapping(
        method = RequestMethod.GET,
        value = "/tests/runs/{testRunId}",
        produces = { "application/json" }
    )
    
    ResponseEntity getTestResults(
        @Parameter(name = "testRunId", description = "testRunId for which to get the test results", required = true, in = ParameterIn.PATH) @PathVariable("testRunId") UUID testRunId
    );


    /**
     * POST /tests/runs : request the execution of a selection of tests
     * sends a request for the execution of a selection of tests. The tests to be executed are specified with a TestExecutionRequest which includes uniqueIds, tags and file paths.  The execution request is queued for execution and will be executed as soon as any previously running tests finish. The response includes the id of the test run and the url where to find the results of the execution. 
     *
     * @param testExecutionRequestDto test execution request (required)
     * @return Request was received and test run is started (status code 202)
     *         or The specified resource was not found (status code 404)
     *         or Bad Request (status code 400)
     *         or Something went wrong server internally (status code 500)
     *         or The default error response (status code 200)
     */
    @Operation(
        operationId = "postExecutionRequest",
        summary = "request the execution of a selection of tests",
        description = "sends a request for the execution of a selection of tests. The tests to be executed are specified with a TestExecutionRequest which includes uniqueIds, tags and file paths.  The execution request is queued for execution and will be executed as soon as any previously running tests finish. The response includes the id of the test run and the url where to find the results of the execution. ",
        tags = { "tests" },
        responses = {
            @ApiResponse(responseCode = "202", description = "Request was received and test run is started", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = TestExecutionInformationDto.class))
            }),
            @ApiResponse(responseCode = "404", description = "The specified resource was not found", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = ErrorDto.class))
            }),
            @ApiResponse(responseCode = "400", description = "Bad Request", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = ErrorDto.class))
            }),
            @ApiResponse(responseCode = "500", description = "Something went wrong server internally", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = ErrorDto.class))
            }),
            @ApiResponse(responseCode = "default", description = "The default error response", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = ErrorDto.class))
            })
        }
    )
    @RequestMapping(
        method = RequestMethod.POST,
        value = "/tests/runs",
        produces = { "application/json" },
        consumes = { "application/json" }
    )
    
    ResponseEntity postExecutionRequest(
        @Parameter(name = "TestExecutionRequestDto", description = "test execution request", required = true) @Valid @RequestBody TestExecutionRequestDto testExecutionRequestDto
    );


    /**
     * POST /tests/runs/all : request execution of all tests
     * sends a request for the execution of all tests. The execution request is queued for execution and will be executed as soon as any previously running tests finish. The response includes the id of the test run and the url where to find the results of the execution.
     *
     * @return Request was received and test run is started (status code 202)
     *         or The specified resource was not found (status code 404)
     *         or Bad Request (status code 400)
     *         or Something went wrong server internally (status code 500)
     *         or The default error response (status code 200)
     */
    @Operation(
        operationId = "postExecutionRequestAllTests",
        summary = "request execution of all tests",
        description = "sends a request for the execution of all tests. The execution request is queued for execution and will be executed as soon as any previously running tests finish. The response includes the id of the test run and the url where to find the results of the execution.",
        tags = { "tests" },
        responses = {
            @ApiResponse(responseCode = "202", description = "Request was received and test run is started", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = TestExecutionInformationDto.class))
            }),
            @ApiResponse(responseCode = "404", description = "The specified resource was not found", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = ErrorDto.class))
            }),
            @ApiResponse(responseCode = "400", description = "Bad Request", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = ErrorDto.class))
            }),
            @ApiResponse(responseCode = "500", description = "Something went wrong server internally", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = ErrorDto.class))
            }),
            @ApiResponse(responseCode = "default", description = "The default error response", content = {
                @Content(mediaType = "application/json", schema = @Schema(implementation = ErrorDto.class))
            })
        }
    )
    @RequestMapping(
        method = RequestMethod.POST,
        value = "/tests/runs/all",
        produces = { "application/json" }
    )
    
    ResponseEntity postExecutionRequestAllTests(
        
    );

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy