Hi, Currently I am using swagger annotations on my rest endpoints. I wanted
to update to use the openapi annotations.
So I updated from
@ApiOperation(value = "Get user templates by template id",
notes = "",
response = Response.class)
@ApiResponses(value = {
@ApiResponse(code = 500, message = "Internal Server Error"),
@ApiResponse(code = 400, message = "Bad request"),
@ApiResponse(code = 401, message = "Unauthorized")})
...
@ApiParam(value = "Template id", required = true)
to
@Operation(summary = "Get user templates by template id",
responses = {
@ApiResponse(
content = @Content(mediaType = "application/json",
schema = @Schema(implementation = Response.class))),
@ApiResponse(responseCode = "500", description = "Internal Server Error"),
@ApiResponse(responseCode = "400", description = "Bad
request"),
@ApiResponse(responseCode = "401", description = "Unauthorized")
})
...
@Parameter(description = "Template id", required = true)
Updated version from 1.5.7 to 2.0.0-rc2
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
- <version>1.5.7</version>
+ <version>2.0.0-rc2</version>
</dependency>
I am using maven to generate the swagger.json
<groupId>com.github.kongchen</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<version>3.1.6</version>
This generates a swagger.json file, but when importing that into
swaggerhub, it says it is Swagger 2.0
I then tried to use
<groupId>io.openapitools.swagger</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<version>1.0.2</version>
This also generates a swagger.json, but there is only basic information.
So I am confused about how do I get openapi 3.0 documentation generated.?
Thanks :)
--
You received this message because you are subscribed to the Google Groups
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.