From 1612f592b9102fb7d43a1fe002f7fba5c4831a9f Mon Sep 17 00:00:00 2001 From: g-despot <66276597+g-despot@users.noreply.github.com> Date: Thu, 24 Apr 2025 10:28:39 +0200 Subject: [PATCH] Add version control for REST API --- docs/weaviate/api/rest/v1-29.md | 0 docusaurus.config.js | 20 ++++++++++++++++---- sidebars.js | 7 +++++-- 3 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 docs/weaviate/api/rest/v1-29.md diff --git a/docs/weaviate/api/rest/v1-29.md b/docs/weaviate/api/rest/v1-29.md new file mode 100644 index 00000000..e69de29b diff --git a/docusaurus.config.js b/docusaurus.config.js index 086b7bdd..978ac9bf 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -36,16 +36,28 @@ const config = { [ "@scalar/docusaurus", { + id: "api-v1-30", label: "", route: "/docs/weaviate/api/rest", configuration: { spec: { - // Last updated: 2025-02-15 TODO[g-despot] Update to correct openapi_docs branch - url: "https://raw.githubusercontent.com/weaviate/weaviate/openapi_docs_v1-30/openapi-specs/schema.json", + url: "https://raw.githubusercontent.com/weaviate/weaviate/rest-api-docs/openapi-specs/schema.json", + }, + hideModels: true, + }, + }, + ], + [ + "@scalar/docusaurus", + { + id: "api-v1-29", + label: "", + route: "/docs/weaviate/api/rest/v1-29", + configuration: { + spec: { + url: "https://raw.githubusercontent.com/weaviate/weaviate/openapi_docs_v1-29/openapi-specs/schema.json", }, hideModels: true, - // This feature currently broken - potentially fixed in: https://github.com/scalar/scalar/pull/1387 - // hiddenClients: [...], }, }, ], diff --git a/sidebars.js b/sidebars.js index 73ad7ff2..64f59475 100644 --- a/sidebars.js +++ b/sidebars.js @@ -334,10 +334,13 @@ const sidebars = { ], }, { - type: "doc", - id: "weaviate/api/rest", + type: "category", label: "RESTful API", className: "sidebar-item", + items: [ + "weaviate/api/rest", + "weaviate/api/rest/v1-29", + ], }, ], },