Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Adds a transform step

Copple5a48221ae763
diff --git a/spec/Makefile b/spec/Makefile
index 2f50417e2dc..afdc172acdb 100644
--- a/spec/Makefile
+++ b/spec/Makefile
@@ -1,15 +1,24 @@
REPO_DIR=$(shell pwd)
-run: download.api.v1 download.tsdoc.v1 format
+run: download transform format
+# Format everything - easier for git to track changes
format:
npx prettier --write .
+# Transform docs into working files
+transform:
+ npx swagger-cli bundle --dereference --outfile $(REPO_DIR)/transforms/api_v0_openapi_deparsed.json $(REPO_DIR)/api_v0_openapi.json
+ npx swagger-cli bundle --dereference --outfile $(REPO_DIR)/transforms/storage_v0_openapi_deparsed.json $(REPO_DIR)/storage_v0_openapi.json
+
+# Download all the specs
+download: download.api.v1 download.storage.v1 download.tsdoc.v1
+
download.api.v1:
curl -sS https://api.supabase.com/api/v1-json > $(REPO_DIR)/api_v0_openapi.json
download.storage.v1:
- curl -sS https://supabase.github.io/storage-api/api.json > $(REPO_DIR)/storage_v1_openapi.json
+ curl -sS https://supabase.github.io/storage-api/api.json > $(REPO_DIR)/storage_v0_openapi.json
download.tsdoc.v1:
curl -sS https://supabase.github.io/supabase-js/spec.json > $(REPO_DIR)/enrichments/tsdoc_v1/supabase.json
@@ -26,4 +35,4 @@ download.tsdoc.v1:
$(REPO_DIR)/enrichments/tsdoc_v1/realtime.json \
$(REPO_DIR)/enrichments/tsdoc_v1/storage.json \
$(REPO_DIR)/enrichments/tsdoc_v1/functions.json \
- > $(REPO_DIR)/enrichments/tsdoc_v1/combined.json
\ No newline at end of file
+ > $(REPO_DIR)/enrichments/tsdoc_v1/combined.json