Add a command to write the OpenAPI spec without a server
`just openapi [dir]` (go run ./cmd/openapi) writes openapi.json (3.1) and openapi-3.0.json without a database or configuration. A test checks it matches the spec the server serves.
This commit is contained in:
1 parent
973ebf224b
commit
6da96f79e7
6 files changed
+108
-1
No files matched your search
@@ -15,6 +15,10 @@ sqlc-generate:
|
||||
migrate-create name:
|
||||
@migrate create -ext sql -dir internal/db/migrations -seq {{name}}
|
||||
|
||||
# Write openapi.json and openapi-3.0.json without starting the server, e.g. `just openapi ../MusicPlayer/api`
|
||||
openapi out=".":
|
||||
@go run ./cmd/openapi -out {{out}}
|
||||
|
||||
build: sqlc-generate templ-build
|
||||
@echo "Building..."
|
||||
@go build -o main cmd/main.go
|
||||
|
||||
Reference in new issue
Block a user