Skip to content

Commit

Permalink
add redirects for REST API
Browse files Browse the repository at this point in the history
  • Loading branch information
sebawita committed Dec 10, 2024
1 parent e1972fa commit f0ff30f
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 37 deletions.
72 changes: 36 additions & 36 deletions site.redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -597,34 +597,34 @@ const siteRedirects = {
},

// Legacy REST API redirects
{
to: '/developers/weaviate/api/rest/',
from: [
'/developers/weaviate/api/rest/schema',
'/developers/weaviate/api/rest/objects',
'/developers/weaviate/api/rest/batch',
'/developers/weaviate/api/rest/backups',
'/developers/weaviate/api/rest/classification',
'/developers/weaviate/api/rest/meta',
'/developers/weaviate/api/rest/nodes',
'/developers/weaviate/api/rest/well-known',
'/developers/weaviate/api/rest_legacy/schema',
'/developers/weaviate/api/rest_legacy/objects',
'/developers/weaviate/api/rest_legacy/batch',
'/developers/weaviate/api/rest_legacy/backups',
'/developers/weaviate/api/rest_legacy/classification',
'/developers/weaviate/api/rest_legacy/meta',
'/developers/weaviate/api/rest_legacy/nodes',
'/developers/weaviate/api/rest_legacy/well-known',
]
},
{
to: '/developers/weaviate/model-providers',
from: [
'/developers/weaviate/api/rest/modules',
'/developers/weaviate/api/rest_legacy/modules',
]
},
// {
// to: '/developers/weaviate/api/rest/',
// from: [
// '/developers/weaviate/api/rest/schema',
// '/developers/weaviate/api/rest/objects',
// '/developers/weaviate/api/rest/batch',
// '/developers/weaviate/api/rest/backups',
// '/developers/weaviate/api/rest/classification',
// '/developers/weaviate/api/rest/meta',
// '/developers/weaviate/api/rest/nodes',
// '/developers/weaviate/api/rest/well-known',
// '/developers/weaviate/api/rest_legacy/schema',
// '/developers/weaviate/api/rest_legacy/objects',
// '/developers/weaviate/api/rest_legacy/batch',
// '/developers/weaviate/api/rest_legacy/backups',
// '/developers/weaviate/api/rest_legacy/classification',
// '/developers/weaviate/api/rest_legacy/meta',
// '/developers/weaviate/api/rest_legacy/nodes',
// '/developers/weaviate/api/rest_legacy/well-known',
// ]
// },
// {
// to: '/developers/weaviate/model-providers',
// from: [
// '/developers/weaviate/api/rest/modules',
// '/developers/weaviate/api/rest_legacy/modules',
// ]
// },

// Products to Pricing redirects

Expand Down Expand Up @@ -793,14 +793,14 @@ const siteRedirects = {
),
];
}
if (existingPath.includes('/weaviate/api/rest')) {
return [
existingPath.replace(
'/weaviate/api/rest',
'/weaviate/current/restful-api-references'
),
];
}
// if (existingPath.includes('/weaviate/api/rest')) {
// return [
// existingPath.replace(
// '/weaviate/api/rest',
// '/weaviate/current/restful-api-references'
// ),
// ];
// }

if (
existingPath.includes('/weaviate/concepts/replication-architecture')
Expand Down
23 changes: 22 additions & 1 deletion static/netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,25 @@ to = "/developers/weaviate/quickstart/:splat"

[[redirects]]
from = "/weaviate/current/getting-started"
to = "/weaviate/quickstart/:splat"
to = "/weaviate/quickstart/:splat"

###==================== REST API ====================

[[redirects]]
from = [
"/developers/weaviate/api/rest/modules",
"/developers/weaviate/api/rest_legacy/modules"
]
to = "/developers/weaviate/model-providers"

[[redirects]]
from = [
"/developers/weaviate/api/rest/*",
"/developers/weaviate/api/rest_legacy/*"
]
to = "/developers/weaviate/api/rest/:splat"

[[redirects]]
from = "/weaviate/current/restful-api-references/*"
to = "/developers/weaviate/api/rest/"

0 comments on commit f0ff30f

Please sign in to comment.