Given a service interface:
[Route("/Hello2/{Id}", "POST", Summary = "Creates a new hello.")]
public class CreateHelloReq2 : IReturn<string>
{
[ApiMember(IsRequired = true, ParameterType = "path", ExcludeInSchema = true)]
public string Id { get; set; }
}
the resultant Swagger UI shows a row for body with an empty set {} expected. In a situation, such as this, we would like for that body row not to be visible at all in the documentation since it adds nothing (the user doesn’t understand what they are supposed to send for the body param). How can we remove it with the OpenApiParameter? In this situation, we don’t want to disable the body for all calls - just this one (or, even better, any call which has an empty body).
thanks!