Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rpc): infer path with route() and basePath() #1401

Merged
merged 2 commits into from
Sep 3, 2023

Conversation

yusukebe
Copy link
Member

@yusukebe yusukebe commented Sep 3, 2023

This PR will make the RPC-mode infers the path type correctly, with app.basePath() and app.route():

const book = new Hono().post('/create', (c) => c.jsonT('test root'))
const api = new Hono().basePath('/v1').route('/book', book)

Will be handled as:

const res = await client.v1.book.create.$post()
// ...

Author should do the followings, if applicable

  • Add tests
  • Run tests
  • yarn denoify to generate files for Deno

@yusukebe yusukebe merged commit d194e9b into main Sep 3, 2023
@yusukebe yusukebe deleted the fix/rpc-infer-path-route-basepath branch September 3, 2023 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant