wordnik/swagger-codegen — pull request #38 by jkelvie (2013-03-14 14:46:44+00:00)
Title: Forced to use scala 2.9.1 and update to template for Objective-C model objects

I changed the build.sbt to use version 2.9.1. Otherwise I was getting errors like "java.lang.NoClassDefFoundError: scala/runtime/RichChar$" for core scala classes when trying to execute my custom object generator. I assume that if I had Scala 2.9.2 installed these errors would not have occurred, but I could not find this version on the scala website (though 2.9.1 is available).

The template update was to resolve an issue where the generated asDictionary routine for model objects never reached the code to use the asDictionary method on child model objects. An example of the generated code is here:
```objc
if(_device != nil){
if([_device isKindOfClass:[NSArray class]]){
NSMutableArray * array = [[NSMutableArray alloc] init];
for( NIKDevice *device in (NSArray*)_device) {
[array addObject:[(NIKSwaggerObject*)device asDictionary]];
}
dict[@"device"] = array;
}
else if(_device && [_device isKindOfClass:[NIKDate class]]) {
NSString * dateString = [(NIKDate*)_device toString];
if(dateString){
dict[@"device"] = dateString;
}
}
}
//THIS WILL NEVER BE REACHED FOR NON-NIL OBJECTS
else {
if(_device != nil) dict[@"device"] = [(NIKSwaggerObject*)_device asDictionary];
}
```