mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 10:58:55 +00:00
[ObjC] Fix deprecated JSONModel API usage (#4133)
* Fixed deprecated usage -[JSONKeyMapper initWithDictionary:] * Petstore regenerated * Change minimal required version of JSONModel
This commit is contained in:
parent
e78ce6fb1e
commit
a1cd01916e
@ -43,7 +43,7 @@
|
||||
* This method is used by `JSONModel`.
|
||||
*/
|
||||
+ (JSONKeyMapper *)keyMapper {
|
||||
return [[JSONKeyMapper alloc] initWithDictionary:@{ {{#vars}}@"{{baseName}}": @"{{name}}"{{#hasMore}}, {{/hasMore}}{{/vars}} }];
|
||||
return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{ {{#vars}}@"{{name}}": @"{{baseName}}"{{#hasMore}}, {{/hasMore}}{{/vars}} }];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -31,7 +31,7 @@ Pod::Spec.new do |s|
|
||||
{{#useCoreData}} s.resources = '{{podName}}/**/*.{xcdatamodeld,xcdatamodel}'{{/useCoreData}}
|
||||
|
||||
s.dependency 'AFNetworking', '~> 3'
|
||||
s.dependency 'JSONModel', '~> 1.2'
|
||||
s.dependency 'JSONModel', '~> 1.4'
|
||||
s.dependency 'ISO8601', '~> 0.5'
|
||||
end
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
* This method is used by `JSONModel`.
|
||||
*/
|
||||
+ (JSONKeyMapper *)keyMapper {
|
||||
return [[JSONKeyMapper alloc] initWithDictionary:@{ @"id": @"_id", @"name": @"name" }];
|
||||
return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{ @"_id": @"id", @"name": @"name" }];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -17,7 +17,7 @@
|
||||
* This method is used by `JSONModel`.
|
||||
*/
|
||||
+ (JSONKeyMapper *)keyMapper {
|
||||
return [[JSONKeyMapper alloc] initWithDictionary:@{ @"id": @"_id", @"petId": @"petId", @"quantity": @"quantity", @"shipDate": @"shipDate", @"status": @"status", @"complete": @"complete" }];
|
||||
return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{ @"_id": @"id", @"petId": @"petId", @"quantity": @"quantity", @"shipDate": @"shipDate", @"status": @"status", @"complete": @"complete" }];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -17,7 +17,7 @@
|
||||
* This method is used by `JSONModel`.
|
||||
*/
|
||||
+ (JSONKeyMapper *)keyMapper {
|
||||
return [[JSONKeyMapper alloc] initWithDictionary:@{ @"id": @"_id", @"category": @"category", @"name": @"name", @"photoUrls": @"photoUrls", @"tags": @"tags", @"status": @"status" }];
|
||||
return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{ @"_id": @"id", @"category": @"category", @"name": @"name", @"photoUrls": @"photoUrls", @"tags": @"tags", @"status": @"status" }];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -17,7 +17,7 @@
|
||||
* This method is used by `JSONModel`.
|
||||
*/
|
||||
+ (JSONKeyMapper *)keyMapper {
|
||||
return [[JSONKeyMapper alloc] initWithDictionary:@{ @"id": @"_id", @"name": @"name" }];
|
||||
return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{ @"_id": @"id", @"name": @"name" }];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -17,7 +17,7 @@
|
||||
* This method is used by `JSONModel`.
|
||||
*/
|
||||
+ (JSONKeyMapper *)keyMapper {
|
||||
return [[JSONKeyMapper alloc] initWithDictionary:@{ @"id": @"_id", @"username": @"username", @"firstName": @"firstName", @"lastName": @"lastName", @"email": @"email", @"password": @"password", @"phone": @"phone", @"userStatus": @"userStatus" }];
|
||||
return [[JSONKeyMapper alloc] initWithModelToJSONDictionary:@{ @"_id": @"id", @"username": @"username", @"firstName": @"firstName", @"lastName": @"lastName", @"email": @"email", @"password": @"password", @"phone": @"phone", @"userStatus": @"userStatus" }];
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user