swagger-api / swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
http://swagger.io
Apache License 2.0
16.72k stars 6.02k forks source link

Using APIClient (Python) in AWS Lambda function #12368

Open MikeTherien-PP opened 2 months ago

MikeTherien-PP commented 2 months ago
Description

When trying to use the ApiClient class generated, I get an error, "No such file or directory". Upon further investigation, it appears this is occurring because the client creates a ThreadPool, which isn't allowed in AWS Lambda

Swagger-codegen version

3.0.54 via Docker at swaggerapi/swagger-codegen-cli-v3

Swagger declaration file content or url

n/a - cannot post in a public forum without nda

Command line used for generation
Python - -i {json url} -l python -DapiTest=false -DmodelTests=false -DapiDocs=false -DmodelDocs=false -Dmodels -c ./local/config.json -o ./local
Steps to reproduce

client = ApiClient()

throws error

Related issues/PRs

n/a

Suggest a fix/enhancement

Maybe the ability to disable the use of Thread Pools? If there is a way to do this without modification, please let me know.