/// <inheritdoc />
    public async Task <StubModel> ConvertToStubAsync(OpenApiServer server, OpenApiLine line, string tenant)
    {
        var request = new HttpRequestModel
        {
            Body    = _openApiDataFiller.BuildRequestBody(line.Operation),
            Headers = _openApiDataFiller.BuildRequestHeaders(line.Operation),
            Method  = line.OperationType.ToString().ToUpper(),
            Url     = $"{_openApiDataFiller.BuildServerUrl(server)}{_openApiDataFiller.BuildRelativeRequestPath(line.Operation, line.PathKey)}"
        };
        var response = new HttpResponseModel
        {
            Content    = _openApiDataFiller.BuildResponseBody(line.Response),
            Headers    = _openApiDataFiller.BuildResponseHeaders(line.Response),
            StatusCode = _openApiDataFiller.BuildHttpStatusCode(line.ResponseKey)
        };
        var stub = new StubModel
        {
            Tenant      = tenant,
            Description = line.Operation.Summary,
            Conditions  = await _httpRequestToConditionsService.ConvertToConditionsAsync(request),
            Response    = await _httpResponseToStubResponseService.ConvertToResponseAsync(response),
        };

        stub.EnsureStubId();
        return(stub);
    }
    private async Task <StubModel> MapStub(HttpRequestModel req, HttpResponseModel res, string tenant)
    {
        var conditions = await _httpRequestToConditionsService.ConvertToConditionsAsync(req);

        var response = await _httpResponseToStubResponseService.ConvertToResponseAsync(res);

        var stub = new StubModel
        {
            Tenant      = tenant,
            Description = $"{conditions.Method} request to path {conditions.Url?.Path}",
            Conditions  = conditions,
            Response    = response
        };

        stub.EnsureStubId();
        return(stub);
    }