Skip to content

Commit c64e9ca

Browse files
Revert "feat: fixup openapi and related scripts & styles (#79)"
This reverts commit af31f10.
1 parent af31f10 commit c64e9ca

File tree

14 files changed

+1010
-93
lines changed

14 files changed

+1010
-93
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
OPENAI_API_KEY=your_openai_api_key # Only used for generating embeddings or AI search
2-
NEXT_PUBLIC_SITE_URL=https://docs.recall.network # Only for production
2+
NEXT_PUBLIC_SITE_URL=https://docs.recall.com # Only for production
33
NEXT_PUBLIC_GA_ID=your_google_analytics_id # Only for production

app/[[...slug]]/page.tsx

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { ImageZoom, type ImageZoomProps } from "fumadocs-ui/components/image-zoo
44
import { Step, Steps } from "fumadocs-ui/components/steps";
55
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
66
import { TypeTable } from "fumadocs-ui/components/type-table";
7-
import Image, { type ImageProps } from "next/image";
87
import { notFound } from "next/navigation";
98
import { HTMLAttributes } from "react";
109

@@ -27,8 +26,23 @@ const defaultMdxComponents = {
2726
Tab,
2827
Tabs,
2928
TypeTable,
30-
ImageNoZoom: (props: ImageProps) => <Image {...props} />,
31-
img: (props: ImageZoomProps) => <ImageZoom {...props} />,
29+
img: (props: ImageZoomProps) => {
30+
// Don't apply ImageZoom to images inside Card components
31+
// This prevents the unwanted zoom behavior on partner logos and other card images
32+
if (
33+
props.className?.includes("object-contain") ||
34+
props.alt?.includes("Network") ||
35+
props.alt?.includes("Protocol") ||
36+
props.alt?.includes("Terminal") ||
37+
props.alt?.includes("Lit") ||
38+
props.alt?.includes("Rhinestone") ||
39+
props.alt?.includes("Lilypad")
40+
) {
41+
// eslint-disable-next-line @next/next/no-img-element, jsx-a11y/alt-text
42+
return <img {...(props as any)} />;
43+
}
44+
return <ImageZoom {...props} />;
45+
},
3246
Card: (props: CardProps) => <Card {...props} />,
3347
Cards: (props: HTMLAttributes<HTMLDivElement>) => <Cards {...props} />,
3448
Callout: (props: CalloutProps) => <Callout {...props} />,
@@ -40,15 +54,9 @@ export default async function Page(props: { params: Promise<{ slug?: string[] }>
4054
if (!page) notFound();
4155

4256
const MDX = page.data.body;
43-
// Don't show the TOC or edit button on the root page, or the auto-generated API reference pages
57+
// Don't show the TOC or edit button on the root page
4458
const isRootPage = !params.slug || params.slug.length === 0;
45-
const isApiReferencePage = params.slug?.[0] === "api-reference";
46-
// Ignore the `api-reference/endpoints` page since it's manually written, so we want the TOC
47-
const isApiReferenceRootPage =
48-
params.slug?.length === 2 &&
49-
params.slug?.[0] === "api-reference" &&
50-
params.slug?.[1] === "endpoints";
51-
const isApiPage = isApiReferencePage && !isApiReferenceRootPage;
59+
const isApiPage = params.slug?.[0] === "reference";
5260
const githubPath = `docs/${page.file.path}`;
5361
const githubInfo = {
5462
repo: "docs",

docs/api-reference/endpoints/agent.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Agent
3-
description: Agent management endpoints for a single agent to interact with
3+
description: Agent management endpoints
44
full: true
55
_openapi:
66
toc: []

docs/api-reference/endpoints/agents.mdx

Lines changed: 0 additions & 27 deletions
This file was deleted.

docs/api-reference/endpoints/auth.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,38 @@
11
---
22
title: Auth
3-
description: Authentication endpoints for verifying agent wallet ownership
3+
description: Authentication endpoints
44
full: true
55
_openapi:
66
toc: []
77
structuredData:
88
headings: []
99
contents:
10+
- content: >-
11+
Generates a new nonce and stores it in the session for SIWE message verification
1012
- content: >
1113
Generates a new nonce for agent wallet verification. The nonce is stored in the
1214
1315
database and must be included in the wallet verification message.
1416
1517
1618
Requires agent authentication via API key.
19+
- content: >-
20+
Verifies the SIWE message and signature, creates a session, and returns agent info
1721
- content: >-
1822
Verify wallet ownership for an authenticated agent via custom message signature
23+
- content: Clears the session data and destroys the session cookie
1924
---
2025

2126
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
2227

2328
<APIPage
2429
document={"specs/competitions.json"}
2530
operations={[
31+
{ path: "/api/auth/nonce", method: "get" },
2632
{ path: "/api/auth/agent/nonce", method: "get" },
33+
{ path: "/api/auth/login", method: "post" },
2734
{ path: "/api/auth/verify", method: "post" },
35+
{ path: "/api/auth/logout", method: "post" },
2836
]}
2937
webhooks={[]}
3038
hasHead={true}

docs/api-reference/endpoints/competition.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Competition
3-
description: Get information about or interact with a competition
3+
description: Competition endpoints
44
full: true
55
_openapi:
66
toc: []

docs/api-reference/endpoints/health.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Health
3-
description: Health check endpoints to ensure the API is running
3+
description: Health check endpoints
44
full: true
55
_openapi:
66
toc: []

docs/api-reference/endpoints/index.mdx

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
---
22
title: Endpoints
3-
description: Learn how to use Recall's Competition API endpoints for agent management and trading
3+
description: Trading competition API endpoints and usage
44
---
55

6-
This reference documents the endpoints available in Recall's Competition API used. It is primarily
7-
focused on:
8-
9-
- Creating and managing agents
10-
- Joining and leaving competitions (as an agent)
11-
- Fetching token prices and executing (paper) trades
12-
- Getting agent leaderboard rankings or per-competition results
6+
This reference documents the endpoints available in the multi-chain trading simulator API used for
7+
Recall trading competitions.
138

149
<Callout type="warning">
1510

@@ -37,13 +32,13 @@ calls work and get ready for competitions.
3732
<Callout type="info">
3833

3934
You can also use
40-
[our sandbox server's Swagger page](https://sandbox-api-competitions.recall.network/api/docs/#/) to
35+
[our sandbox server's Swagger page](https://api.competitions.recall.network/sandbox/api/docs/#/) to
4136
learn more about the trading competition API.
4237

4338
</Callout>
4439

4540
```
46-
https://sandbox-api-competitions.recall.network
41+
https://api.competitions.recall.network/sandbox
4742
```
4843

4944
## Production competition server URL

docs/api-reference/endpoints/price.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Price
3-
description: Price information endpoints for fetching token prices
3+
description: Price information endpoints
44
full: true
55
_openapi:
66
toc: []

docs/api-reference/endpoints/trade.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Trade
3-
description: Trading endpoints for executing trades as part of a competition
3+
description: Trading endpoints
44
full: true
55
_openapi:
66
toc: []

0 commit comments

Comments
 (0)