Initialized openAPI doc

This commit is contained in:
Penguin-71630
2025-12-07 02:11:14 +08:00
commit 87da626b35
7 changed files with 604 additions and 0 deletions

16
Makefile Normal file
View File

@@ -0,0 +1,16 @@
.PHONY: viewapi
# 定義要檢查的模組目錄
NODE_MODULES_PATH := node_modules
viewapi:
@echo "Bootstrapping API document viewer..."
if [ ! -d "$(NODE_MODULES_PATH)" ]; then \
echo "Dependencies not installed, installing swagger-ui-express, yamljs..."; \
[ ! -f "package.json" ] && npm init -y > /dev/null; \
npm install express swagger-ui-express yamljs; \
else \
echo "Dependencies already installed."; \
fi && \
echo "Booting up API document viewer..." && \
node api/view-API-doc.js