论文标题

API-Miner:API到API规范建议引擎

API-Miner: an API-to-API Specification Recommendation Engine

论文作者

Moon, Sae Young, Kerr, Gregor, Silavong, Fran, Moran, Sean

论文摘要

在为大型项目设计新的API时,开发人员需要做出智能设计选择,以便他们的代码库可以可持续增长。为了确保新的API组件设计精良,开发人员可以从现有的API组件中学习。但是,缺乏比较API设计的标准化方法使得该学习过程耗时且困难。为了解决这一差距,我们据我们所知,我们开发了API-Miner,这是最早的API到API规范推荐引擎之一。 API-Miner检索用OpenAPI编写的相关规范组件(一种用于描述Web API的广泛采用的语言)。 API-miner presents several significant contributions, including: (1) novel methods of processing and extracting key information from OpenAPI specifications, (2) innovative feature extraction techniques that are optimized for the highly technical API specification domain, and (3) a novel log-linear probabilistic model that combines multiple signals to retrieve relevant and high quality OpenAPI specification components given a query specification.我们在定量和定性任务中评估API-Miner,并获得91.7%的召回率@1和56.2%的F1,在F1中,Recce@1和3.2%的召回率超过了15.4%。总体而言,API-Miner将允许开发人员在API开发周期的早期阶段从公共或内部数据库中检索相关的OpenAPI规范组件,以便他们可以从现有的既定示例中学习并有可能在其工作中识别冗余。它为开发人员提供了加速开发过程所需的指导,并为促进代码可维护性和质量的经过深思熟虑的API提供了贡献。代码可在https://github.com/jpmorganchase/api-miner上在github上找到。

When designing a new API for a large project, developers need to make smart design choices so that their code base can grow sustainably. To ensure that new API components are well designed, developers can learn from existing API components. However, the lack of standardized methods for comparing API designs makes this learning process time-consuming and difficult. To address this gap we developed API-Miner, to the best of our knowledge, one of the first API-to-API specification recommendation engines. API-Miner retrieves relevant specification components written in OpenAPI (a widely adopted language used to describe web APIs). API-miner presents several significant contributions, including: (1) novel methods of processing and extracting key information from OpenAPI specifications, (2) innovative feature extraction techniques that are optimized for the highly technical API specification domain, and (3) a novel log-linear probabilistic model that combines multiple signals to retrieve relevant and high quality OpenAPI specification components given a query specification. We evaluate API-Miner in both quantitative and qualitative tasks and achieve an overall of 91.7% recall@1 and 56.2% F1, which surpasses baseline performance by 15.4% in recall@1 and 3.2% in F1. Overall, API-Miner will allow developers to retrieve relevant OpenAPI specification components from a public or internal database in the early stages of the API development cycle, so that they can learn from existing established examples and potentially identify redundancies in their work. It provides the guidance developers need to accelerate development process and contribute thoughtfully designed APIs that promote code maintainability and quality. Code is available on GitHub at https://github.com/jpmorganchase/api-miner.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源