Skip to content

Commit 396393d

Browse files
committed
chore(dev-hub) Open API support
1 parent d6065f0 commit 396393d

File tree

6 files changed

+61
-92
lines changed

6 files changed

+61
-92
lines changed

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

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

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

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

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

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

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ import { generateFiles } from 'fumadocs-openapi';
88
// const fortunaStagingSchema = schemas[fortunaStagingOpenApiUrl];
99

1010
void generateFiles({
11-
per: 'operation',
12-
groupBy: 'route',
1311
input: openapi,
1412
output: './content/docs/openapi/(generated)',
13+
per: 'file',
1514
includeDescription: true,
16-
addGeneratedComment: true,
1715
});

apps/developer-hub/src/lib/get-llm-text.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ const processor = remark()
1515

1616
export async function getLLMText(page: InferPageType<typeof source>) {
1717
const processed = await processor.process({
18-
path: page.file.path,
19-
value: await fs.readFile(page.file.path, 'utf8'),
18+
path: page.path,
19+
value: await fs.readFile(page.path, 'utf8'),
2020
});
2121

2222
// note: it doesn't escape frontmatter, it's up to you.

0 commit comments

Comments
 (0)