Abstract
Lots of software companies rely on web technologies to test market hypotheses in order to develop viable businesses. They often need to quickly build web services that are at the core of their Minimum Viable Products (MVPs). MVPs must be reliable whereas they are based on specifications and hypotheses that are likely to change. Web services need to be well documented, to make it easy to develop applications that consume them. Model Driven Engineering approaches have been proposed and used to develop and evolve web services on one hand, and document them on the other hand. However, these approaches lack the ability to be suitable for both (i) rapid prototyping, (ii) model verification, (iii) compatibility with common programming languages and (iv) alignment between documentation and implementation. Here we propose a meta-model to express web services, the related tool to verify models consistency and an integration of this approach into the OpenAPI Specification. We adopt a shallow verification process to allow rapid prototyping by developers who are not formal methods experts, while still offering design-time guarantees that improve product quality and development efficiency. Web services are defined using parametric components which enable to express and formally verify web service patterns and to safely reuse them in other contexts. We built a tool to check consistency of extended OpenAPI 3.0 models and associated components implementations in order to generate corresponding web services. This allows us to give flexibility and verification support to developers, even in the context of an incremental development, as illustrated by a case study.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
The unstable version 3.0.0-rc0 does support OpenAPI 3.0 but is not yet finished and handle only a few languages and frameworks.
- 7.
- 8.
- 9.
is equivalent to .
- 10.
In the path.
- 11.
Their paths are and .
- 12.
In the x-swsg-ci property of the service.
- 13.
In a x-swsg-name property.
- 14.
The PHP class in Listing 6 depends on the Component interface and on the Ctx and Params classes. They are defined in code output by the code generator and are just implementation details of the SWSG specification in this specific code generator. Different code generators could require different constraints on implementations of atomic components.
- 15.
References
Open API Initiative: OpenAPI Specification (2017). https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md
RAML Workgroup: RAML (2016). https://raml.org/
DeRemer, F., Kron, H.: Programming-in-the large versus programming-in-the-small. In: ACM SIGPLAN Notices, vol. 10, pp. 114–121. ACM (1975)
Bernardi, M.L., Cimitile, M., Di Lucca, G., Maria Maggi, F.: M3D: a tool for the model driven development of web applications. In: Proceedings of the Twelfth International Workshop on Web Information and Data Management, pp. 73–80 (2012)
Rocheteau, J., Sferruzza, D.: Reifier: Model-Driven Engineering of Component-Based and Service-Oriented JEE Applications (2016)
Scheidgen, M., Efftinge, S., Marticke, F.: Metamodeling vs metaprogramming: a case study on developing client libraries for REST APIs. In: Wąsowski, A., Lönn, H. (eds.) ECMFA 2016. LNCS, vol. 9764, pp. 205–216. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-42061-5_13
Sferruzza, D.: Safe Web Services Generator (2017). https://gitlab.startup-palace.com/research/swsg
Sferruzza, D., Rocheteau, J., Attiogbé, C., Lanoix, A.: A Model-Driven Method for Fast Building Consistent Web Services in Practice (2018)
Bernardi, M.L., Cimitile, M., Maggi, F.M.: Automated development of constraint-driven web applications. In: Proceedings of the 31st Annual ACM Symposium on Applied Computing, pp. 1196–1203. ACM (2016)
Fu, X., Bultan, T., Su, J.: Analysis of interacting BPEL web services. In: Proceedings of the 13th International World Wide Web Conference. Citeseer (2004)
Gronmo, R., Skogan, D., Solheim, I., Oldevik, J.: Model-driven web services development. In: e-Technology, e-Commerce and e-Service, pp. 42–45. IEEE (2004)
van der Aalst, W.M.P., Pesic, M., Schonenberg, H.: Declarative workflows: balancing between flexibility and support. Comp. Sci. Res. Dev. 23, 99–113 (2009)
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
Cremaschi, M., De Paoli, F.: Toward automatic semantic API descriptions to support services composition. In: De Paoli, F., Schulte, S., Broch Johnsen, E. (eds.) ESOCC 2017. LNCS, vol. 10465, pp. 159–167. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-67262-5_12
Tsouroplis, R., Petychakis, M., Alvertis, I., Biliri, E., Askounis, D.: Community-based API builder to manage APIs and their connections with Cloud-based Services. In: CAiSE Forum, pp. 17–23 (2015)
Schwichtenberg, S., Gerth, C., Engels, G.: From open API to semantic specifications and code adapters. In: 2017 IEEE International Conference on Web Services (ICWS), pp. 484–491. IEEE (2017)
Willighagen, E., Mélius, J.: Automatic OpenAPI to Bio.tools Conversion (2017)
Pugaczewski, J., Cummings, T., Hunter, D., Michalik, B.: Software engineering methodology for development of APIs for network management using the MEF LSO framework. IEEE Commun. Stand. Mag. 1(1), 92–96 (2017)
SmartBear Software: Swagger Code Generator (2018). https://github.com/swagger-api/swagger-codegen/
Wadler, P.: The essence of functional programming. In: Proceedings of the 19th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 1–14. ACM (1992)
SmartBear Software: Swagger Editor (2018). https://github.com/swagger-api/swagger-editor
SmartBear Software: Swagger UI (2018). https://github.com/swagger-api/swagger-UI
Apiary: Dredd (2017). https://github.com/apiaryio/dredd
van der Lee, M.: PHPSwaggerGen (2017). https://github.com/vanderlee/PHPSwaggerGen
Open API Initiative: The Petstore Example (2017). https://github.com/OAI/OpenAPI-Specification/blob/3.0.1/examples/v3.0/petstore-expanded.yaml
Lopes, P., Guardiani, F.: Slush-vertx (2017). https://github.com/pmlopes/slush-vertx
Sferruzza, D.: Specification of SWSG extensions for OpenAPI (2018). https://gitlab.startup-palace.com/research/swsg/tree/master/openapi-extensions-specification/1.0.0.md
Internet Engineering Task Force: JSON Schema: A Media Type for Describing JSON Documents (2016). https://tools.ietf.org/html/draft-wright-json-schema-00
The PHP Group: PHP (2016). https://php.net/
Otwel, T.: Laravel (2016). https://laravel.com/
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
Sferruzza, D., Rocheteau, J., Attiogbé, C., Lanoix, A. (2019). A Model-Driven Method for Fast Building Consistent Web Services from OpenAPI-Compatible Models. In: Hammoudi, S., Pires, L., Selic, B. (eds) Model-Driven Engineering and Software Development. MODELSWARD 2018. Communications in Computer and Information Science, vol 991. Springer, Cham. https://doi.org/10.1007/978-3-030-11030-7_2
Download citation
DOI: https://doi.org/10.1007/978-3-030-11030-7_2
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-11029-1
Online ISBN: 978-3-030-11030-7
eBook Packages: Computer ScienceComputer Science (R0)