Abstract
The current paper presents a novel Command Line Interface (CLI) tool called ExpressO. This tool is specifically developed for developers who seek to analyze Web APIs implemented using the Express.js framework. ExpressO can automatically extract a specification written in OpenAPI, which is a widely used interface description language. The extracted specification consists of all the implemented endpoints, response status codes, and path and query parameters. Additionally, apart from facilitating automatic documentation generation for the API, ExpressO can also automatically verify the conformity of the Web API interface to its implementation, based on the Express.js framework.
The tool has been released on the npm component registry as ‘expresso-api’, and can be globally installed using the command:
npm install -g expresso-api.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
OpenAPI Initiative. https://www.openapis.org/
RAML. https://raml.org/
OpenAPI.Tools. https://openapi.tools/
Beaulieu, N., Dascalu, S.M., Hand, E.: API-first design: a survey of the state of academia and industry. In: Latifi, S. (ed.) 19th International Conference on Information Technology-New Generations, ITNG 2022. AISC, vol. 1421, pp. 73–79. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-97652-1_10
Cao, H., Falleri, J.-R., Blanc, X.: Automated generation of REST API specification from plain HTML documentation. In: Maximilien, M., Vallecillo, A., Wang, J., Oriol, M. (eds.) ICSOC 2017. LNCS, vol. 10601, pp. 453–461. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-69035-3_32
Christensen, E.: Web services description language (wsdl) 1.1. https://www.w3.org/TR/2001/NOTE-wsdl-20010315 (2001)
Corradini, D., Zampieri, A., Pasqua, M., Ceccato, M.: Restats: a test coverage tool for restful APIS. In: 2021 IEEE International Conference on Software Maintenance and Evolution (ICSME), pp. 594–598. IEEE (2021)
Di Lauro, F., Serbout, S., Pautasso, C.: Towards large-scale empirical assessment of web APIs evolution. In: Brambilla, M., Chbeir, R., Frasincar, F., Manolescu, I. (eds.) ICWE 2021. LNCS, vol. 12706, pp. 124–138. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-74296-6_10
Fowler, M.: Domain-Specific Languages. Pearson Education, London (2010)
GitHub-Repository: Openapi diff. https://github.com/tufin/oasdiff
GitHub-repository: Openapi diff by microsoft azure. https://github.com/Azure/openapi-diff
Hadley, M.J.: Web application description language (wadl). Technical Report, USA (2006)
Hasselbring, W.: Software Architecture: Past, Present, Future. In: The Essence of Software Engineering, pp. 169–184. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-73897-0_10
Initiative, O.: Oas v3.0 petstore example. https://github.com/OAI/OpenAPI-Specification/blob/main/examples/v3.0/petstore.json
Initiative, O.: Openapi v3.1.0 specification. https://spec.openapis.org/oas/v3.1.0
Jongeling, R., Fredriksson, J., Ciccozzi, F., Cicchetti, A., Carlson, J.: Towards consistency checking between a system model and its implementation. In: Babur, Ö., Denil, J., Vogel-Heuser, B. (eds.) ICSMM 2020. CCIS, vol. 1262, pp. 30–39. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-58167-1_3
Karlsson, S., Čaušević, A., Sundmark, D.: Quickrest: property-based test generation of openapi-described restful APIS. In: 2020 IEEE 13th International Conference on Software Testing, Validation and Verification (ICST), pp. 131–141. IEEE (2020)
Koren, I., Klamma, R.: The exploitation of OpenAPI documentation for the generation of web frontends. In: Companion of the The Web Conference 2018 on The Web Conference 2018 - WWW 2018, pp. 781–787 (2018)
Robillard, M.P.: What makes APIS hard to learn? answers from developers. IEEE Softw. 26(6), 27–34 (2009)
Romanelli, A.: ExpressO. Master’s thesis, Faculty of Informatics, University of Lugano (2022). https://thesis.bul.sbu.usi.ch/theses/2035-2122Romanelli/pdf?1674133800
Serbout, S., Di Lauro, F., Pautasso, C.: Web APIS structures and data models analysis. In: 2022 IEEE 19th International Conference on Software Architecture Companion (ICSA-C), pp. 84–91. IEEE (2022)
Spencer, J.: Express openapi. https://github.com/kogosoftwarellc/open-api
Theunissen, T., van Heesch, U., Avgeriou, P.: A mapping study on documentation in continuous software development. Inf. Softw. Technol. 142, 106733 (2022)
TJ Holowaychuk, S., et al.: Express.js documentation. https://expressjs.com/en/5x/api.html
Van Heesch, U., Theunissen, T., Zimmermann, O., Zdun, U.: Software specification and documentation in continuous software development: a focus group report. In: Proceedings of the 22nd European Conference on Pattern Languages of Programs, pp. 1–13 (2017)
Acknowledgements
This work was partially supported by the SNF with the API-ACE project number 184692.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Serbout, S., Romanelli, A., Pautasso, C. (2023). ExpressO: From Express.js Implementation Code to OpenAPI Interface Descriptions. In: Batista, T., Bureš, T., Raibulet, C., Muccini, H. (eds) Software Architecture. ECSA 2022 Tracks and Workshops. ECSA 2022. Lecture Notes in Computer Science, vol 13928. Springer, Cham. https://doi.org/10.1007/978-3-031-36889-9_4
Download citation
DOI: https://doi.org/10.1007/978-3-031-36889-9_4
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-36888-2
Online ISBN: 978-3-031-36889-9
eBook Packages: Computer ScienceComputer Science (R0)