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)) {
|
else if(String.class.equals(cls)) {
|
||||||
if(json != null && json.startsWith("\"") && json.endsWith("\"") && json.length() > 1)
|
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
|
else
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
@ -104,14 +104,27 @@
|
|||||||
|
|
||||||
- (NSDictionary *) authSettings {
|
- (NSDictionary *) authSettings {
|
||||||
return @{
|
return @{
|
||||||
@"api_key": @{
|
{{#authMethods}}
|
||||||
@"type": @"api_key",
|
{{#isApiKey}}
|
||||||
@"in": @"header",
|
@"{{name}}":
|
||||||
@"key": @"api_key",
|
@{
|
||||||
@"value": [self getApiKeyWithPrefix:@"api_key"]
|
@"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
|
@end
|
||||||
|
@ -59,7 +59,7 @@ class ApiInvoker(val mapper: ObjectMapper = ScalaJsonUtil.getJsonMapper,
|
|||||||
if (cls == classOf[String]) {
|
if (cls == classOf[String]) {
|
||||||
json match {
|
json match {
|
||||||
case s: String => {
|
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
|
else s
|
||||||
}
|
}
|
||||||
case _ => null
|
case _ => null
|
||||||
|
4
pom.xml
4
pom.xml
@ -469,10 +469,10 @@
|
|||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
<properties>
|
<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>
|
<scala-version>2.11.1</scala-version>
|
||||||
<felix-version>2.3.4</felix-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>
|
<scala-test-version>2.1.4</scala-test-version>
|
||||||
<commons-io-version>2.3</commons-io-version>
|
<commons-io-version>2.3</commons-io-version>
|
||||||
<commons-cli-version>1.2</commons-cli-version>
|
<commons-cli-version>1.2</commons-cli-version>
|
||||||
|
@ -216,7 +216,7 @@ public class ApiInvoker {
|
|||||||
}
|
}
|
||||||
else if(String.class.equals(cls)) {
|
else if(String.class.equals(cls)) {
|
||||||
if(json != null && json.startsWith("\"") && json.endsWith("\"") && json.length() > 1)
|
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
|
else
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
@ -104,14 +104,14 @@
|
|||||||
|
|
||||||
- (NSDictionary *) authSettings {
|
- (NSDictionary *) authSettings {
|
||||||
return @{
|
return @{
|
||||||
@"api_key": @{
|
@"api_key":
|
||||||
@"type": @"api_key",
|
@{
|
||||||
@"in": @"header",
|
@"type": @"api_key",
|
||||||
@"key": @"api_key",
|
@"in": @"header",
|
||||||
@"value": [self getApiKeyWithPrefix:@"api_key"]
|
@"key": @"api_key",
|
||||||
},
|
@"value": [self getApiKeyWithPrefix:@"api_key"]
|
||||||
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -59,7 +59,7 @@ class ApiInvoker(val mapper: ObjectMapper = ScalaJsonUtil.getJsonMapper,
|
|||||||
if (cls == classOf[String]) {
|
if (cls == classOf[String]) {
|
||||||
json match {
|
json match {
|
||||||
case s: String => {
|
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
|
else s
|
||||||
}
|
}
|
||||||
case _ => null
|
case _ => null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user