chore: add update-openapi-doc to Makefile

r0.4
Meng Zhang 2023-10-21 15:33:30 -07:00
parent 8fca850037
commit 3f0342ccdf
2 changed files with 13 additions and 1 deletions

View File

@ -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

View File

@ -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": [
{