swagger-codegen for java and multi-threading support

301 views
Skip to first unread message

Suresh Krishnappa

unread,
Feb 13, 2017, 12:24:24 PM2/13/17
to Swagger
The document for the auto-generated java client (https://github.com/swagger-api/swagger-codegen/tree/master/samples/client/petstore/java/retrofit2rx) mentions:
"It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issue"

Does this mean there will be one thread and one dedicated tcp connection per request?
Won't this make the client in-efficient? Also this means there is no advantage of using http/2 protocol in the client.
Appreciate any inputs regarding this.

Thanks
Suri

wing328

unread,
Mar 1, 2017, 6:02:00 AM3/1/17
to Swagger
Please open a ticket via github.com/swagger-api/swagger-codegen/issues/new to start a discussion in the Github repo.

Suresh Krishnappa於 2017年2月14日星期二 UTC+8上午1時24分24秒寫道:
Reply all
Reply to author
Forward
0 new messages