forked from loafle/openapi-generator-original
* [python-fastapi] Fixed integration tests Currently, it is required to use python 3.7 to make python-fastapi generator work. This version is already set in the generated Dockerfile. Thus, it makes sense to build this image. Spotify's docker maven plugin can be used to build the docker image. Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com> * fixup! [python-fastapi] Fixed integration tests Signed-off-by: Nikita Vakula <programmistov.programmist@gmail.com>
OpenAPI generated FastAPI server
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Build package: org.openapitools.codegen.languages.PythonFastAPIServerCodegen
Requirements.
Python >= 3.7
Installation & Usage
To run the server, please execute the following from the root directory:
pip3 install -r requirements.txt
uvicorn main:app --host 0.0.0.0 --port 8080
and open your browser at http://localhost:8080/docs/
to see the docs.
Running with Docker
To run the server on a Docker container, please execute the following from the root directory:
docker-compose up --build
Tests
To run the tests:
pip3 install pytest
PYTHONPATH=src pytest tests