Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
changed dependecies from io.swagger to io.swagger.core.v3
changed imports for annotations for api
  • Loading branch information
alexsuperdev committed Feb 16, 2020
1 parent ffb1961 commit fcfda63
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
</dependencies>

<properties>
<swagger-annotations-version>1.5.8</swagger-annotations-version>
<swagger-annotations-version>2.1.1</swagger-annotations-version>
<jersey-version>2.27</jersey-version>
<jackson-version>2.8.9</jackson-version>
<jackson-databind-nullable-version>0.2.0</jackson-databind-nullable-version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<!-- dependencies are needed for the client being generated -->

<dependency>
<groupId>io.swagger</groupId>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger-annotations-version}</version>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion modules/openapi-generator-maven-plugin/examples/spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
</dependencies>

<properties>
<swagger-annotations-version>1.5.8</swagger-annotations-version>
<swagger-annotations-version>2.1.1</swagger-annotations-version>

<spring-boot-starter-web.version>2.2.1.RELEASE</spring-boot-starter-web.version>
<springfox-version>2.8.0</springfox-version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ package {{package}};

{{#imports}}import {{import}};
{{/imports}}
import io.swagger.annotations.*;
import io.swagger.v3.oas.annotations.*;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
{{#jdk8-no-delegate}}
{{#virtualService}}
import io.virtualan.annotation.ApiVirtual;
Expand Down Expand Up @@ -60,7 +63,7 @@ import java.util.concurrent.{{^jdk8}}Callable{{/jdk8}}{{#jdk8}}CompletableFuture
{{#useBeanValidation}}
@Validated
{{/useBeanValidation}}
@Api(value = "{{{baseName}}}", description = "the {{{baseName}}} API")
@Tag(name = "{{{baseName}}}", description = "the {{{baseName}}} API")
{{#operations}}
{{#virtualService}}
@VirtualService
Expand Down Expand Up @@ -106,23 +109,18 @@ public interface {{classname}} {
{{#virtualService}}
@ApiVirtual
{{/virtualService}}
@ApiOperation(value = "{{{summary}}}", nickname = "{{{operationId}}}", notes = "{{{notes}}}"{{#returnBaseType}}, response = {{{returnBaseType}}}.class{{/returnBaseType}}{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = {
{{#authMethods}}@Authorization(value = "{{name}}"{{#isOAuth}}, scopes = {
{{#scopes}}@AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{#hasMore}},
{{/hasMore}}{{/scopes}}
}{{/isOAuth}}){{#hasMore}},
{{/hasMore}}{{/authMethods}}
}{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} })
@Operation(summary = "{{{summary}}}", description = "{{{notes}}}",
tags={ {{#vendorExtensions.x-tags}}"{{tag}}",{{/vendorExtensions.x-tags}} },
@ApiResponses(value = { {{#responses}}
@ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{baseType}}}.class{{/baseType}}{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{#hasMore}},{{/hasMore}}{{/responses}} })
{{#implicitHeaders}}
@ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{#baseType}}, response = {{{baseType}}}.class{{/baseType}}{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}){{#hasMore}},{{/hasMore}}{{/responses}} })
{{#implicitHeaders}}}
@ApiImplicitParams({
{{#headerParams}}
{{>implicitHeader}}
{{/headerParams}}
})
{{/implicitHeaders}}
@RequestMapping(value = "{{{path}}}",{{#singleContentTypes}}{{#hasProduces}}
@Parameter(value = "{{{path}}}",{{#singleContentTypes}}{{#hasProduces}}
produces = "{{{vendorExtensions.x-accepts}}}", {{/hasProduces}}{{#hasConsumes}}
consumes = "{{{vendorExtensions.x-contentType}}}",{{/hasConsumes}}{{/singleContentTypes}}{{^singleContentTypes}}{{#hasProduces}}
produces = { {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }, {{/hasProduces}}{{#hasConsumes}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package {{package}};
{{^jdk8}}
{{#imports}}import {{import}};
{{/imports}}
import io.swagger.annotations.*;
import io.swagger.v3.oas.annotations.*;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package {{package}};

{{#imports}}import {{import}};
{{/imports}}
import io.swagger.annotations.*;
import io.swagger.v3.oas.annotations.*;
import io.swagger.v3.oas.annotations.tags.Tag;
{{#jdk8}}
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@
<version>3.14.2</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.5.14</version>
<version>2.1.1</version>
</dependency>
<!-- @Nullable annotation -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
{{/parentOverridden}}
<dependencies>
<dependency>
<groupId>io.swagger</groupId>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
{{^parentOverridden}}
<version>${swagger-core-version}</version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@
<version>3.14.2</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.5.14</version>
<version>2.1.1</version>
</dependency>
<!-- @Nullable annotation -->
<dependency>
Expand Down

0 comments on commit fcfda63

Please sign in to comment.