Replies: 6 comments 4 replies
-
|
The only thing that would convince me to abandon Tricount! |
Beta Was this translation helpful? Give feedback.
-
|
Would be awesome to integrate it with iOS Shortcuts |
Beta Was this translation helpful? Give feedback.
-
|
We could use this maybe? https://github.com/mcampa/trpc-to-openapi |
Beta Was this translation helpful? Give feedback.
-
|
@pvieira84 @idoodler @Egglestron I am working on an integration right now, which would enable a RESTful API together with a new OpenAPI json endpoint and a SwaggerUI page. Once that is done, would you be willing to help with writing description for the existing endpoints? |
Beta Was this translation helpful? Give feedback.
-
|
I would like to further discuss what you would expect from a REST API. Does it have to cover ALL the endpoints or will a subset be enough? I am also not sure how credentials could be handled within NextAuth. I assume something like API keys would be preferred, but I don't see this functionality in the library. The trpc-to-openapi would require extensive refactoring and testing, since it requires full input and output validation, which was sadly not implemented by the original author and it breaks some routes. |
Beta Was this translation helpful? Give feedback.
-
|
Apologies, I just noticed too late now that there was this thread already opened and I opened a separate one. Instead of using somethign like @krokosik was suggesting like trpc-to-openapi , I completely bypased tRPC and asked Claude to write me a brand new Next.js API that routes from scratch. It only covers the specific endpoints I needed (summary, groups, add/delete expense) . It uses the internal BalanceView directly via Prisma. So like that no refactoring was needed, and it works immediately. But yeah it's a parallel API sitting next to the app, not integrated with the existing tRPC layer. I'm aware this is far from a proper implementation , ideally it would use something like trpc-to-openapi to expose the existing tRPC routes as a standard REST API with OpenAPI spec and Swagger UI. But as the maintainer noted, that requires extensive refactoring and full input/output validation across all routes. This was my pragmatic workaround while waiting for that maybe useful as a reference or to unblock people who need something working today. Cheers |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Discussed in #88
Originally posted by pvieira84 August 30, 2024
Any chance an API can be added to the roadmap? I believe it would be helpful and handy for a large group of people
Beta Was this translation helpful? Give feedback.
All reactions