refine icon indicating copy to clipboard operation
refine copied to clipboard

[FEAT] Codegen with OpenAPI

Open SaadBazaz opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe.

Given an OpenAPI spec, we should be able to codegen pages. We can later tune them for our own efficiency, but at the bare minimum it should easily handle CRUD. Codegen clients are a common practice with good specifications like OpenAPI, AsyncAPI, etcetera.

Obviously this entails writing a nice API backend, but given projects like Swagger, OpenAPI 3.0, Etcetera, this is now a reality.

Describe alternatives you've considered

I may have skimmed over the docs. If there's any remotely possible way I can do this right now, I'd love to know.

I'm currently manually writing the pages (ew!). I'm considering building my own codegen, because a project I'm building has like 20 API routes.

Additional context

Here's a codegen for RTK Query which I frequently use to build API clients: https://redux-toolkit.js.org/rtk-query/usage/code-generation

Describe the thing to improve

I think this is a no-brainer for Refine and can hugely accelerate building admin panels. There should be an official codegen for OpenAPI specs (can take inspiration from RTK Query), or at the bare minimum, an improvement in the documentation for it.

SaadBazaz avatar Feb 12 '24 07:02 SaadBazaz