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

Generate and deploy API documentation with UI #357

Merged
merged 8 commits into from
Nov 14, 2024
Merged
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,8 @@ engine/tests/data/auth.json
/ui/src/locale/_build/
/ui/src/locale/**/*.*js

# generated static files
/ui/public/api/

# linting
/ui/hadolint
16 changes: 1 addition & 15 deletions backend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ ifndef ANALYZER_DJANGO_SECRET_KEY
export ANALYZER_DB_PORT=5433
endif

SWAGGER_CODEGEN := swagger-codegen

# Lambdas
REPO_LAMBDA := ${PREFIX}-repo-handler
USERS_LAMBDA := ${PREFIX}-users-handler
Expand Down Expand Up @@ -336,17 +334,6 @@ artemis_scan:
$(CURDIR)/ci-tools/shell/artemis-scan.sh ${ARTEMIS_SCAN_ARGS} github ${REPO_NAME} ${BRANCH_NAME} ${SEVERITY_LEVELS}
.PHONY: artemis_scan

###############################################################################
# Documentation
###############################################################################

dist/api/index.html: lambdas/api/spec.yaml
@echo "${INFO}Building $@"
mkdir -p ${DIST_DIR}/api
mkdir -p ${BUILD_DIR}/api
${SWAGGER_CODEGEN} generate -i lambdas/api/spec.yaml -o ${DIST_DIR}/api -l html
@echo "${OK}"

###############################################################################
# Lambdas
###############################################################################
Expand Down Expand Up @@ -635,8 +622,7 @@ docker: dist/docker/engine \
build: ## Build all
build: lambdas \
docker \
dist/engine_scripts.zip \
dist/api/index.html
dist/engine_scripts.zip
.PHONY: build

###############################################################################
Expand Down
Loading