OpenAPITools / OpenAPITools/openapi-generator
[REQ] Add the 'impl' directory to explain how to use python-fastapi
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
Thanks for the amazing project, I am a Python user, I want to use the python-fastapi generator to generate some Python code with the fastapi framework supported. But I failed to run it, the error log is something like "AttributeError: module 'openapi_server' has no attribute 'impl'". This might be a hint that my own implementation is needed to override the default (empty) implementations generated, However, I have tried many implementation strategies, and my own implementation still can not be successfully invoked. I am wondering if it is possible to provide a 'impl' directory with a basic implementation under samples/server/petstore/python-fastapi/src/openapi_server to demonstrate how it works.
Many thanks!
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
Start at samples/server/petstore/python-fastapi/src/openapi_server and inspect how the generated server package exposes implementation modules. Reproduce the reported AttributeError with the python-fastapi petstore sample, then add a basic impl directory that demonstrates overriding the default empty implementations and verify the sample invokes it successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fastapi, python
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100