Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add swagger docs #47

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ firmwares
__pycache__
*.egg-info
*.pyc
.qmk_compiler_api-*
activate*
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ EXPOSE 5001

WORKDIR /qmk_api
COPY . /qmk_api
RUN pip3 install -r requirements.txt git+git://github.com/qmk/qmk_compiler.git@master git+git://github.com/skullydazed/kle2xy.git@master
RUN pip3 install -r requirements.txt git+https://github.com/qmk/qmk_compiler.git@master git+https://github.com/skullydazed/kle2xy.git@master
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
CMD ./run
6 changes: 3 additions & 3 deletions bin/setup_virtualenv
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ ln -s .qmk_compiler_api-$PYTHON_VERSION/bin/activate activate-$PYTHON_VERSION ||
# Setup the environment
source activate-$PYTHON_VERSION || exit
pip install -r requirements.txt || exit
if [ -d ../qmk_compiler_worker ]; then
pip install --editable ../qmk_compiler_worker
if [ -d ../qmk_compiler ]; then
pip install --editable ../qmk_compiler
else
pip install git+git://github.com/qmk/qmk_compiler_worker.git@master
pip install git+git://github.com/qmk/qmk_compiler.git@master
fi

cat << EOF
Expand Down
2 changes: 1 addition & 1 deletion bin/start_minio
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
1#!/bin/sh

S3_ACCESS_KEY='minio_dev'
S3_SECRET_KEY='minio_dev_secret'
Expand Down
18 changes: 9 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
version: '3'
version: "3"

# This file should live in a directory about `qmk_api` and `qmk_compiler`
# Eventually we would have some sort of git subdir or something to contain
# this... For now, just cp (or symlink) it up a dir or something.

services:
qmk_api:
build: ./qmk_api
build: .
ports:
- "5000:5000"
- "5000:5000"
environment:
REDIS_HOST: redis
S3_HOST: http://minio:9000
S3_ACCESS_KEY: minio_dev
S3_SECRET_KEY: minio_dev_secret
UPDATE_API: 'true'
UPDATE_API: "true"

qmk_compiler:
build: ./qmk_compiler
build: ../qmk_compiler
environment:
MINIO_ACCESS_KEY: minio_dev
MINIO_SECRET_KEY: minio_dev_secret
Expand All @@ -27,9 +27,9 @@ services:
minio:
image: minio/minio:RELEASE.2018-09-25T21-34-43Z
volumes:
- data:/data
- data:/data
ports:
- "9000:9000"
- "9000:9000"
environment:
MINIO_ACCESS_KEY: minio_dev
MINIO_SECRET_KEY: minio_dev_secret
Expand All @@ -47,8 +47,8 @@ services:
# is supposedly where redis looks for its conf
# - ./redis/:/usr/local/etc/redis/
ports:
- "6379:6379"
- "6379:6379"
restart: always

volumes:
data:
data:
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ We follow the style guidelines for QMK and have provided a yapf config in [setup
Our documentation lives on GitBook and can be found here:

> https://docs.api.qmk.fm/using-the-api

The swagger documentation can be found at `API_URL/spec` (JSON) or `API_URL/swagger` (UI)
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ gunicorn
requests
rq
sparse_list
flasgger
Loading