Skip to content
Snippets Groups Projects
Verified Commit 487db2c4 authored by Erwan Rouchet's avatar Erwan Rouchet
Browse files

Add make api-schema command

parent 3f87ce89
No related branches found
No related tags found
1 merge request!758Add make api-schema command
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
PONOS_BRANCH=master
COMMON_BRANCH=master
IMAGE_TAG=registry.gitlab.com/arkindex/backend
API_CLIENT_PATH=../api-client
.PHONY: all
all: clean build
......@@ -37,6 +38,9 @@ test-fixtures-restore:
psql -h 127.0.0.1 -p 9100 -U devuser -c 'DROP DATABASE arkindex_dev' template1
psql -h 127.0.0.1 -p 9100 -U devuser -c 'ALTER DATABASE arkindex_dev_replace RENAME TO arkindex_dev' template1
api-schema:
arkindex/manage.py generateschema --generator_class arkindex.project.openapi.SchemaGenerator > $(API_CLIENT_PATH)/arkindex/schema.yml
require-version:
@if [ ! "$(version)" ]; then echo "Missing version to publish"; exit 1; fi
@git rev-parse $(version) >/dev/null 2>&1 && (echo "Version $(version) already exists on local git repo !" && exit 1) || true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment