Closed abonifacio closed 3 years ago
👷 Deploy request for restful-react accepted.
🔨 Explore the source changes: 049ac1aa27611252be47756f1191e307bbccc41f
🔍 Inspect the deploy log: https://app.netlify.com/sites/restful-react/deploys/60f06742aa46980007e48fa9
@abonifacio We use this library in many places without react (e.g. in many nodejs services). Have you seen the skipReact
option in the config? https://github.com/contiamo/restful-react#only-generating-custom-code-no-react-hookscomponents . If you don't specify a custom generator, it will only output types.
@micha-f yeah totally! I'm using skipReact
and everything works beautifully. I was just thinking that maybe if you split the library
You are right, the name does not communicate very well that this project can do quite a bit more these days. It started out as a project to make interacting with REST APIs from react more comfortable. Then @fabien0102 got to work and added all of this awesome OpenAPI stuff 🤷 . As it powers almost every service / UI we put into production it should be pretty well-tested and capable by now. @fabien0102 certainly had the ambition to make this the best library to generate types from specs 🙂 .
Not sure we can change the project structure without much effort at this point though. Let's see what @fabien0102 thinks.
In the meantime - this PR looks good 👍 .
Why
Given the following spec
I would like the type to be generated as
Additional question: I don't use React but this is the best library I found to generate type from OpenAPI specs, is there a plan to split this library into type generation & react related stuff?