forked from loafle/openapi-generator-original
Updated the mustache template to remove the spurious import
Also regenerated the spring-mvc server sample
This commit is contained in:
parent
9283249963
commit
7cc9581f04
@ -8,8 +8,8 @@ import {{modelPackage}}.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
import io.swagger.model.ApiResponse;
|
||||
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@ -35,8 +35,8 @@ public class {{classname}} {
|
||||
{{#operation}}
|
||||
|
||||
@ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnType}}}.class{{#returnContainer}}, responseContainer = "{{{returnContainer}}}"{{/returnContainer}})
|
||||
@io.swagger.annotations.ApiResponses(value = { {{#responses}}
|
||||
@io.swagger.annotations.ApiResponse(code = {{{code}}}, message = "{{{message}}}"){{#hasMore}},{{/hasMore}}{{/responses}} })
|
||||
@ApiResponses(value = { {{#responses}}
|
||||
@ApiResponse(code = {{{code}}}, message = "{{{message}}}"){{#hasMore}},{{/hasMore}}{{/responses}} })
|
||||
@RequestMapping(value = "{{path}}",
|
||||
{{#hasProduces}}produces = { {{#produces}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }, {{/hasProduces}}
|
||||
{{#hasConsumes}}consumes = { {{#consumes}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} },{{/hasConsumes}}
|
||||
|
@ -8,4 +8,5 @@ This server was generated by the [swagger-codegen](https://github.com/swagger-ap
|
||||
|
||||
The underlying library integrating swagger to Spring-MVC is [springfox](https://github.com/springfox/springfox)
|
||||
|
||||
You can view the server in swagger-ui by pointing to http://localhost:8002/v2/sdoc.jsp
|
||||
You can view the server in swagger-ui by pointing to
|
||||
http://localhost:8002/v2/swagger-ui.html
|
@ -33,8 +33,7 @@
|
||||
<webAppConfig>
|
||||
<contextPath>/v2</contextPath>
|
||||
</webAppConfig>
|
||||
<webAppSourceDirectory>target/${project.artifactId}-${project-version}</webAppSourceDirectory>
|
||||
<webDefaultXml>${project.basedir}/conf/jetty/webdefault.xml</webDefaultXml>
|
||||
<webAppSourceDirectory>target/${project.artifactId}-${project.version}</webAppSourceDirectory>
|
||||
<stopPort>8079</stopPort>
|
||||
<stopKey>stopit</stopKey>
|
||||
<httpConnector>
|
||||
@ -153,7 +152,6 @@
|
||||
<properties>
|
||||
<swagger-core-version>1.5.0</swagger-core-version>
|
||||
<jetty-version>9.2.9.v20150224</jetty-version>
|
||||
<swagger-ui-version>2.1.0-M2</swagger-ui-version>
|
||||
<jersey-version>1.13</jersey-version>
|
||||
<slf4j-version>1.6.3</slf4j-version>
|
||||
<scala-test-version>1.6.1</scala-test-version>
|
||||
|
@ -171,7 +171,7 @@ public class PetApi {
|
||||
|
||||
@ApiOperation(value = "uploads an image", notes = "", response = Void.class)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 0, message = "successful operation") })
|
||||
@ApiResponse(code = 200, message = "successful operation") })
|
||||
@RequestMapping(value = "/{petId}/uploadImage",
|
||||
produces = { "application/json", "application/xml" },
|
||||
consumes = { "multipart/form-data" },
|
||||
|
@ -35,7 +35,7 @@ public class UserApi {
|
||||
|
||||
@ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 0, message = "successful operation") })
|
||||
@ApiResponse(code = 200, message = "successful operation") })
|
||||
@RequestMapping(value = "",
|
||||
produces = { "application/json", "application/xml" },
|
||||
|
||||
@ -52,7 +52,7 @@ public class UserApi {
|
||||
|
||||
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 0, message = "successful operation") })
|
||||
@ApiResponse(code = 200, message = "successful operation") })
|
||||
@RequestMapping(value = "/createWithArray",
|
||||
produces = { "application/json", "application/xml" },
|
||||
|
||||
@ -69,7 +69,7 @@ public class UserApi {
|
||||
|
||||
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 0, message = "successful operation") })
|
||||
@ApiResponse(code = 200, message = "successful operation") })
|
||||
@RequestMapping(value = "/createWithList",
|
||||
produces = { "application/json", "application/xml" },
|
||||
|
||||
@ -107,7 +107,7 @@ public class UserApi {
|
||||
|
||||
@ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class)
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 0, message = "successful operation") })
|
||||
@ApiResponse(code = 200, message = "successful operation") })
|
||||
@RequestMapping(value = "/logout",
|
||||
produces = { "application/json", "application/xml" },
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user