I am working on a project where we document our backend's API with Swagger. I would like to use annotation based configuration for Swagger. For my controller classes using @Tag, @Operation and @ApiResponses works just fine and they can be imported with the following statements:
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
However if I try to add either @ApiParam or @ApiModel to my code, I am unable to import them in any way.
In my POM.xml I added Swagger as the following dependency:
<!-- https://mvnrepository.com/artifact/io.swagger.core.v3/swagger-annotations -->
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>2.1.11</version>
</dependency>
What is it that I am missing here? I tried following this Baeldung article and example code, however I could not get it to work. Thanks for the help!