Skip to content

Commit ad7ad37

Browse files
committed
new index page
1 parent c384db1 commit ad7ad37

24 files changed

+331
-316
lines changed

apps/developer-hub/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,12 @@ The API reference documentation is automatically generated from OpenAPI specific
129129
The script performs the following steps:
130130

131131
1. **File Generation**: Uses `fumadocs-openapi` to convert OpenAPI specs into MDX files
132+
132133
- Each API endpoint becomes a separate MDX file
133134
- Files are organized by product (e.g., `pyth-core`, `entropy`) and service (e.g., `hermes`, `fortuna`)
134135

135136
2. **Meta File Generation**: Creates `meta.json` files for navigation
137+
136138
- Root `meta.json` for the API reference section
137139
- Product-level `meta.json` files (e.g., `pyth-core/meta.json`)
138140
- Service-level `meta.json` files (e.g., `pyth-core/hermes/meta.json`)
@@ -158,6 +160,7 @@ pnpm generate:docs
158160
```
159161

160162
This will:
163+
161164
- Fetch OpenAPI specs from the configured URLs
162165
- Generate MDX files in `content/docs/api-reference/`
163166
- Create/update all `meta.json` navigation files
@@ -179,6 +182,7 @@ export const products = {
179182
```
180183

181184
After adding a new service:
185+
182186
1. Run `pnpm generate:docs` to generate the documentation
183187
2. The new service will appear in the API reference navigation
184188

apps/developer-hub/content/docs/api-reference/entropy/fortuna/chain_ids.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,9 @@ _openapi:
1414

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

17-
<APIPage document={"https://fortuna-staging.dourolabs.app/docs/openapi.json"} operations={[{"path":"/v1/chains","method":"get"}]} webhooks={[]} hasHead={false} />
17+
<APIPage
18+
document={"https://fortuna-staging.dourolabs.app/docs/openapi.json"}
19+
operations={[{ path: "/v1/chains", method: "get" }]}
20+
webhooks={[]}
21+
hasHead={false}
22+
/>

apps/developer-hub/content/docs/api-reference/entropy/fortuna/explorer.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,9 @@ _openapi:
3232

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

35-
<APIPage document={"https://fortuna-staging.dourolabs.app/docs/openapi.json"} operations={[{"path":"/v1/logs","method":"get"}]} webhooks={[]} hasHead={false} />
35+
<APIPage
36+
document={"https://fortuna-staging.dourolabs.app/docs/openapi.json"}
37+
operations={[{ path: "/v1/logs", method: "get" }]}
38+
webhooks={[]}
39+
hasHead={false}
40+
/>

apps/developer-hub/content/docs/api-reference/entropy/fortuna/index.mdx

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,23 @@
22
title: Overview
33
---
44

5-
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
6-
75
<APICards>
8-
<APICard href="/api-reference/entropy/fortuna/chain_ids" title="/v1/chains" method="GET" description="Get the list of supported chain ids" />
9-
<APICard href="/api-reference/entropy/fortuna/revelation" title="/v1/chains/{chain_id}/revelations/{sequence}" method="GET" description="Reveal the random value for a given sequence number and blockchain." />
10-
<APICard href="/api-reference/entropy/fortuna/explorer" title="/v1/logs" method="GET" description="Returns the logs of all requests captured by the keeper." />
6+
<APICard
7+
href="/api-reference/entropy/fortuna/chain_ids"
8+
title="/v1/chains"
9+
method="GET"
10+
description="Get the list of supported chain ids"
11+
/>
12+
<APICard
13+
href="/api-reference/entropy/fortuna/revelation"
14+
title="/v1/chains/{chain_id}/revelations/{sequence}"
15+
method="GET"
16+
description="Reveal the random value for a given sequence number and blockchain."
17+
/>
18+
<APICard
19+
href="/api-reference/entropy/fortuna/explorer"
20+
title="/v1/logs"
21+
method="GET"
22+
description="Returns the logs of all requests captured by the keeper."
23+
/>
1124
</APICards>
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
{
22
"title": "Fortuna",
3-
"pages": [
4-
"index",
5-
"chain_ids",
6-
"revelation",
7-
"explorer"
8-
]
3+
"pages": ["index", "chain_ids", "revelation", "explorer"]
94
}

apps/developer-hub/content/docs/api-reference/entropy/fortuna/revelation.mdx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,11 @@ _openapi:
4444

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

47-
<APIPage document={"https://fortuna-staging.dourolabs.app/docs/openapi.json"} operations={[{"path":"/v1/chains/{chain_id}/revelations/{sequence}","method":"get"}]} webhooks={[]} hasHead={false} />
47+
<APIPage
48+
document={"https://fortuna-staging.dourolabs.app/docs/openapi.json"}
49+
operations={[
50+
{ path: "/v1/chains/{chain_id}/revelations/{sequence}", method: "get" },
51+
]}
52+
webhooks={[]}
53+
hasHead={false}
54+
/>
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
22
"title": "Entropy",
3-
"pages": [
4-
"fortuna"
5-
]
3+
"pages": ["fortuna"]
64
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: API Reference
3+
description: Complete API reference for Pyth Network services
4+
---
5+
6+
import { IntegrationCard } from "../../../src/components/IntegrationCard";
7+
import { DiceSix, Database } from "@phosphor-icons/react/dist/ssr";
8+
9+
Welcome to the Pyth Network API Reference. Explore REST APIs for our core services.
10+
11+
## Entropy
12+
13+
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
14+
<IntegrationCard
15+
href="/api-reference/entropy/fortuna"
16+
title="Fortuna"
17+
description="Random number generation API with callback support"
18+
icon={<DiceSix size={16} />}
19+
colorScheme="green"
20+
/>
21+
</div>
22+
23+
## Pyth Core
24+
25+
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
26+
<IntegrationCard
27+
href="/api-reference/pyth-core/hermes"
28+
title="Hermes"
29+
description="REST API for accessing price feeds and updates"
30+
icon={<Database size={16} />}
31+
colorScheme="blue"
32+
/>
33+
</div>

apps/developer-hub/content/docs/api-reference/meta.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,5 @@
22
"root": true,
33
"title": "API Reference",
44
"icon": "Code",
5-
"pages": [
6-
"entropy",
7-
"pyth-core"
8-
]
5+
"pages": ["entropy", "pyth-core"]
96
}

apps/developer-hub/content/docs/api-reference/pyth-core/hermes/get_price_feed.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,9 @@ _openapi:
3030

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

33-
<APIPage document={"https://hermes.pyth.network/docs/openapi.json"} operations={[{"path":"/api/get_price_feed","method":"get"}]} webhooks={[]} hasHead={false} />
33+
<APIPage
34+
document={"https://hermes.pyth.network/docs/openapi.json"}
35+
operations={[{ path: "/api/get_price_feed", method: "get" }]}
36+
webhooks={[]}
37+
hasHead={false}
38+
/>

0 commit comments

Comments
 (0)