Table of Contents
Fetching ...

LLM-Generated Microservice Implementations from RESTful API Definitions

Saurabh Chauhan, Zeeshan Rasheed, Abdul Malik Sami, Zheying Zhang, Jussi Rasku, Kai-Kristian Kemell, Pekka Abrahamsson

TL;DR

This work presents an LLM-enabled, API-first workflow for automating RESTful microservice development. It introduces a multi-agent architecture that generates OpenAPI specifications, builds server code, and validates functionality by executing code locally and analyzing runtime logs to guide fixes. In a preliminary study with six practitioners, the approach improved development speed and reduced manual coding for CRUD services, while highlighting limitations in handling advanced customizations and large-scale projects. The results suggest meaningful productivity gains and a practical path toward automated API-first software production, with code available at GitHub for broader adoption.

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

LLM-Generated Microservice Implementations from RESTful API Definitions

TL;DR

This work presents an LLM-enabled, API-first workflow for automating RESTful microservice development. It introduces a multi-agent architecture that generates OpenAPI specifications, builds server code, and validates functionality by executing code locally and analyzing runtime logs to guide fixes. In a preliminary study with six practitioners, the approach improved development speed and reduced manual coding for CRUD services, while highlighting limitations in handling advanced customizations and large-scale projects. The results suggest meaningful productivity gains and a practical path toward automated API-first software production, with code available at GitHub for broader adoption.

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

Paper Structure

This paper contains 24 sections, 6 figures, 5 tables.

Figures (6)

  • Figure 1: Microservice Architecture
  • Figure 2: Specification Generation
  • Figure 3: Server Code Generation
  • Figure 4: Intracting With Server
  • Figure 5: Thematic Map
  • ...and 1 more figures