OpenAI for OpenAPI: Automated generation of REST API specification via LLMs
Hao Chen, Yunchun Li, Chen Chen, Fengxu Lin, Wei Li

TL;DR
This paper introduces OOPS, a technology-agnostic LLM-based static analysis tool that automatically generates high-quality OpenAPI specifications for REST APIs across diverse programming languages and frameworks.
Contribution
It presents the first LLM-based static analysis method for OAS generation that reduces reliance on language-specific rules and human intervention, improving accuracy and applicability.
Findings
Achieves over 98% F1-score in endpoint method inference
Attains 97% accuracy in request parameter and response inference
Generates OAS with high token efficiency and low hallucination rates
Abstract
REST APIs, based on the REpresentational State Transfer (REST) architecture, are the primary type of Web API. The OpenAPI Specification (OAS) serves as the de facto standard for describing REST APIs and is crucial for multiple software engineering tasks. However, developers face challenges in writing and maintaining OAS. Although static analysis shows potential for OAS generation, it is limited to specific programming languages and development frameworks. The powerful code understanding capabilities of LLMs offer new opportunities for OAS generation, yet they are constrained by context limitations and hallucinations. To address these challenges, we propose the OpenAI OpenAPI Project Scanner (OOPS), the first technology-agnostic LLM-based static analysis method for OAS generation, requiring fewer technology-specific rules and less human expert intervention. OOPS is implemented as an LLM…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware System Performance and Reliability · Advanced Software Engineering Methodologies · Software Engineering Research
