swagger-api / swagger-api/swagger-codegen
Using APIClient (Python) in AWS Lambda function
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the generated Python ApiClient entry point and its ThreadPool initialization; no repository file or test is named, so locate the template or generated-client path first. Reproduce the ApiClient() failure in AWS Lambda, then define completion as a supported way to avoid or disable the pool, covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, docker, python
- Domain
- api, backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100