{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/2208","repository_url":"https://api.github.com/repos/swagger-api/swagger-codegen","labels_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/2208/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/2208/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/2208/events","html_url":"https://github.com/swagger-api/swagger-codegen/issues/2208","id":135385132,"number":2208,"title":"[ObjC] Wrong generation of additionalProperties","user":{"login":"cbornet","id":11633333,"avatar_url":"https://avatars.githubusercontent.com/u/11633333?v=3","gravatar_id":"","url":"https://api.github.com/users/cbornet","html_url":"https://github.com/cbornet","followers_url":"https://api.github.com/users/cbornet/followers","following_url":"https://api.github.com/users/cbornet/following{/other_user}","gists_url":"https://api.github.com/users/cbornet/gists{/gist_id}","starred_url":"https://api.github.com/users/cbornet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbornet/subscriptions","organizations_url":"https://api.github.com/users/cbornet/orgs","repos_url":"https://api.github.com/users/cbornet/repos","events_url":"https://api.github.com/users/cbornet/events{/privacy}","received_events_url":"https://api.github.com/users/cbornet/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/labels/Client:%20Objc","name":"Client: Objc","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/milestones/10","html_url":"https://github.com/swagger-api/swagger-codegen/milestones/v2.1.6","labels_url":"https://api.github.com/repos/swagger-api/swagger-codegen/milestones/10/labels","id":1488305,"number":10,"title":"v2.1.6","description":"","creator":{"login":"fehguy","id":249413,"avatar_url":"https://avatars.githubusercontent.com/u/249413?v=3","gravatar_id":"","url":"https://api.github.com/users/fehguy","html_url":"https://github.com/fehguy","followers_url":"https://api.github.com/users/fehguy/followers","following_url":"https://api.github.com/users/fehguy/following{/other_user}","gists_url":"https://api.github.com/users/fehguy/gists{/gist_id}","starred_url":"https://api.github.com/users/fehguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fehguy/subscriptions","organizations_url":"https://api.github.com/users/fehguy/orgs","repos_url":"https://api.github.com/users/fehguy/repos","events_url":"https://api.github.com/users/fehguy/events{/privacy}","received_events_url":"https://api.github.com/users/fehguy/received_events","type":"User","site_admin":false},"open_issues":82,"closed_issues":271,"state":"open","created_at":"2016-01-06T20:41:39Z","updated_at":"2016-02-25T16:44:18Z","due_on":null,"closed_at":null},"comments":23,"created_at":"2016-02-22T11:01:20Z","updated_at":"2016-02-25T16:45:12Z","closed_at":null,"body":"The following definition\r\n```json\r\n{\r\n  \"swagger\": \"2.0\",\r\n  \"info\": {\r\n    \"version\": \"1.0.0\",\r\n    \"title\": \"Swagger Petstore\"\r\n  },\r\n  \"paths\": {\r\n    \"/pets\": {\r\n      \"get\": {\r\n        \"description\": \"Returns all pets from the system that the user has access to\",\r\n        \"produces\": [\r\n          \"application/json\"\r\n        ],\r\n        \"responses\": {\r\n          \"200\": {\r\n            \"description\": \"A list of pets.\",\r\n            \"schema\": {\r\n              \"type\": \"array\",\r\n              \"items\": {\r\n                \"$ref\": \"#/definitions/Pet\"\r\n              }\r\n            }\r\n          }\r\n        }\r\n      }\r\n    }\r\n  },\r\n  \"definitions\": {\r\n    \"PetMap\": {\r\n      \"type\": \"object\",\r\n      \"additionalProperties\": {\r\n        \"$ref\": \"#/definitions/Pet\"\r\n      }\r\n    },\r\n    \"Pet\": {\r\n      \"type\": \"object\",\r\n      \"properties\": {\r\n        \"id\": {\r\n          \"type\": \"integer\",\r\n          \"format\": \"int64\"\r\n        }\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\nGenerates SWGPetMap.h\r\n```objective-c\r\n@interface SWGPetMap : NSMutableDictionary\r\n```\r\nand SWGPetMap.m\r\n```objective-c\r\n#import \"SWGPetMap.h\"\r\n\r\n@implementation SWGPetMap\r\n\r\n- (instancetype)init {\r\n  self = [super init];\r\n\r\n  if (self) {\r\n    // initalise property's default value, if any\r\n    \r\n  }\r\n\r\n  return self;\r\n}\r\n\r\n/**\r\n * Maps json key to property name.\r\n * This method is used by `JSONModel`.\r\n */\r\n+ (JSONKeyMapper *)keyMapper\r\n{\r\n  return [[JSONKeyMapper alloc] initWithDictionary:@{  }];\r\n}\r\n\r\n/**\r\n * Indicates whether the property with the given name is optional.\r\n * If `propertyName` is optional, then return `YES`, otherwise return `NO`.\r\n * This method is used by `JSONModel`.\r\n */\r\n+ (BOOL)propertyIsOptional:(NSString *)propertyName\r\n{\r\n  NSArray *optionalProperties = @[];\r\n\r\n  if ([optionalProperties containsObject:propertyName]) {\r\n    return YES;\r\n  }\r\n  else {\r\n    return NO;\r\n  }\r\n}\r\n\r\n/**\r\n * Gets the string presentation of the object.\r\n * This method will be called when logging model object using `NSLog`.\r\n */\r\n- (NSString *)description {\r\n    return [[self toDictionary] description];\r\n}\r\n\r\n@end\r\n```\r\nwhich fails to compile because toDictionary is not declared for NSMutableDictionary (it's a JSONModel method)"},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/comments/188871922","html_url":"https://github.com/swagger-api/swagger-codegen/issues/2208#issuecomment-188871922","issue_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/2208","id":188871922,"user":{"login":"wing328","id":934260,"avatar_url":"https://avatars.githubusercontent.com/u/934260?v=3","gravatar_id":"","url":"https://api.github.com/users/wing328","html_url":"https://github.com/wing328","followers_url":"https://api.github.com/users/wing328/followers","following_url":"https://api.github.com/users/wing328/following{/other_user}","gists_url":"https://api.github.com/users/wing328/gists{/gist_id}","starred_url":"https://api.github.com/users/wing328/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wing328/subscriptions","organizations_url":"https://api.github.com/users/wing328/orgs","repos_url":"https://api.github.com/users/wing328/repos","events_url":"https://api.github.com/users/wing328/events{/privacy}","received_events_url":"https://api.github.com/users/wing328/received_events","type":"User","site_admin":false},"created_at":"2016-02-25T16:45:11Z","updated_at":"2016-02-25T16:45:11Z","body":"@cbornet I'll need to spend some time to look into this. How urgent/critical is this fix?"}}