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

Fix issue that "void" response is treated as model #34

Merged
merged 1 commit into from
Apr 3, 2015
Merged

Fix issue that "void" response is treated as model #34

merged 1 commit into from
Apr 3, 2015

Conversation

xhh
Copy link
Contributor

@xhh xhh commented Apr 3, 2015

Fix issue that "void" response is treated as model when converting spec from v1.2 to v2.0.

See more at swagger-api/swagger-codegen#305

when converting spec from v1.2 to v2.0
fehguy added a commit that referenced this pull request Apr 3, 2015
Fix issue that "void" response is treated as model
@fehguy fehguy merged commit 6c8c04a into swagger-api:develop Apr 3, 2015
mwgray added a commit to mwgray/swagger-codegen that referenced this pull request Sep 21, 2016
There was a lot of issues with this function that deemed it ready for cleanup:
1. There's was a lot of copy paste code with error handling and data parsing, just to do a little bit of distinct code.  It is significantly cleaner now, and the important code is only 1-2 lines a piece.  It's much easier to see what the code is doing in each case.
2. There was very old code for handling lack of swagger supporting void from 2015: swagger-api/swagger-parser#34.  This code was rather confusing `if () is T` and `if "" is T` both seemed to handling the Void case, which was apparantly added a while back.
3. Instead of calling Alamofire's helper functions for response parsing(`responseString` & `responseJSON`) which just delegate to Serializer, the general one(`response`) is now called and the serializer is selected based on the <T> parameter.  String & default(JSON) were the affected cases.
mwgray added a commit to mwgray/swagger-codegen that referenced this pull request Sep 22, 2016
There was a lot of issues with this function that deemed it ready for cleanup:
1. There's was a lot of copy paste code with error handling and data parsing, just to do a little bit of distinct code.  It is significantly cleaner now, and the important code is only 1-2 lines a piece.  It's much easier to see what the code is doing in each case.
2. There was very old code for handling lack of swagger supporting void from 2015: swagger-api/swagger-parser#34.  This code was rather confusing `if () is T` and `if "" is T` both seemed to handling the Void case, which was apparantly added a while back.
3. Instead of calling Alamofire's helper functions for response parsing(`responseString` & `responseJSON`) which just delegate to Serializer, the general one(`response`) is now called and the serializer is selected based on the <T> parameter.  String & default(JSON) were the affected cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants