blomqma / next-rest-framework

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

Add the ability to test in Redoc #79

Closed SaadBazaz closed 1 year ago

blomqma commented 1 year ago

I think the open-source version of Redoc unfortunately does not allow executing queries in the UI. I think this is where SwaggerUI shines, because it also supports that. I'm working on this PR that adds support for both Redoc and SwaggerUI, defaulting to the former one. So this change is the best I can for this this at the moment: https://github.com/blomqma/next-rest-framework/pull/84

mirko314 commented 1 year ago

I also run into this and looked for alternatives. It seems there is a plugin for redoc to add that functionality back in: https://github.com/wll8/redoc-try but I have not yet tried it. Might be worth looking into maybe

blomqma commented 1 year ago

I also run into this and looked for alternatives. It seems there is a plugin for redoc to add that functionality back in: https://github.com/wll8/redoc-try but I have not yet tried it. Might be worth looking into maybe

That plugin seems to render parts of SwaggerUI within the Redoc UI. I would be hesitant towards it since both Redoc and SwaggerUI are now supported in Next REST Framework by default. I think the point of this library is not to provide a better API client or documentation UI than out there in the market, but rather integrate some of the existing popular open source libraries like Redoc or Swagger. Next REST Framework provides the OpenAPI specification that can be used by any API client after all, so I think it's time to close this issue. If there are any other popular open source tools that could do the job better than Redoc, I'm open to discuss whether they should be integrated to Next REST Framework.