Class OpenApiContractTest

    • Constructor Detail

      • OpenApiContractTest

        public OpenApiContractTest​(MockServerLogger mockServerLogger)
    • Method Detail

      • runContractTests

        public List<OpenApiContractTest.ContractTestResult> runContractTests​(String specUrlOrPayload,
                                                                             String baseUrl,
                                                                             String operationIdFilter,
                                                                             Function<HttpRequest,​HttpResponse> httpSender)
        Runs contract tests for each operation in the spec.
        Parameters:
        specUrlOrPayload - URL, file path, or inline JSON/YAML of the OpenAPI spec
        baseUrl - base URL of the service under test (e.g. "http://localhost:8080")
        operationIdFilter - optional filter to test only a specific operation
        httpSender - function that sends an HttpRequest and returns an HttpResponse
        Returns:
        list of per-operation results