๐ค AI Summary
This work addresses the low development efficiency and high maintenance overhead associated with manual implementation of RESTful microservices. We propose an API-first, LLM-powered automated code generation method that takes OpenAPI specifications as input and produces executable microservices via a novel LLM-driven generation framework. Crucially, we introduceโ for the first timeโa runtime log analysis and error feedback mechanism, enabling a closed-loop optimization paradigm: โspecify โ generate โ execute โ debug โ refine.โ Compared to conventional development practices, our approach significantly accelerates prototyping and reduces manual iteration cycles. Empirical evaluation with six industry practitioners demonstrates substantial improvements in coding automation and rapid experimentation capabilities. The method establishes a new pathway toward API-driven, intelligent software engineering.
๐ Abstract
The growing need for scalable, maintainable, and fast-deploying systems has made microservice architecture widely popular in software development. This paper presents a system that uses Large Language Models (LLMs) to automate the API-first development of RESTful microservices. This system assists in creating OpenAPI specification, generating server code from it, and refining the code through a feedback loop that analyzes execution logs and error messages. By focusing on the API-first methodology, this system ensures that microservices are designed with well-defined interfaces, promoting consistency and reliability across the development life-cycle. The integration of log analysis enables the LLM to detect and address issues efficiently, reducing the number of iterations required to produce functional and robust services. This process automates the generation of microservices and also simplifies the debugging and refinement phases, allowing developers to focus on higher-level design and integration tasks. This system has the potential to benefit software developers, architects, and organizations to speed up software development cycles and reducing manual effort. To assess the potential of the system, we conducted surveys with six industry practitioners. After surveying practitioners, the system demonstrated notable advantages in enhancing development speed, automating repetitive tasks, and simplifying the prototyping process. While experienced developers appreciated its efficiency for specific tasks, some expressed concerns about its limitations in handling advanced customizations and larger scale projects. The code is publicly available at https://github.com/sirbh/code-gen