I have, say, a class Person which, depending on the endpoint, would have its firstName either required or not. Is there a way of doing this with Swagger OpenAPI documentation tags in Java?
I'm imagining it could look a bit like this if it were/is possible:
public class Person {
@Path("/endpoint1", required = true)
@Path("/endpoint2", required = false)
private String firstName;
}