apioo / fusio

Open source API management platform
https://www.fusio-project.org
Apache License 2.0
1.84k stars 219 forks source link

API spec code generation command #42

Open chriskapp opened 7 years ago

chriskapp commented 7 years ago

At the moment we can import swagger and raml documents through the backend interface. This creates automatically the routes and actions extracted from the swagger specification. It would be great if we had also a command to automatically generate a .fusio.yml deploy file based on a swagger file. Beside the fitting routes we would also automatically create the backend files etc. in the src/ folder. This could help to speed up the process if a user needs to develop an API based on a OAI specification. We should start with the OAI spec but in the end we should support all major formats: Swagger 2.0, Raml 1.0, OAI

colorcube commented 6 years ago

I played a bit with psx and now found fusio. The code generation is something psx can do, right? Does it makes sense to generate the code with psx and move it over to fusio? (with some tweaks of course)

chriskapp commented 6 years ago

Mhh so with PSX you mostly generate complete general code which is not really useful for Fusio. Basically with Fusio you dont need to generate any special code since the only thing which you have to implement is the actual business logic of your API as action. So I think this is not really needed.

With this ticket I would like to build a generator which automatically creates the routes and dummy actions based on a API specification. Basically this means that we generate a .fusio.yml deploy file from such a specification.