Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
237de51
poc
notrab Jan 19, 2026
9045cc6
dummy preview page
notrab Jan 19, 2026
cc5f236
fix new line
notrab Jan 19, 2026
ddc8bf6
fmt new spec
notrab Jan 19, 2026
9da0a88
update readme for docs site
notrab Jan 20, 2026
3ae1447
Apply suggestions from code review
notrab Jan 20, 2026
61b4438
move generator file
notrab Jan 20, 2026
06c49c5
remove local dev env arg
notrab Jan 20, 2026
66e4b1e
update ci check
notrab Jan 20, 2026
30dff75
lint
notrab Jan 20, 2026
67ff063
fix frozen lock
notrab Jan 20, 2026
c75e78f
lint spec
notrab Jan 20, 2026
aaf1a73
update readme
notrab Jan 20, 2026
80f06e0
add colored diff
notrab Jan 21, 2026
630309f
test diff
notrab Jan 21, 2026
ab5927b
lint
notrab Jan 21, 2026
fa0119d
revert
notrab Jan 21, 2026
bdca6ea
readme
notrab Jan 21, 2026
fac4754
deploy switch
notrab Jan 21, 2026
1973ef6
run the openapi-check
notrab Jan 23, 2026
911bc3c
add changeset
notrab Jan 23, 2026
f1dd11d
continue-on-error
notrab Jan 23, 2026
b1cea1a
update readme structure
notrab Jan 23, 2026
323e565
Merge branch 'main' into openapi-spec-generator
notrab Jan 23, 2026
98bece8
update spec
notrab Jan 23, 2026
f493d51
announce mintlify errors in slack
notrab Jan 25, 2026
3945545
retry on transient errors
notrab Jan 25, 2026
a16f9eb
rename environment variable
notrab Jan 25, 2026
7ad6563
update wording
notrab Jan 25, 2026
91dfe3c
make right config types
notrab Jan 25, 2026
600294a
remove mintlify comment
notrab Jan 25, 2026
21b72af
update readme variable secret comment
notrab Jan 25, 2026
bba27af
add node types
notrab Jan 25, 2026
692a119
update preview text
notrab Jan 25, 2026
b640ca9
rename types
notrab Jan 25, 2026
16a641f
update mintlify deploy failed comment
notrab Jan 25, 2026
87c5180
replace mock databaseurl for openapi generation
notrab Jan 25, 2026
ac91cff
check server readiness
notrab Jan 25, 2026
4e11eb8
update openapi.json
notrab Jan 25, 2026
8ac20f5
update docs
notrab Jan 25, 2026
83ae0ba
apply coderabbit suggestion
notrab Jan 25, 2026
f7d7031
Merge branch 'main' into openapi-spec-generator
notrab Jan 28, 2026
0d1d1d5
revert to simpler times
notrab Jan 28, 2026
367c991
tidy
notrab Jan 28, 2026
ffb49ae
EnsApiConfigInput
notrab Jan 28, 2026
1a94122
add openapi mock config
notrab Jan 28, 2026
5d7e8ee
apply coderabbit suggestions
notrab Feb 1, 2026
e59fb6f
Merge branch 'main' into openapi-spec-generator
notrab Feb 1, 2026
4037d9f
update openapi.json
notrab Feb 1, 2026
9d1bf2a
update openapi.json
notrab Feb 1, 2026
5cade8d
update readme
notrab Feb 1, 2026
5965d3f
timeout check
notrab Feb 1, 2026
f287094
print parse error
notrab Feb 1, 2026
42a19d0
add docstring for openapi-generator
notrab Feb 1, 2026
731b4fe
Update docs/docs.ensnode.io/scripts/generate-openapi.ts
notrab Feb 1, 2026
690b155
Update .github/workflows/test_ci.yml
notrab Feb 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/test_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,31 @@
- uses: ./.github/actions/setup_node_environment
- run: pnpm test

openapi-sync-check:
name: "OpenAPI Spec Sync Check"
runs-on: blacksmith-4vcpu-ubuntu-2204
Copy link

@coderabbitai coderabbitai bot Feb 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Verify the runner label is registered for this workflow.

Actionlint flags blacksmith-4vcpu-ubuntu-2204 as unknown. If this is a custom self‑hosted label, add it to actionlint config; otherwise switch to a GitHub‑hosted label to avoid CI lint failures.

🧰 Tools
🪛 actionlint (1.7.10)

[error] 53-53: label "blacksmith-4vcpu-ubuntu-2204" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xlarge", "macos-14-large", "macos-14", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

