Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
OAS3: how to exclude fields in POST operation but not in PUT operation, referencing the same implementation class #3418
Hi there, I am working with the annotations https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Annotations
How to create operations that refers to an implementation of some class like @Schema(implementation=....) offering the ID field in case of a PUT and hiding the ID field in case of a POST?
Since ID generation in POST should be up to the server. A PUT should result in 1:1 representation with GET so ID management is up to the client (processing a create or update at server side)
I know that I can set @hidden in MyClass.java, but this will disable the field in both PUT and POST.