swagger-codegen icon indicating copy to clipboard operation
swagger-codegen copied to clipboard

The return value is defined as "void" make Python client code to fail

Open madhuri-rai07 opened this issue 11 years ago • 4 comments

The return type of some the APIs are defined as "void" which make no sense in python. The python client code fail with error "not defined".

madhuri-rai07 avatar Apr 06 '15 00:04 madhuri-rai07

I think this error is due to the swagger-spec used to generate code but not swagger-codegen issue.

madhuri-rai07 avatar Apr 06 '15 00:04 madhuri-rai07

I actually think this is an error in swagger-codegen. The swagger spec:

https://github.com/swagger-api/swagger-spec/blob/master/versions/1.2.md#521-object-example

includes:

"type": "void" in the example

So I think that swagger-codegen should do the right thing for python and not emit a return type here.

brendandburns avatar Apr 09 '15 02:04 brendandburns

The issue, due to conversion from 1.2 to 2.0, should be fixed by https://github.com/swagger-api/swagger-parser/pull/34/files. please pull the latest develop_2.0 and give it another try.

wing328 avatar Apr 14 '15 02:04 wing328

I have tested and it works fine now. Thanks!

madhuri-rai07 avatar Apr 16 '15 01:04 madhuri-rai07