🤖 Prompt for AI Agents
In @.github/workflows/test_ci.yml at line 53, The workflow uses a runner label
"blacksmith-4vcpu-ubuntu-2204" (seen in the runs-on entry) that actionlint flags
as unknown; either register this custom self-hosted label in your actionlint
configuration (add "blacksmith-4vcpu-ubuntu-2204" to the allowed runners list)
or change the runs-on value to a supported GitHub-hosted runner (e.g.,
ubuntu-22.04) to resolve the lint error. Ensure the change is applied where
runs-on: blacksmith-4vcpu-ubuntu-2204 is defined and update actionlint config if
you opt to keep the custom label.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use blacksmith-4vcpu-ubuntu-2204 in other workflows, so not going to change anything here unless required.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@notrab, understood! Since this is a custom runner used consistently across your workflows, you can optionally suppress this actionlint warning by adding the runner label to your actionlint configuration file (typically .github/actionlint.yaml or .github/actionlint.yml):

self-hosted-runner:
  labels:
    - blacksmith-4vcpu-ubuntu-2204

This will silence the lint error while keeping your custom runner setup intact.


✏️ Learnings added
Learnt from: notrab
Repo: namehash/ensnode PR: 1550
File: .github/workflows/test_ci.yml:53-53
Timestamp: 2026-02-01T08:38:57.307Z
Learning: The project uses custom Blacksmith runners (blacksmith-4vcpu-ubuntu-2204) across workflows; this is an intentional self-hosted runner choice and should not be flagged as an issue.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

# Only run on main branch - PRs may intentionally have different specs
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_node_environment

- name: Generate OpenAPI spec from production
run: pnpm --filter ensapi openapi:generate

- name: Verify OpenAPI spec matches production
run: |
if git diff --exit-code docs/docs.ensnode.io/openapi.json; then
echo "✅ OpenAPI spec is in sync with production"
else
echo "❌ OpenAPI spec is out of sync with production"
echo ""
echo "The committed openapi.json differs from the production API."
echo "Run 'pnpm --filter ensapi openapi:generate' and commit the changes."
exit 1
fi

integrity-check:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium test

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
name: "Integrity Check"
runs-on: blacksmith-4vcpu-ubuntu-2204
services:
Expand Down
3 changes: 2 additions & 1 deletion apps/ensapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"test": "vitest",
"lint": "biome check --write .",
"lint:ci": "biome ci",
"typecheck": "tsc --noEmit"
"typecheck": "tsc --noEmit",
"openapi:generate": "tsx scripts/generate-openapi.ts"
},
"dependencies": {
"@ensdomains/ensjs": "^4.0.2",
Expand Down
50 changes: 50 additions & 0 deletions apps/ensapi/scripts/generate-openapi.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/usr/bin/env tsx

/**
* Generate OpenAPI spec from a running ENSApi instance.
*
* Usage:
* pnpm openapi:generate
* pnpm openapi:generate http://localhost:3223
* ENSAPI_URL=http://localhost:3223 pnpm openapi:generate
*
* Output:
* Writes openapi.json to the docs directory for Mintilify
*/

import { writeFileSync } from "node:fs";
import { resolve } from "node:path";

const DEFAULT_ENSAPI_URL = "https://api.alpha.ensnode.io";
const OUTPUT_PATH = resolve(import.meta.dirname, "../../../docs/docs.ensnode.io/openapi.json");

async function main() {
// Get URL from argument or environment variable
const ensapiUrl = process.argv[2] || process.env.ENSAPI_URL || DEFAULT_ENSAPI_URL;
const openapiUrl = `${ensapiUrl}/openapi.json`;

console.log(`Fetching OpenAPI spec from: ${openapiUrl}`);

const response = await fetch(openapiUrl);

if (!response.ok) {
console.error(`Failed to fetch OpenAPI spec: ${response.status} ${response.statusText}`);
process.exit(1);
}

const spec = await response.json();

// Pretty-print the JSON for readability in git diffs
const content = JSON.stringify(spec, null, 2);

writeFileSync(OUTPUT_PATH, content, "utf-8");

console.log(`OpenAPI spec written to: ${OUTPUT_PATH}`);
console.log(`Spec version: ${spec.info?.version}`);
console.log(`Paths: ${Object.keys(spec.paths || {}).length}`);
}

main().catch((error) => {
console.error("Error generating OpenAPI spec:", error);
process.exit(1);
});
8 changes: 7 additions & 1 deletion docs/docs.ensnode.io/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@
},
{
"group": "API Reference",
"openapi": "https://gist.githubusercontent.com/notrab/94b637e77468cbddd895d7933ce88f64/raw/12cb5ed183558a9bdda5d1c7004db6c794dbd13e/green-ensnode-openapi.json"
"openapi": "https://api.alpha.ensnode.io/openapi.json"
},
{
"group": "Preview",
"pages": ["ensapi/preview"],
"openapi": "./openapi.json",
"hidden": true
}
]
}
Expand Down
Loading
Loading