Search code examples
apirestgenerated-code

Is there any solution for generating the restfual api code both for client and server


The functions for operating the restful api is quite same. Is there any project that can generate the source code for different platform such android,ios and backend stuff.


Solution

  • I suggest you to use API description languages such Swagger ou RAML.

    After having described your RESTful application with a language like this, you will be able to generate things like server skelekons and client sdks with different technologies and languages. You can even generate documentations.

    With Swagger, swagger-codegen will do that. swagger-ui may also interest you for the documentation part.

    To finish, I would like to mention the Restlet studio that allows to define graphically and quickly the structure of RESTful applications and generate then the corresponding Swagger and RAML contents. The APISpark plaform provides a mecanism to introspect Restlet applications and generate the corresponding contents with these languages. It also allow you to generate a set of server skelekons and client sdks.

    Hope it helps you.