Skip to content

Commit deb2f4e

Browse files
committed
temp update
1 parent 8979a0d commit deb2f4e

File tree

6 files changed

+99
-80
lines changed

6 files changed

+99
-80
lines changed

apps/developer-hub/content/docs/openapi/(generated)/index.mdx

Lines changed: 0 additions & 67 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Get the list of supported chain ids
3+
full: true
4+
_openapi:
5+
method: GET
6+
route: /v1/chains
7+
toc: []
8+
structuredData:
9+
headings: []
10+
contents:
11+
- content: Get the list of supported chain ids
12+
---
13+
14+
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
15+
16+
Get the list of supported chain ids
17+
18+
<APIPage document={"https://fortuna.dourolabs.app/docs/openapi.json"} operations={[{"path":"/v1/chains","method":"get"}]} webhooks={[]} hasHead={false} />
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: Returns the logs of all requests captured by the keeper.
3+
full: true
4+
_openapi:
5+
method: GET
6+
route: /v1/logs
7+
toc: []
8+
structuredData:
9+
headings: []
10+
contents:
11+
- content: >-
12+
Returns the logs of all requests captured by the keeper.
13+
14+
15+
This endpoint allows you to filter the logs by a specific network ID,
16+
a query string (which can be a transaction hash, sender address, or
17+
sequence number), and a time range.
18+
19+
This is useful for debugging and monitoring the requests made to the
20+
Entropy contracts on various chains.
21+
---
22+
23+
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
24+
25+
Returns the logs of all requests captured by the keeper.
26+
27+
This endpoint allows you to filter the logs by a specific network ID, a query string (which can be a transaction hash, sender address, or sequence number), and a time range.
28+
This is useful for debugging and monitoring the requests made to the Entropy contracts on various chains.
29+
30+
<APIPage document={"https://fortuna.dourolabs.app/docs/openapi.json"} operations={[{"path":"/v1/logs","method":"get"}]} webhooks={[]} hasHead={false} />
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: Reveal the random value for a given sequence number and blockchain.
3+
full: true
4+
_openapi:
5+
method: GET
6+
route: /v1/chains/{chain_id}/revelations/{sequence}
7+
toc: []
8+
structuredData:
9+
headings: []
10+
contents:
11+
- content: >-
12+
Reveal the random value for a given sequence number and blockchain.
13+
14+
15+
Given a sequence number, retrieve the corresponding random value that
16+
this provider has committed to.
17+
18+
This endpoint will not return the random value unless someone has
19+
requested the sequence number on-chain.
20+
21+
22+
Every blockchain supported by this service has a distinct sequence of
23+
random numbers and chain_id.
24+
25+
Callers must pass the appropriate chain_id to ensure they fetch the
26+
correct random number.
27+
---
28+
29+
{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
30+
31+
Reveal the random value for a given sequence number and blockchain.
32+
33+
Given a sequence number, retrieve the corresponding random value that this provider has committed to.
34+
This endpoint will not return the random value unless someone has requested the sequence number on-chain.
35+
36+
Every blockchain supported by this service has a distinct sequence of random numbers and chain_id.
37+
Callers must pass the appropriate chain_id to ensure they fetch the correct random number.
38+
39+
<APIPage document={"https://fortuna.dourolabs.app/docs/openapi.json"} operations={[{"path":"/v1/chains/{chain_id}/revelations/{sequence}","method":"get"}]} webhooks={[]} hasHead={false} />

apps/developer-hub/scripts/generate-docs.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ import { generateFiles } from "fumadocs-openapi";
22

33
import { openapi } from "../src/lib/openapi";
44

5-
// const schemas = await openapi.getSchemas();
5+
const outDir = "./content/docs/openapi/operation/route";
66

7-
// const fortunaSchema = schemas[fortunaOpenApiUrl];
8-
// const fortunaStagingSchema = schemas[fortunaStagingOpenApiUrl];
7+
export async function generateDocs() {
8+
await generateFiles({
9+
input: openapi,
10+
output: outDir,
11+
per: 'operation',
12+
includeDescription: true,
13+
});
14+
}
915

10-
void generateFiles({
11-
input: openapi,
12-
output: "./content/docs/openapi/(generated)",
13-
per: "file",
14-
includeDescription: true,
15-
});
16+
await generateDocs();
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import { createOpenAPI } from "fumadocs-openapi/server";
22

3-
export const fortunaOpenApiUrl =
3+
export const fortunaOpenApiJson =
44
"https://fortuna.dourolabs.app/docs/openapi.json";
5-
export const fortunaStagingOpenApiUrl =
6-
"https://fortuna-staging.dourolabs.app/docs/openapi.json";
75

86
export const openapi = createOpenAPI({
9-
input: [fortunaOpenApiUrl, fortunaStagingOpenApiUrl],
7+
input: [fortunaOpenApiJson],
108
});

0 commit comments

Comments
 (0)