AI-Powered Swagger/OpenAPI Developer Assistant
Abstract
Application Programming Interface (API) specifications written in the Swagger/OpenAPI format are the primary reference for developers who consume RESTful services, yet large specifications are time-consuming to read, cannot be queried in natural language, and must be tested and documented using separate tools. This paper presents the AI-Powered Swagger/OpenAPI Developer Assistant, a web-based platform that unifies these activities in a single workspace. A developer uploads a specification in JSON or YAML format; a Spring Boot back end parses it into structured endpoint information and supplies it as context to the Google Gemini large language model, which answers natural-language questions about endpoints, authentication, parameters, request and response schemas and error codes. The platform further provides an interactive API playground that builds request forms from the specification, executes live requests through a server-side executor and explains the returned response, together with a documentation generator for single endpoints or the complete API. The user interface is implemented in React with TypeScript. The paper describes the architecture, design decisions, implementation and security considerations of the system and discusses its advantages and limitations compared with a conventional multi-tool workflow.
References
OpenAPI Initiative. OpenAPI Specification, Version 3.1.0. The Linux Foundation. 2021. Available from: https://spec.openapis.org/oas/v3.1.0
Fielding R.T. Architectural Styles and the Design of Network-based Software Architectures. Doctoral Dissertation, University of California, Irvine. 2000.
Vaswani A., Shazeer N., Parmar N., et al. Attention Is All You Need. Advances in Neural Information Processing Systems. 2017, 30, 5998–6008p.
Brown T.B., Mann B., Ryder N., et al. Language Models are Few-Shot Learners. Advances in Neural Information Processing Systems. 2020, 33, 1877–1901p.
Lewis P., Perez E., Piktus A., et al. Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. Advances in Neural Information Processing Systems. 2020, 33, 9459–9474p.
Gemini Team, Google. Gemini: A Family of Highly Capable Multimodal Models. arXiv preprint arXiv:2312.11805. 2023.
Karlsson S., Čaušević A., Sundmark D. QuickREST: Property-based Test Generation of OpenAPI-Described RESTful APIs. In: Proceedings of the IEEE International Conference on Software Testing, Verification and Validation (ICST). 2020, 131–141p.
Atlidakis V., Godefroid P., Polishchuk M. RESTler: Stateful REST API Fuzzing. In: Proceedings of the 41st International Conference on Software Engineering (ICSE). 2019, 748–758p.
Kim M., Xin Q., Sinha S., Orso A. Automated Test Generation for REST APIs: No Time to REST Yet. In: Proceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA). 2022, 289–301p.
OWASP Foundation. OWASP Top 10:2021 – A10 Server-Side Request Forgery (SSRF). Available from: https://owasp.org/Top10/
Refbacks
- There are currently no refbacks.