OpenAPI Spec Generation
Would it be possible to automatically generate an OpenAPI spec for the application? I think this would be a cool feature if we need to expose developer facing API's.
5 Replies
This is definitely something we're thinking about! Would you want OpenAPI for your HTTP routes (like http.route(...) endpoints) or for all your public queries/mutations/actions?
Check this out for using Hono for http endpoints - if your goal was to get a spec just for http endpoints: https://stack.convex.dev/hono-with-convex
Advanced HTTP Endpoints: Convex ❤️ Hono
Adding advanced HTTP Endpoint functionality by extending Convex with Hono.
I'll check this out. I was thinking something like this: https://github.com/jlalmes/trpc-openapi, so like an option field on a mutation, query, action where I can just enable it
yeah that makes sense - out of curiosity, what clients would you be hitting it from that wouldn't want to use an existing library?
I'd probably use it for our customer facing API's plus maybe our internal admin tools, like retool, I know I can get around this rn w/ the javascript client, but the solution is untyped an OpenAPI spec would almost create a level of type safety at the API level. I'll probably give Hono a try for the meantime, it seems like it could solve my use cases