## 2 RestRho: Building REST APIs Based on JSON-DSL
### A Look at DSL-Based Solutions to Specify RESTful APIs  
The use of DSLs to specify and define API RESTful is growing due to the advantages they offer in comparison with traditional approaches for developing code [27]. These advantages include higher productivity, greater accuracy, and better documentation. RAML RESTful API Modeling Language, Salesforce, Inc. (OpenAI, The Linux Foundation(r), [[https://raml.org/](https://raml.org/)]([https://raml.org/](https://raml.org/)) (accessed on 2 June 2025)) is a modeling language for describing REST API services using the YAML and JSON standards. RAML is open source and was created under the design-first development paradigm [28]. Multiple specifications are required for different tools, including development and quality control. It has tools for online modeling, but support is poor for newer versions. Additionally, code reuse and extension are limited in this model [28]. Swagger (SmartBear Software, [[https://swagger.io/](https://swagger.io/)]([https://swagger.io/](https://swagger.io/)) (accessed on 4 June 2025)) was created as a specification and a set of tools for describing, producing, consuming, and visualizing RESTful web services. In 2015, it was renamed as the OpenAPI (OpenAI, The Linux Foundation(r), [[https://www.openapis.org/](https://www.openapis.org/)]([https://www.openapis.org/](https://www.openapis.org/)) (accessed on 15 June 2025)) specification [29], essentially the evolution of Swagger that supports both JSON and YAML formats. Like RAML, OpenAPI requires separate specifications for various tools such as development and quality control tools, and it does not support code reuse, inclusion, or extension. WADL (Web Application Description Language, Sun Microsystems, [[https://www.w3.org/submissions/wadl/](https://www.w3.org/submissions/wadl/)]([https://www.w3.org/submissions/wadl/](https://www.w3.org/submissions/wadl/)) (accessed on 12 February 2025)) is an XML description language readable by web application engines over HTTP, such as REST web services. Creating descriptions with WADL is time-consuming, and the binding methodology is more difficult than RAML, Swagger, and OpenAPI [28]. (API BluePrint API Blueprint, [[https://apiblueprint.org/](https://apiblueprint.org/)]([https://apiblueprint.org/](https://apiblueprint.org/)) (accessed on 14 February 2025)) is another YAML-based language that focuses on the documentation aspect of APIs. It is a set of semantic assumptions that is laid on top of the Markdown syntax used to describe a web API. In addition to the mentioned tools, there are other alternatives, including Slate, GraphQL SDL, Protocol Buffers, Kotlin DSL, API Transformers, Restlet Studio, Apiary, Stoplight studio, Apigee Edge API Designer, Mulesoft Anypoint Platform, Oracle API Platform, and 3 scale API Designer. Table 1 compares the four DSLs most used for specifying and defining RESTful API, namely: RAML, Swagger/OpenAPI, WADL, and API Blueprint [30]. All tools allow the definition and/or specification of DSLs and built-in documentation. However, OpenAPI's documentation goes beyond what is provided on its website due to its widespread use. In terms of tool availability, all of them provide an Online IDE for DSL definition; however, only RAML and Swagger/OpenAPI support online API modeling. All tools provide extension and customization facilities as well as integration with external tools. None of these tools offer the use of a template engine natively for the transformation of operation results. It is worth noting that most tools are based on textual or XML DSLs. OpenAPI is the only tool that can use JSON grammar for defining its RESTful API operations. Our case study, RestRho, is based on two JSON-DSLs with reusability and modularity capabilities, facilitating the transformation of JSON operation results and allowing the use of template engines natively (as part of the language).