Skip to content

Commit

Permalink
chore: add update-openapi-doc to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
wsxiaoys committed Oct 21, 2023
1 parent 8fca850 commit 3f0342c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion website/static/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down

0 comments on commit 3f0342c

Please sign in to comment.