private static async Task DoHttpRequestsAsync(ILogger logger)
    {
        using var client = new HttpClient();

        await DoRequestAsync(logger, client, "category/fruits");
        await DoRequestAsync(logger, client, "categoryWithConverter/fruits");
        await DoRequestAsync(logger, client, "group/1");
        await DoRequestAsync(logger, client, "group/42");                                            // invalid
        await DoRequestAsync(logger, client, "groupWithConverter/1");
        await DoRequestAsync(logger, client, "groupWithConverter/42");                               // invalid
        await DoRequestAsync(logger, client, "productType/groceries");
        await DoRequestAsync(logger, client, "productType/invalid");                                 // invalid
        await DoRequestAsync(logger, client, "productType", "invalid");                              // invalid
        await DoRequestAsync(logger, client, "productTypeWrapper", new { ProductType = "invalid" }); // invalid
        await DoRequestAsync(logger, client, "productTypeWithJsonConverter/groceries");
        await DoRequestAsync(logger, client, "productTypeWithJsonConverter/invalid");                // invalid
        await DoRequestAsync(logger, client, "specialProductType/groceries");
        await DoRequestAsync(logger, client, "specialProductType/special");
        await DoRequestAsync(logger, client, "specialProductType/invalid"); // invalid
        await DoRequestAsync(logger, client, "productName/bread");
        await DoRequestAsync(logger, client, "productName/a");              // invalid
        await DoRequestAsync(logger, client, "productName", "bread");
        await DoRequestAsync(logger, client, "productName", "a");           // invalid
        await DoRequestAsync(logger, client, "boundary", BoundaryWithJsonConverter.Create(1, 2));
        await DoRequestAsync(logger, client, "boundary", jsonBody : "{ \"lower\": 2, \"upper\": 1 }");
    }
    public IActionResult RoundTrip([FromBody] BoundaryWithJsonConverter boundary)
    {
        if (!ModelState.IsValid)
        {
            return(BadRequest(ModelState));
        }

        _logger.LogInformation("Round trip test with {Type}: {Boundary}", boundary.GetType().Name, boundary);

        return(Json(boundary));
    }