@techreport{TR-IC-PFG-16-20, number = {IC-PFG-16-20}, author = {Andre Vitor {Terron} and Guido {Araujo}}, title = {{REST Client generation using RAML API documentation}}, month = {December}, year = {2016}, institution = {Institute of Computing, University of Campinas}, note = {In English, 17 pages. \par\selectlanguage{english}\textbf{Abstract} In the past few years, mobile devices and apps have become more and more popular. This increased the demand for mobile development in multiple platforms, more than there are developers available. \par A common development pattern used by such projects is to have a central server, and multiple clients in different platforms, like Android, iOS and web. The server exposes an API (Application Program Interface), and the clients send http requests to the API to interact with the business logic of the app. For multiplatform apps, having to implement the API client for every platform can be very time consuming, and the work needed grows with the size of the api, and number of supported platforms. Also, with every refactor of the API, it’s needed to review all other platforms’ clients. \par The first step to improve the client develpment, is to have good documentation and communication between the server developers, and client developers. There are several ways of documenting an API, but the most common frameworks are: RAML, Swagger and API Blueprint. These frameworks are a structured way of documenting an API, but also can be visualized as a more human-readable way, and even be used to generate client code for the applications, saving a lot of time and mistakes for the developer. \par In this project, I built an Android client generator based on the RAML framework. It uses other common patterns in Android, like Dependency Injection with Dagger 2, Promises with Bolts, and the Spring Rest Template for the actual requests. It reads the RAML documentation, and generates Android code to communicate with the API. } }