forked from loafle/openapi-generator-original
add petstore samples and fix some issues
This commit is contained in:
@@ -3,6 +3,6 @@ package {{package}};
|
||||
import org.springframework.cloud.netflix.feign.FeignClient;
|
||||
import {{configPackage}}.ClientConfiguration;
|
||||
|
||||
@FeignClient(name="${ {{{title}}}.name:{{{title}}} }", url="${ {{{title}}}.url:{{{basePath}}} }", configuration = ClientConfiguration.class)
|
||||
@FeignClient(name="${ {{{title}}}.name:{{{title}}}}", url="${ {{{title}}}.url:{{{basePath}}}}", configuration = ClientConfiguration.class)
|
||||
public interface {{classname}}Client extends {{classname}} {
|
||||
}
|
||||
@@ -24,10 +24,10 @@ public class ClientConfiguration {
|
||||
|
||||
{{#authMethods}}
|
||||
{{#isBasic}}
|
||||
@Value("${ {{{title}}}.security.{{{name}}}.username }")
|
||||
@Value("${ {{{title}}}.security.{{{name}}}.username:}")
|
||||
private String {{{name}}}Username;
|
||||
|
||||
@Value("${ {{{title}}}.security.{{{name}}}.password }")
|
||||
@Value("${ {{{title}}}.security.{{{name}}}.password:}")
|
||||
private String {{{name}}}Password;
|
||||
|
||||
@Bean
|
||||
@@ -38,7 +38,7 @@ public class ClientConfiguration {
|
||||
|
||||
{{/isBasic}}
|
||||
{{#isApiKey}}
|
||||
@Value("${ {{{title}}}.security.{{{name}}}.key }")
|
||||
@Value("${ {{{title}}}.security.{{{name}}}.key:}")
|
||||
private String {{{name}}}Key;
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{{#isFormParam}}{{#notFile}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}} {{#allowableValues}}, allowableValues="{{{allowableValues}}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @RequestParam(value="{{paramName}}"{{#required}}, required=true{{/required}}{{^required}}, required=false{{/required}}) {{{dataType}}} {{paramName}}{{/notFile}}{{#isFile}}@ApiParam(value = "file detail") @RequestParam("file") MultipartFile {{baseName}}{{/isFile}}{{/isFormParam}}
|
||||
@@ -14,7 +14,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>1.3.5.RELEASE</version>
|
||||
<version>1.3.6.RELEASE</version>
|
||||
</parent>
|
||||
<build>
|
||||
<sourceDirectory>src/main/java</sourceDirectory>
|
||||
@@ -40,7 +40,7 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-parent</artifactId>
|
||||
<version>Brixton.SR1</version>
|
||||
<version>Brixton.SR2</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
@@ -83,5 +83,10 @@
|
||||
<artifactId>joda-time</artifactId>
|
||||
</dependency>
|
||||
{{/java8}}
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
Reference in New Issue
Block a user