Bug Report Checklist
Description
In my Petstore I've added in an input header of type boolean. When I generate the Objc code, the header hasn't been recognised as a boolean, so the relevant template snippet hasn't generated the correct code.
The consequence is that when when the code is run, and the OAIApiClient goes to set the header in the request, the app crashes with the error Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFBoolean length]: unrecognized selector sent to instance. This is of course because the type of the value being set is of NSCFBoolean and not a NSString because the snippet wasn't generated to convert the boolean to a string representation for the HTTP request header.
openapi-generator version
4.3.1
OpenAPI declaration file content or url
https://github.com/kierans/openapi-generator-objc-sample
Command line used for generation
Steps to reproduce
- Add an input header of type boolean
- Generate objc code.
Related issues/PRs
Suggest a fix
Bug Report Checklist
Description
In my Petstore I've added in an input header of type boolean. When I generate the Objc code, the header hasn't been recognised as a boolean, so the relevant template snippet hasn't generated the correct code.
The consequence is that when when the code is run, and the
OAIApiClientgoes to set the header in the request, the app crashes with the errorTerminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFBoolean length]: unrecognized selector sent to instance. This is of course because the type of the value being set is ofNSCFBooleanand not aNSStringbecause the snippet wasn't generated to convert the boolean to a string representation for the HTTP request header.openapi-generator version
4.3.1
OpenAPI declaration file content or url
https://github.com/kierans/openapi-generator-objc-sample
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix