mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-06 18:45:23 +00:00
improve indentation, update dependencies (#2521)
This commit is contained in:
parent
1313cff93a
commit
3a0d520c38
@ -57,11 +57,15 @@ public class ApiClient {
|
||||
{{#hasAuthMethods}}
|
||||
RequestInterceptor auth;
|
||||
{{#authMethods}}if ("{{name}}".equals(authName)) {
|
||||
{{#isBasic}}{{#isBasicBasic}}
|
||||
{{#isBasic}}
|
||||
{{#isBasicBasic}}
|
||||
auth = new HttpBasicAuth();
|
||||
{{/isBasicBasic}}{{^isBasicBasic}}
|
||||
{{/isBasicBasic}}
|
||||
{{^isBasicBasic}}
|
||||
auth = new HttpBearerAuth("{{scheme}}");
|
||||
{{/isBasicBasic}}{{/isBasic}}{{#isApiKey}}
|
||||
{{/isBasicBasic}}
|
||||
{{/isBasic}}
|
||||
{{#isApiKey}}
|
||||
auth = new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}");
|
||||
{{/isApiKey}}
|
||||
{{#isOAuth}}
|
||||
|
@ -289,14 +289,14 @@
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<gson-fire-version>1.8.3</gson-fire-version>
|
||||
<swagger-core-version>1.5.21</swagger-core-version>
|
||||
<okhttp-version>3.13.1</okhttp-version>
|
||||
<okhttp-version>3.14.0</okhttp-version>
|
||||
<gson-version>2.8.5</gson-version>
|
||||
<commons-lang3-version>3.8.1</commons-lang3-version>
|
||||
{{#joda}}
|
||||
<jodatime-version>2.9.9</jodatime-version>
|
||||
{{/joda}}
|
||||
{{#threetenbp}}
|
||||
<threetenbp-version>1.3.5</threetenbp-version>
|
||||
<threetenbp-version>1.3.8</threetenbp-version>
|
||||
{{/threetenbp}}
|
||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
||||
<junit-version>4.12</junit-version>
|
||||
|
@ -58,13 +58,17 @@ public class ApiClient {
|
||||
{{#hasAuthMethods}}
|
||||
Interceptor auth;
|
||||
{{#authMethods}}if ("{{name}}".equals(authName)) {
|
||||
{{#isBasic}}{{#isBasicBasic}}
|
||||
auth = new HttpBasicAuth();
|
||||
{{/isBasicBasic}}{{^isBasicBasic}}
|
||||
auth = new HttpBearerAuth("{{scheme}}");
|
||||
{{/isBasicBasic}}{{/isBasic}}
|
||||
{{#isBasic}}
|
||||
{{#isBasicBasic}}
|
||||
auth = new HttpBasicAuth();
|
||||
{{/isBasicBasic}}
|
||||
{{^isBasicBasic}}
|
||||
auth = new HttpBearerAuth("{{scheme}}");
|
||||
{{/isBasicBasic}}
|
||||
{{/isBasic}}
|
||||
{{#isApiKey}}
|
||||
auth = new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}");{{/isApiKey}}
|
||||
auth = new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}");
|
||||
{{/isApiKey}}
|
||||
{{#isOAuth}}
|
||||
auth = new OAuth(OAuthFlow.{{flow}}, "{{authorizationUrl}}", "{{tokenUrl}}", "{{#scopes}}{{scope}}{{#hasMore}}, {{/hasMore}}{{/scopes}}");
|
||||
{{/isOAuth}}
|
||||
|
@ -351,7 +351,7 @@
|
||||
<java.version>{{#supportJava6}}1.6{{/supportJava6}}{{^supportJava6}}{{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}}{{/supportJava6}}</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<gson-fire-version>1.8.0</gson-fire-version>
|
||||
<gson-fire-version>1.8.3</gson-fire-version>
|
||||
<swagger-annotations-version>1.5.21</swagger-annotations-version>
|
||||
{{#usePlayWS}}
|
||||
<jackson-databind-version>2.8.11.3</jackson-databind-version>
|
||||
@ -379,7 +379,7 @@
|
||||
<jodatime-version>2.9.9</jodatime-version>
|
||||
{{/joda}}
|
||||
{{#threetenbp}}
|
||||
<threetenbp-version>1.3.5</threetenbp-version>
|
||||
<threetenbp-version>1.3.8</threetenbp-version>
|
||||
{{/threetenbp}}
|
||||
<oltu-version>1.0.1</oltu-version>
|
||||
<junit-version>4.12</junit-version>
|
||||
|
@ -44,16 +44,13 @@ public class ApiClient {
|
||||
for(String authName : authNames) {
|
||||
RequestInterceptor auth;
|
||||
if ("api_key".equals(authName)) {
|
||||
|
||||
auth = new ApiKeyAuth("header", "api_key");
|
||||
} else if ("api_key_query".equals(authName)) {
|
||||
|
||||
auth = new ApiKeyAuth("query", "api_key_query");
|
||||
} else if ("http_basic_test".equals(authName)) {
|
||||
|
||||
auth = new HttpBasicAuth();
|
||||
} else if ("petstore_auth".equals(authName)) {
|
||||
auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets");
|
||||
} else if ("petstore_auth".equals(authName)) {
|
||||
auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets");
|
||||
} else {
|
||||
throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names");
|
||||
}
|
||||
|
@ -44,16 +44,13 @@ public class ApiClient {
|
||||
for(String authName : authNames) {
|
||||
RequestInterceptor auth;
|
||||
if ("api_key".equals(authName)) {
|
||||
|
||||
auth = new ApiKeyAuth("header", "api_key");
|
||||
} else if ("api_key_query".equals(authName)) {
|
||||
|
||||
auth = new ApiKeyAuth("query", "api_key_query");
|
||||
} else if ("http_basic_test".equals(authName)) {
|
||||
|
||||
auth = new HttpBasicAuth();
|
||||
} else if ("petstore_auth".equals(authName)) {
|
||||
auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets");
|
||||
} else if ("petstore_auth".equals(authName)) {
|
||||
auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets");
|
||||
} else {
|
||||
throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names");
|
||||
}
|
||||
|
@ -247,10 +247,10 @@
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<gson-fire-version>1.8.3</gson-fire-version>
|
||||
<swagger-core-version>1.5.21</swagger-core-version>
|
||||
<okhttp-version>3.13.1</okhttp-version>
|
||||
<okhttp-version>3.14.0</okhttp-version>
|
||||
<gson-version>2.8.5</gson-version>
|
||||
<commons-lang3-version>3.8.1</commons-lang3-version>
|
||||
<threetenbp-version>1.3.5</threetenbp-version>
|
||||
<threetenbp-version>1.3.8</threetenbp-version>
|
||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
||||
<junit-version>4.12</junit-version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
@ -240,10 +240,10 @@
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<gson-fire-version>1.8.3</gson-fire-version>
|
||||
<swagger-core-version>1.5.21</swagger-core-version>
|
||||
<okhttp-version>3.13.1</okhttp-version>
|
||||
<okhttp-version>3.14.0</okhttp-version>
|
||||
<gson-version>2.8.5</gson-version>
|
||||
<commons-lang3-version>3.8.1</commons-lang3-version>
|
||||
<threetenbp-version>1.3.5</threetenbp-version>
|
||||
<threetenbp-version>1.3.8</threetenbp-version>
|
||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
||||
<junit-version>4.12</junit-version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
@ -55,19 +55,12 @@ public class ApiClient {
|
||||
for(String authName : authNames) {
|
||||
Interceptor auth;
|
||||
if ("api_key".equals(authName)) {
|
||||
|
||||
auth = new ApiKeyAuth("header", "api_key");
|
||||
} else if ("api_key_query".equals(authName)) {
|
||||
|
||||
auth = new ApiKeyAuth("query", "api_key_query");
|
||||
} else if ("http_basic_test".equals(authName)) {
|
||||
|
||||
auth = new HttpBasicAuth();
|
||||
|
||||
|
||||
auth = new HttpBasicAuth();
|
||||
} else if ("petstore_auth".equals(authName)) {
|
||||
|
||||
|
||||
auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets");
|
||||
} else {
|
||||
throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names");
|
||||
|
@ -266,7 +266,7 @@
|
||||
<java.version>1.8</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<gson-fire-version>1.8.0</gson-fire-version>
|
||||
<gson-fire-version>1.8.3</gson-fire-version>
|
||||
<swagger-annotations-version>1.5.21</swagger-annotations-version>
|
||||
<jackson-databind-version>2.8.11.3</jackson-databind-version>
|
||||
<jackson-version>2.6.6</jackson-version>
|
||||
|
@ -271,13 +271,13 @@
|
||||
<java.version>1.8</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<gson-fire-version>1.8.0</gson-fire-version>
|
||||
<gson-fire-version>1.8.3</gson-fire-version>
|
||||
<swagger-annotations-version>1.5.21</swagger-annotations-version>
|
||||
<jackson-databind-version>2.8.11.3</jackson-databind-version>
|
||||
<jackson-version>2.7.8</jackson-version>
|
||||
<play-version>2.5.15</play-version>
|
||||
<retrofit-version>2.5.0</retrofit-version>
|
||||
<threetenbp-version>1.3.5</threetenbp-version>
|
||||
<threetenbp-version>1.3.8</threetenbp-version>
|
||||
<oltu-version>1.0.1</oltu-version>
|
||||
<junit-version>4.12</junit-version>
|
||||
</properties>
|
||||
|
@ -276,13 +276,13 @@
|
||||
<java.version>1.8</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<gson-fire-version>1.8.0</gson-fire-version>
|
||||
<gson-fire-version>1.8.3</gson-fire-version>
|
||||
<swagger-annotations-version>1.5.21</swagger-annotations-version>
|
||||
<jackson-databind-version>2.8.11.3</jackson-databind-version>
|
||||
<jackson-version>2.8.11</jackson-version>
|
||||
<play-version>2.6.7</play-version>
|
||||
<retrofit-version>2.5.0</retrofit-version>
|
||||
<threetenbp-version>1.3.5</threetenbp-version>
|
||||
<threetenbp-version>1.3.8</threetenbp-version>
|
||||
<oltu-version>1.0.1</oltu-version>
|
||||
<junit-version>4.12</junit-version>
|
||||
</properties>
|
||||
|
@ -240,10 +240,10 @@
|
||||
<java.version>1.7</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<gson-fire-version>1.8.0</gson-fire-version>
|
||||
<gson-fire-version>1.8.3</gson-fire-version>
|
||||
<swagger-annotations-version>1.5.21</swagger-annotations-version>
|
||||
<retrofit-version>2.5.0</retrofit-version>
|
||||
<threetenbp-version>1.3.5</threetenbp-version>
|
||||
<threetenbp-version>1.3.8</threetenbp-version>
|
||||
<oltu-version>1.0.1</oltu-version>
|
||||
<junit-version>4.12</junit-version>
|
||||
</properties>
|
||||
|
@ -250,11 +250,11 @@
|
||||
<java.version>1.7</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<gson-fire-version>1.8.0</gson-fire-version>
|
||||
<gson-fire-version>1.8.3</gson-fire-version>
|
||||
<swagger-annotations-version>1.5.21</swagger-annotations-version>
|
||||
<retrofit-version>2.5.0</retrofit-version>
|
||||
<rxjava-version>1.3.0</rxjava-version>
|
||||
<threetenbp-version>1.3.5</threetenbp-version>
|
||||
<threetenbp-version>1.3.8</threetenbp-version>
|
||||
<oltu-version>1.0.1</oltu-version>
|
||||
<junit-version>4.12</junit-version>
|
||||
</properties>
|
||||
|
@ -250,11 +250,11 @@
|
||||
<java.version>1.7</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<gson-fire-version>1.8.0</gson-fire-version>
|
||||
<gson-fire-version>1.8.3</gson-fire-version>
|
||||
<swagger-annotations-version>1.5.21</swagger-annotations-version>
|
||||
<retrofit-version>2.5.0</retrofit-version>
|
||||
<rxjava-version>2.1.1</rxjava-version>
|
||||
<threetenbp-version>1.3.5</threetenbp-version>
|
||||
<threetenbp-version>1.3.8</threetenbp-version>
|
||||
<oltu-version>1.0.1</oltu-version>
|
||||
<junit-version>4.12</junit-version>
|
||||
</properties>
|
||||
|
Loading…
Reference in New Issue
Block a user