docs: change configurations to make v2 the main docs (#9729)

* docs: change configurations to make v2 the main docs

* move api routes to top level

* remove api prefix

* update opengraph images

* show v1 link

* add redirect to v1
This commit is contained in:
Shahed Nasser
2024-10-24 14:49:58 +03:00
committed by GitHub
parent 471f7e4a10
commit 88f2d17a24
40 changed files with 115 additions and 128 deletions

View File

@@ -9,7 +9,7 @@ const DownloadFull = () => {
return (
<Button variant="secondary">
<Link href={`/api/download/${area}`} download target="_blank">
<Link href={`/download/${area}`} download target="_blank">
Download OpenApi Specs Collection
</Link>
</Button>

View File

@@ -13,7 +13,7 @@ const TagsOperationDescriptionSectionWorkflowBadge = ({
<p className="my-1">
Workflow{" "}
<Link
href={`${config.baseUrl}/v2/resources/references/medusa-workflows/${workflow}`}
href={`${config.baseUrl}/resources/references/medusa-workflows/${workflow}`}
className="align-middle"
target="_blank"
rel="noreferrer"

View File

@@ -70,7 +70,7 @@ const TagSectionComponent = ({ tag }: TagSectionProps) => {
}>(
loadData && tag["x-associatedSchema"]
? basePathUrl(
`/api/schema?name=${tag["x-associatedSchema"].$ref}&area=${area}`
`/schema?name=${tag["x-associatedSchema"].$ref}&area=${area}`
)
: null,
swrFetcher,
@@ -81,9 +81,7 @@ const TagSectionComponent = ({ tag }: TagSectionProps) => {
const { data: pathsData } = useSWR<{
paths: PathsObject
}>(
loadData
? basePathUrl(`/api/tag?tagName=${slugTagName}&area=${area}`)
: null,
loadData ? basePathUrl(`/tag?tagName=${slugTagName}&area=${area}`) : null,
swrFetcher,
{
errorRetryInterval: 2000,