forked from loafle/openapi-generator-original
[Objc] coraData cli option changed from y/n to true false
This commit is contained in:
parent
ceda86b9c3
commit
5145beea05
@ -26,6 +26,6 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
ags="$@ generate -t modules/swagger-codegen/src/main/resources/objc -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l objc -o samples/client/petstore/objc --additional-properties coreData=y"
|
ags="$@ generate -t modules/swagger-codegen/src/main/resources/objc -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l objc -o samples/client/petstore/objc --additional-properties coreData=true"
|
||||||
|
|
||||||
java -DappName=PetstoreClient $JAVA_OPTS -jar $executable $ags
|
java -DappName=PetstoreClient $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -151,7 +151,7 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
instantiationTypes.put("map", "NSMutableDictionary");
|
instantiationTypes.put("map", "NSMutableDictionary");
|
||||||
|
|
||||||
cliOptions.clear();
|
cliOptions.clear();
|
||||||
cliOptions.add(new CliOption(CORE_DATA, "Should generate core data models").defaultValue("n"));
|
cliOptions.add(new CliOption(CORE_DATA, "Should generate core data models").defaultValue("false"));
|
||||||
cliOptions.add(new CliOption(CLASS_PREFIX, "prefix for generated classes (convention: Abbreviation of pod name e.g. `HN` for `HackerNews`).`")
|
cliOptions.add(new CliOption(CLASS_PREFIX, "prefix for generated classes (convention: Abbreviation of pod name e.g. `HN` for `HackerNews`).`")
|
||||||
.defaultValue("SWG"));
|
.defaultValue("SWG"));
|
||||||
cliOptions.add(new CliOption(POD_NAME, "cocoapods package name (convention: CameCase).")
|
cliOptions.add(new CliOption(POD_NAME, "cocoapods package name (convention: CameCase).")
|
||||||
@ -193,7 +193,7 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
|
|
||||||
if (additionalProperties.containsKey(CORE_DATA)) {
|
if (additionalProperties.containsKey(CORE_DATA)) {
|
||||||
Object coreData = additionalProperties.get(CORE_DATA);
|
Object coreData = additionalProperties.get(CORE_DATA);
|
||||||
if(((String)coreData).equalsIgnoreCase("y")) {
|
if(((String)coreData).equalsIgnoreCase("true")) {
|
||||||
generateCoreData = true;
|
generateCoreData = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user