0

I know we can use this @ApiModelProperty annotation from this link to hide an id from the request when we use Swagger-Ui

    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger-ui</artifactId>
        <version>2.9.2</version>
    </dependency>
    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger2</artifactId>
        <version>2.9.2</version>
    </dependency>

But I am using this spring doc OpenApi dependency

 <dependency>
       <groupId>org.springdoc</groupId>
       <artifactId>springdoc-openapi-ui</artifactId>
       <version>1.2.32</version>
 </dependency>

I am not getting this annotation @ApiModelProperty when I used springdoc-openapi-ui. What could be the annotation for this?

Shailendra Madda
  • 20,649
  • 15
  • 100
  • 138

1 Answers1

0

You have to replace swagger 2 annotations with swagger 3 annotations (it is already included with springdoc-openapi-ui dependency). Package for swagger 3 annotations is io.swagger.v3.oas.annotations.

It's all explained here: