Merged
Conversation
- Installs `hono-openapi` - Updates `validate.ts` to use `validator` from `hono-openapi` - Adds response zod schemas to ensnode-sdk - Adds `describeRoute` to resolution endpoints - Adds `GET /openapi.json` route
🦋 Changeset detectedLatest commit: 95b79ec The changes in this PR will be included in the next version bump. This PR includes changesets to release 15 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
lightwalker-eth
left a comment
There was a problem hiding this comment.
@stevedylandev This looks like an exciting direction to me. Appreciate your advice on next steps 👍
shrugs
approved these changes
Dec 15, 2025
The Hono OpenAPI implementation with Zod produces a JSON schema where `z.undefined()` is [unrepresentable](https://zod.dev/json-schema#unrepresentable). This commit refactors the `NameTokensRequest` type and by consequence update the zod schema to pass. In order for OpenAPI JSON schema to work we cannot have any instances of unrepresentable APIs, and this so far was the only case.
lightwalker-eth
approved these changes
Dec 30, 2025
Member
lightwalker-eth
left a comment
There was a problem hiding this comment.
@stevedylandev Reviewed and shared feedback
lightwalker-eth
approved these changes
Dec 30, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR starts implementation of
hono-openapito complete #1115. Work includes:hono-openapivalidate.tsto usevalidatorfromhono-openapidescribeRouteto resolution endpointsGET /openapi.jsonrouteThe result is an OpenAPI schema that can be fetched from
/openapi.jsonfrom the ENSApi:With the schema we can build new documentation that accepts OpenAPI for automatic API references. At least for the API we can write almost all of the documentation inside the routes themselves. Here is an example:
Note
I don't like escaping characters in the mark up so I will be looking into another way to do this
This results in a docs page like this:
Take a look at the current preview built in a separate repo: https://docs-sepia-eight.vercel.app/docs/getApiResolveRecords
Testing
At the moment there isn't a clear way to make a unit test of the ENSApi
src/index.ts. The following steps can be taken to test/openapi.json:/openapi.jsonTested and validated 2025-12-30T15:04:07.424Z