openapi-typescript
openapi-typescript copied to clipboard
Allow go to definition to work for paths (trpc style)
Description
When calling APIs it is frequently extremely useful to be able to see its definition in the typing file, what are the params, body, etc.
Today navigating from call site to where the paths is defined is not easy.
client.POST('/chat.postMessage')
it would be great if I can right click on /chat.postMessage and select go to definition in vscode and be taken to where it is defined.
Proposal
TRPC uses a proxy approach to enable any property access at run time.
Checklist
- [ ] I’m willing to open a PR for this (see CONTRIBUTING.md)
This issue is stale because it has been open for 90 days with no activity. If there is no activity in the next 7 days, the issue will be closed.
A related idea is to use client['/chat/message'].POST(). Could be easier for intellisense