Annotation

METHOD FOR SYNTHESIZING API SPECIFICATIONS, DOCUMENTATION AND API-CLIENTS BASED ON SERVER WEB APPLICATION SOURCE CODE USING LARGE LANGUAGE MODELS
Скачать PDF
Annotation: The article considers a method for the automatic generation of specifications, textual documentation, and clientside code for undocumented Application Programming Interfaces (API), based on static analysis of server-side web application code using Large Language Models (LLMs).The scientific novelty of the work lies in the formalization of the process of transforming an abstract syntax tree (AST), constructed for the server-side code of a web application, into an intermediate representation (IR) of the API, followed by enrichment of this IR with generated descriptions of API methods using a few-shot learning approach.The proposed method enables automation of the generation of documentation and client-side API code for web applications implemented in highlevel programming languages with structured descriptions of API handlers.An experimental evaluation of the method was conducted using three open-source web applications implemented in Python: a “Digital Teaching Assistant” platform designed for automatic generation and assessment of programming tasks; an address book API implemented in accordance with the Representational State Transfer (REST) architectural style; and an API for managing records of Free and Open Source Software (FOSS).The average cosine similarity metric between the generated API method descriptions and expert-authored reference descriptions was 0.92 for the remote LLM Nemotron-3-Nano-30B and 0.76 for the local LLM SmolLM2-1.7B, exceeding the result obtained using template- based generation (0.34) by 0.58 and 0.42, respectively.The obtained results demonstrate the feasibility of using the proposed method for generating API specifications, documentation, and client-side API code when developing integrations with web applications that have undocumented APIs.
Page numbers: 108-119.
For citation: Lvov A.A., Gorchakov A.V. Method for synthesizing api specifications, documentation and api-clients based on server web application source code using large language models // Electronic Scientific Journal IT-Standard. – 2026. – No. 2. – pp. 108-119.