forked from loafle/openapi-generator-original
Update samples flask connexion (#5203)
* Update samples for flaskConnexion-python2. * Update samples for flaskConnexion.
This commit is contained in:
parent
c812d81e9a
commit
9b113d5a19
72
samples/server/petstore/flaskConnexion-python2/.dockerignore
Normal file
72
samples/server/petstore/flaskConnexion-python2/.dockerignore
Normal file
@ -0,0 +1,72 @@
|
||||
.travis.yaml
|
||||
.swagger-codegen-ignore
|
||||
README.md
|
||||
tox.ini
|
||||
git_push.sh
|
||||
test-requirements.txt
|
||||
setup.py
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
env/
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*,cover
|
||||
.hypothesis/
|
||||
venv/
|
||||
.python-version
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
#Ipython Notebook
|
||||
.ipynb_checkpoints
|
16
samples/server/petstore/flaskConnexion-python2/Dockerfile
Normal file
16
samples/server/petstore/flaskConnexion-python2/Dockerfile
Normal file
@ -0,0 +1,16 @@
|
||||
FROM python:2-alpine
|
||||
|
||||
RUN mkdir -p /usr/src/app
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY requirements.txt /usr/src/app/
|
||||
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . /usr/src/app
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["python"]
|
||||
|
||||
CMD ["-m", "swagger_server"]
|
@ -35,3 +35,15 @@ To launch the integration tests, use tox:
|
||||
sudo pip install tox
|
||||
tox
|
||||
```
|
||||
|
||||
## Running with Docker
|
||||
|
||||
To run the server on a Docker container, please execute the following from the root directory:
|
||||
|
||||
```bash
|
||||
# building the image
|
||||
docker build -t swagger_server .
|
||||
|
||||
# starting up a container
|
||||
docker run -p 8080:8080 swagger_server
|
||||
```
|
@ -108,11 +108,11 @@ paths:
|
||||
type: "array"
|
||||
items:
|
||||
type: "string"
|
||||
default: "available"
|
||||
enum:
|
||||
- "available"
|
||||
- "pending"
|
||||
- "sold"
|
||||
default: "available"
|
||||
collectionFormat: "csv"
|
||||
responses:
|
||||
200:
|
||||
|
@ -108,11 +108,11 @@ paths:
|
||||
type: "array"
|
||||
items:
|
||||
type: "string"
|
||||
default: "available"
|
||||
enum:
|
||||
- "available"
|
||||
- "pending"
|
||||
- "sold"
|
||||
default: "available"
|
||||
collectionFormat: "csv"
|
||||
responses:
|
||||
200:
|
||||
|
Loading…
x
Reference in New Issue
Block a user