diff --git a/www/apps/api-reference/app/api/[area]/layout.tsx b/www/apps/api-reference/app/v2/api/[area]/layout.tsx
similarity index 90%
rename from www/apps/api-reference/app/api/[area]/layout.tsx
rename to www/apps/api-reference/app/v2/api/[area]/layout.tsx
index 63b41b825d..7bfc724ddf 100644
--- a/www/apps/api-reference/app/api/[area]/layout.tsx
+++ b/www/apps/api-reference/app/v2/api/[area]/layout.tsx
@@ -1,6 +1,6 @@
-import "../../globals.css"
+import "../../../globals.css"
import Navbar from "@/components/Navbar"
-import Providers from "../../../providers"
+import Providers from "../../../../providers"
import { WideLayout } from "docs-ui"
import { Inter, Roboto_Mono } from "next/font/google"
import clsx from "clsx"
diff --git a/www/apps/api-reference/app/api/[area]/opengraph-image.jpg b/www/apps/api-reference/app/v2/api/[area]/opengraph-image.jpg
similarity index 100%
rename from www/apps/api-reference/app/api/[area]/opengraph-image.jpg
rename to www/apps/api-reference/app/v2/api/[area]/opengraph-image.jpg
diff --git a/www/apps/api-reference/app/api/[area]/page.tsx b/www/apps/api-reference/app/v2/api/[area]/page.tsx
similarity index 90%
rename from www/apps/api-reference/app/api/[area]/page.tsx
rename to www/apps/api-reference/app/v2/api/[area]/page.tsx
index 428ab2ace2..53fb266157 100644
--- a/www/apps/api-reference/app/api/[area]/page.tsx
+++ b/www/apps/api-reference/app/v2/api/[area]/page.tsx
@@ -1,7 +1,7 @@
import AreaProvider from "@/providers/area"
-import AdminContentV2 from "../../_mdx/admin.mdx"
-import StoreContentV2 from "../../_mdx/store.mdx"
-import ClientLibrariesV2 from "../../_mdx/client-libraries.mdx"
+import AdminContentV2 from "../../../_mdx/admin.mdx"
+import StoreContentV2 from "../../../_mdx/store.mdx"
+import ClientLibrariesV2 from "../../../_mdx/client-libraries.mdx"
import Section from "@/components/Section"
import Tags from "@/components/Tags"
import type { Area } from "@/types/openapi"
diff --git a/www/apps/api-reference/app/api/[area]/twitter-image.jpg b/www/apps/api-reference/app/v2/api/[area]/twitter-image.jpg
similarity index 100%
rename from www/apps/api-reference/app/api/[area]/twitter-image.jpg
rename to www/apps/api-reference/app/v2/api/[area]/twitter-image.jpg
diff --git a/www/apps/api-reference/app/api/algolia/route.ts b/www/apps/api-reference/app/v2/api/algolia/route.ts
similarity index 94%
rename from www/apps/api-reference/app/api/algolia/route.ts
rename to www/apps/api-reference/app/v2/api/algolia/route.ts
index c4897c6266..daf911b755 100644
--- a/www/apps/api-reference/app/api/algolia/route.ts
+++ b/www/apps/api-reference/app/v2/api/algolia/route.ts
@@ -1,12 +1,12 @@
import OpenAPIParser from "@readme/openapi-parser"
import algoliasearch from "algoliasearch"
-import type { ExpandedDocument, Operation } from "../../../types/openapi"
+import type { ExpandedDocument, Operation } from "../../../../types/openapi"
import path from "path"
-import getPathsOfTag from "../../../utils/get-paths-of-tag"
-import getSectionId from "../../../utils/get-section-id"
+import getPathsOfTag from "../../../../utils/get-paths-of-tag"
+import getSectionId from "../../../../utils/get-section-id"
import { NextResponse } from "next/server"
import { JSDOM } from "jsdom"
-import getUrl from "../../../utils/get-url"
+import getUrl from "../../../../utils/get-url"
import { capitalize } from "docs-ui"
export async function GET() {
diff --git a/www/apps/api-reference/app/api/base-specs/route.ts b/www/apps/api-reference/app/v2/api/base-specs/route.ts
similarity index 100%
rename from www/apps/api-reference/app/api/base-specs/route.ts
rename to www/apps/api-reference/app/v2/api/base-specs/route.ts
diff --git a/www/apps/api-reference/app/api/download/[area]/route.ts b/www/apps/api-reference/app/v2/api/download/[area]/route.ts
similarity index 100%
rename from www/apps/api-reference/app/api/download/[area]/route.ts
rename to www/apps/api-reference/app/v2/api/download/[area]/route.ts
diff --git a/www/apps/api-reference/app/api/schema/route.ts b/www/apps/api-reference/app/v2/api/schema/route.ts
similarity index 93%
rename from www/apps/api-reference/app/api/schema/route.ts
rename to www/apps/api-reference/app/v2/api/schema/route.ts
index fb0ec3448a..bbe840751d 100644
--- a/www/apps/api-reference/app/api/schema/route.ts
+++ b/www/apps/api-reference/app/v2/api/schema/route.ts
@@ -1,9 +1,9 @@
import { NextResponse } from "next/server"
-import { SchemaObject } from "../../../types/openapi"
+import { SchemaObject } from "../../../../types/openapi"
import path from "path"
import { existsSync, promises as fs } from "fs"
import { parseDocument } from "yaml"
-import dereference from "../../../utils/dereference"
+import dereference from "../../../../utils/dereference"
export async function GET(request: Request) {
const { searchParams } = new URL(request.url)
diff --git a/www/apps/api-reference/app/api/tag/route.ts b/www/apps/api-reference/app/v2/api/tag/route.ts
similarity index 100%
rename from www/apps/api-reference/app/api/tag/route.ts
rename to www/apps/api-reference/app/v2/api/tag/route.ts
diff --git a/www/apps/api-reference/components/DownloadFull/index.tsx b/www/apps/api-reference/components/DownloadFull/index.tsx
index 807a48db7b..f1022fc772 100644
--- a/www/apps/api-reference/components/DownloadFull/index.tsx
+++ b/www/apps/api-reference/components/DownloadFull/index.tsx
@@ -9,7 +9,11 @@ const DownloadFull = () => {
return (
diff --git a/www/apps/api-reference/components/Navbar/index.tsx b/www/apps/api-reference/components/Navbar/index.tsx
index b07a28e905..d98b3ca6b8 100644
--- a/www/apps/api-reference/components/Navbar/index.tsx
+++ b/www/apps/api-reference/components/Navbar/index.tsx
@@ -31,8 +31,8 @@ const Navbar = () => {
return (
{
paths: PathsObject
}>(
!Object.keys(paths).length
- ? basePathUrl(`/api/tag?tagName=${tagSlugName}&area=${area}`)
+ ? basePathUrl(`/tag?tagName=${tagSlugName}&area=${area}`)
: null,
swrFetcher,
{
diff --git a/www/apps/api-reference/components/Tags/Section/index.tsx b/www/apps/api-reference/components/Tags/Section/index.tsx
index e11d160efc..97ad4a651d 100644
--- a/www/apps/api-reference/components/Tags/Section/index.tsx
+++ b/www/apps/api-reference/components/Tags/Section/index.tsx
@@ -58,7 +58,7 @@ const TagSection = ({ tag }: TagSectionProps) => {
}>(
tag["x-associatedSchema"]
? basePathUrl(
- `/api/schema?name=${tag["x-associatedSchema"].$ref}&area=${area}`
+ `/schema?name=${tag["x-associatedSchema"].$ref}&area=${area}`
)
: null,
swrFetcher,
diff --git a/www/apps/api-reference/components/Tags/index.tsx b/www/apps/api-reference/components/Tags/index.tsx
index d558fe8bc6..fc3d1fd026 100644
--- a/www/apps/api-reference/components/Tags/index.tsx
+++ b/www/apps/api-reference/components/Tags/index.tsx
@@ -36,7 +36,7 @@ const Tags = () => {
const { data } = useSWR(
loadData && !baseSpecs
- ? basePathUrl(`/api/base-specs?area=${area}&expand=${expand}`)
+ ? basePathUrl(`/base-specs?area=${area}&expand=${expand}`)
: null,
swrFetcher,
{
diff --git a/www/apps/api-reference/next.config.mjs b/www/apps/api-reference/next.config.mjs
index 0cd5c80730..6ef9302fa2 100644
--- a/www/apps/api-reference/next.config.mjs
+++ b/www/apps/api-reference/next.config.mjs
@@ -3,7 +3,7 @@ import bundleAnalyzer from "@next/bundle-analyzer"
/** @type {import('next').NextConfig} */
const nextConfig = {
- basePath: process.env.NEXT_PUBLIC_BASE_PATH || "/v2",
+ // basePath: process.env.NEXT_PUBLIC_BASE_PATH || "/v2",
async rewrites() {
return {
fallback: [
diff --git a/www/apps/api-reference/providers/search.tsx b/www/apps/api-reference/providers/search.tsx
index e43906e5c6..6c07df10e3 100644
--- a/www/apps/api-reference/providers/search.tsx
+++ b/www/apps/api-reference/providers/search.tsx
@@ -48,7 +48,7 @@ const SearchProvider = ({ children }: SearchProviderProps) => {
},
],
checkInternalPattern: new RegExp(
- `^${config.baseUrl}${basePathUrl("/api/(admin|store)")}`
+ `^${config.baseUrl}${basePathUrl(`/(admin|store)`)}`
),
filterOptions: searchFiltersV2,
}}
diff --git a/www/apps/api-reference/utils/get-url.ts b/www/apps/api-reference/utils/get-url.ts
index c4eeaec365..2b22581d68 100644
--- a/www/apps/api-reference/utils/get-url.ts
+++ b/www/apps/api-reference/utils/get-url.ts
@@ -2,5 +2,5 @@ import { config } from "../config"
import basePathUrl from "./base-path-url"
export default function getUrl(area: string, tagName?: string): string {
- return `${config.baseUrl}${basePathUrl(`/api/${area}#${tagName}`)}`
+ return `${config.baseUrl}${basePathUrl(`/${area}#${tagName}`)}`
}