Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ObjC & file upload #191

Closed
ocasta opened this issue May 15, 2014 · 2 comments
Closed

ObjC & file upload #191

ocasta opened this issue May 15, 2014 · 2 comments

Comments

@ocasta
Copy link

ocasta commented May 15, 2014

We've discovered a couple of issues with the code generated for ObjC when wanting a file upload.

  • While the swagger 1.2 spec states that for type file the paramType MUST be form. To generate the appropriate multipart form in the ObjC code, paramType must be body
  • The field name for a parameter of type file is ignored and name=image is always generated
@fehguy
Copy link
Contributor

fehguy commented Dec 24, 2014

You are correct. It looks like the file upload is hardcoded to image. Will address in 2.1.0-M1.

https://github.com/swagger-api/swagger-codegen/blob/master/src/main/resources/objc/SWGApiClient.m#L251-L259

@fehguy fehguy added this to the v2.1.0-M1 milestone Dec 24, 2014
@fehguy
Copy link
Contributor

fehguy commented Feb 17, 2015

OK this has been fixed, and upgraded to AFNetworking 2.0

@fehguy fehguy closed this as completed Feb 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants