Skip to content

Commit 30c71fd

Browse files
committed
feat: add make docs to render OpenAPI contracts as Swagger
1 parent fccf3a4 commit 30c71fd

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: help init fireform build up down logs logs-app logs-ollama shell pull-model test clean super-clean status ready-banner sync
1+
.PHONY: help init fireform build up down logs logs-app logs-ollama shell pull-model test clean super-clean status ready-banner sync docs
22

33
COMPOSE = docker compose -f docker/dev/compose.yml --env-file docker/.env.dev
44
ENV_DEV = docker/.env.dev
@@ -31,6 +31,7 @@ help:
3131
@echo "make shell - Open shell in running app container"
3232
@echo "make pull-model - Pull Ollama model from .env.dev ($(OLLAMA_MODEL))"
3333
@echo "make test - Run test suite"
34+
@echo "make docs - Serve interactive API docs from the OpenAPI contract"
3435
@echo "make migrate - Run pending Alembic migrations"
3536
@echo "make migration - Generate new migration (msg='description')"
3637
@echo "make clean - Stop containers (preserves volumes)"
@@ -105,6 +106,10 @@ pull-model:
105106
test:
106107
@$(COMPOSE) exec -T app python3 -m pytest tests/ -v
107108

109+
docs:
110+
@echo "Serving Swagger UI from contracts/openapi.yaml at http://localhost:8088"
111+
@npx --yes swagger-ui-watcher contracts/openapi.yaml --port 8088
112+
108113
migrate:
109114
@$(COMPOSE) exec -T app alembic upgrade head
110115

0 commit comments

Comments
 (0)