forked from loafle/openapi-generator-original
Merge branch 'develop_2.0' into library-template-jersey2
This commit is contained in:
commit
cb181e3480
@ -216,7 +216,7 @@ public class ApiInvoker {
|
||||
}
|
||||
else if(String.class.equals(cls)) {
|
||||
if(json != null && json.startsWith("\"") && json.endsWith("\"") && json.length() > 1)
|
||||
return json.substring(1, json.length() - 2);
|
||||
return json.substring(1, json.length() - 1);
|
||||
else
|
||||
return json;
|
||||
}
|
||||
|
@ -104,14 +104,27 @@
|
||||
|
||||
- (NSDictionary *) authSettings {
|
||||
return @{
|
||||
@"api_key": @{
|
||||
@"type": @"api_key",
|
||||
@"in": @"header",
|
||||
@"key": @"api_key",
|
||||
@"value": [self getApiKeyWithPrefix:@"api_key"]
|
||||
},
|
||||
|
||||
};
|
||||
{{#authMethods}}
|
||||
{{#isApiKey}}
|
||||
@"{{name}}":
|
||||
@{
|
||||
@"type": @"api_key",
|
||||
@"in": {{#isKeyInHeader}}@"header"{{/isKeyInHeader}}{{#isKeyInQuery}}@"query"{{/isKeyInQuery}},
|
||||
@"key": @"{{keyParamName}}",
|
||||
@"value": [self getApiKeyWithPrefix:@"{{keyParamName}}"]
|
||||
},
|
||||
{{/isApiKey}}
|
||||
{{#isBasic}}
|
||||
@"{{name}}":
|
||||
@{
|
||||
@"type": @"basic",
|
||||
@"in": @"header",
|
||||
@"key": @"Authorization",
|
||||
@"value": [self getBasicAuthToken]
|
||||
},
|
||||
{{/isBasic}}
|
||||
{{/authMethods}}
|
||||
};
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -59,7 +59,7 @@ class ApiInvoker(val mapper: ObjectMapper = ScalaJsonUtil.getJsonMapper,
|
||||
if (cls == classOf[String]) {
|
||||
json match {
|
||||
case s: String => {
|
||||
if (s.startsWith("\"") && s.endsWith("\"") && s.length > 1) s.substring(1, s.length - 2)
|
||||
if (s.startsWith("\"") && s.endsWith("\"") && s.length > 1) s.substring(1, s.length - 1)
|
||||
else s
|
||||
}
|
||||
case _ => null
|
||||
|
4
pom.xml
4
pom.xml
@ -469,10 +469,10 @@
|
||||
</repository>
|
||||
</repositories>
|
||||
<properties>
|
||||
<swagger-parser-version>1.0.9-SNAPSHOT</swagger-parser-version>
|
||||
<swagger-parser-version>1.0.10-SNAPSHOT</swagger-parser-version>
|
||||
<scala-version>2.11.1</scala-version>
|
||||
<felix-version>2.3.4</felix-version>
|
||||
<swagger-core-version>1.5.0</swagger-core-version>
|
||||
<swagger-core-version>1.5.3-SNAPSHOT</swagger-core-version>
|
||||
<scala-test-version>2.1.4</scala-test-version>
|
||||
<commons-io-version>2.3</commons-io-version>
|
||||
<commons-cli-version>1.2</commons-cli-version>
|
||||
|
@ -216,7 +216,7 @@ public class ApiInvoker {
|
||||
}
|
||||
else if(String.class.equals(cls)) {
|
||||
if(json != null && json.startsWith("\"") && json.endsWith("\"") && json.length() > 1)
|
||||
return json.substring(1, json.length() - 2);
|
||||
return json.substring(1, json.length() - 1);
|
||||
else
|
||||
return json;
|
||||
}
|
||||
|
@ -104,14 +104,14 @@
|
||||
|
||||
- (NSDictionary *) authSettings {
|
||||
return @{
|
||||
@"api_key": @{
|
||||
@"type": @"api_key",
|
||||
@"in": @"header",
|
||||
@"key": @"api_key",
|
||||
@"value": [self getApiKeyWithPrefix:@"api_key"]
|
||||
},
|
||||
|
||||
};
|
||||
@"api_key":
|
||||
@{
|
||||
@"type": @"api_key",
|
||||
@"in": @"header",
|
||||
@"key": @"api_key",
|
||||
@"value": [self getApiKeyWithPrefix:@"api_key"]
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -59,7 +59,7 @@ class ApiInvoker(val mapper: ObjectMapper = ScalaJsonUtil.getJsonMapper,
|
||||
if (cls == classOf[String]) {
|
||||
json match {
|
||||
case s: String => {
|
||||
if (s.startsWith("\"") && s.endsWith("\"") && s.length > 1) s.substring(1, s.length - 2)
|
||||
if (s.startsWith("\"") && s.endsWith("\"") && s.length > 1) s.substring(1, s.length - 1)
|
||||
else s
|
||||
}
|
||||
case _ => null
|
||||
|
Loading…
x
Reference in New Issue
Block a user