-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (34 loc) · 1010 Bytes
/
Makefile
File metadata and controls
41 lines (34 loc) · 1010 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
KOYEB_API ?= $(shell echo $${KOYEB_API:-https://api.prod.koyeb.com})
TEST_OPTS=-v -test.timeout 300s
GIT_USER_ID?=koyeb
GIT_REPO_ID?=koyeb-api-client-python
OPENAPI_GENERATOR_VERSION?=latest
PACKAGE_VERSION?=1.4.3
DOCKER ?= docker
.PHONY: gen-api-client
gen-api-client: fetch-spec
$(DOCKER) run --rm \
-v `pwd`/spec:/spec \
-v `pwd`:/builder openapitools/openapi-generator-cli:${OPENAPI_GENERATOR_VERSION} \
generate \
--git-user-id ${GIT_USER_ID} \
--git-repo-id ${GIT_REPO_ID} \
-i /spec/openapi.json \
-g python \
-o /builder \
--package-name koyeb.api \
--additional-properties packageVersion=${PACKAGE_VERSION} \
--additional-properties licenseInfo="Apache-2.0" \
--additional-properties generateSourceCodeOnly=true
git checkout -- koyeb/__init__.py
.PHONY: gen-docs
gen-docs:
./scripts/generate_docs.sh
.PHONY: format
format:
black koyeb
.PHONY: fetch-spec
fetch-spec:
curl -L -s $(KOYEB_API)/public.swagger.json > spec/openapi.json
test:
python -m unitest