add petstore samples and fix some issues

This commit is contained in:
cbornet
2016-07-06 10:28:34 +02:00
parent a761682115
commit 412022b852
16 changed files with 444 additions and 15 deletions

View File

@@ -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}} {
}

View File

@@ -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

View File

@@ -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}}

View File

@@ -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>