blomqma / next-rest-framework

Type-safe, self-documenting APIs for Next.js
https://next-rest-framework.vercel.app
Other
134 stars 17 forks source link

Expose JavaScript API for generating OpenAPI schema #160

Closed austinkelleher closed 3 months ago

austinkelleher commented 4 months ago

Fixes #159

I created individual commits that express the changes more cleanly.

vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-rest-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 13, 2024 6:30pm
next-rest-framework-demo ❌ Failed (Inspect) Apr 13, 2024 6:30pm
austinkelleher commented 4 months ago

I'm realizing now that this doesn't quite work the way that I'd like when the module is actually published. The generate module is not at the root (only available at next-rest-framework/dist/generate). Any thoughts? I want to be sure that we are happy with the proposed JS API strategy before spending time on build tooling. 😬

blomqma commented 4 months ago

Thanks for looking into this, I posted a more detailed answer here, but I have a slightly different approach to this fix in https://github.com/blomqma/next-rest-framework/pull/161. I have also included your changes on the example application on that PR and set you as the co-author so you can expect those changes along with the fix for the ESBuild issues to be published soon.