[ObjC] Fix deprecated JSONModel API usage#4133
Conversation
|
Fix for #4129 |
|
@Dreddik thanks for the PR. Do we also need to update Btw, please run |
Actually, API changed in v1.4, so we can use it, I suppose? In any way, clients will use version 1.7, because minor version is not specified in
Already done. |
Yes, please update it to v1.4 as that is the minimal version required for the auto-generated ObjC SDK after this change. Also to confirm my understanding, I believe developers can still do the following after the change: and they will receive a warning saying that |
This PR is backward compatible, because it only affects initialization of JSONKeyMapper inside of model classes. |
|
@Dreddik PR merged into master. Thanks for your contribution. |
* upstream/master: (42 commits) add vendor extension to handle void response in jaxrs-cxf better handling of */* Select application/json content-type in python generated client, if */* is in the list of content-types update mxf4j sample [ObjC] Fix deprecated JSONModel API usage (swagger-api#4133) [aspnet5] Fix broken template directory for deprecated lang (swagger-api#4142) Add constructFromObject to Javascript enum generation. (swagger-api#4120) [Obj-c] Generated code documentation fixes (swagger-api#4130) Added QAdept to companies list added clarification for swagger-api#4138 Default added sourceFolder to src/main/java Update pojo.mustache [feign] Use feign-form (swagger-api#4124) DART: Removed the 'justIgnoreThisFlag' flag (swagger-api#4116) fix[dart]: multi-word class names work properly now [ruby] Validate array correctly It never throws error with any values in array. Every element should be validated against the enum. remove glassfish dependencies and use MSF4J internal implementation for the simplicity and reduce dependencies updated to next development version Added isEmtyString check to avoid IndexOutOfBoundException Nancy fx work (swagger-api#4107) ...
* Fixed deprecated usage -[JSONKeyMapper initWithDictionary:] * Petstore regenerated * Change minimal required version of JSONModel
PR checklist
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.shand./bin/security/{LANG}-petstore.shif updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates)2.3.0branch for breaking (non-backward compatible) changes.Description of the PR
Replaced deprecated call
-[JSONKeyMapper initWithDictionary:]with-[JSONKeyMapper initWithModelToJSONDictionary:], inverting keys and values of dictionary as required.