From 3f0342ccdf32c06a7df5afc020c134662779df07 Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Sat, 21 Oct 2023 15:33:30 -0700 Subject: [PATCH] chore: add update-openapi-doc to Makefile --- Makefile | 12 ++++++++++++ website/static/openapi.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9aa672c4b12e..c68a9f2f61a4 100644 --- a/Makefile +++ b/Makefile @@ -17,3 +17,15 @@ bump-version: bump-release-version: cargo ws version --allow-branch "r*" --no-individual-tags --force "*" + +update-openapi-doc: + curl http://localhost:8080/api-docs/openapi.json | jq ' \ + delpaths([ \ + ["paths", "/v1beta/chat/completions"], \ + ["paths", "/v1beta/search"], \ + ["components", "schemas", "CompletionRequest", "properties", "debug_options"], \ + ["components", "schemas", "CompletionResponse", "properties", "debug_data"], \ + ["components", "schemas", "DebugData"], \ + ["components", "schemas", "DebugOptions"] \ + ])' | jq '.servers[0] |= { url: "https://playground.app.tabbyml.com", description: "Playground server" }' \ + > website/static/openapi.json diff --git a/website/static/openapi.json b/website/static/openapi.json index 2fdffa61f78d..0009b3f00d4e 100644 --- a/website/static/openapi.json +++ b/website/static/openapi.json @@ -7,7 +7,7 @@ "name": "Apache 2.0", "url": "https://github.com/TabbyML/tabby/blob/main/LICENSE" }, - "version": "0.3.0" + "version": "0.3.1" }, "servers": [ {