arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2212.07253cs.SEcs.AI
收藏

API-Miner:一个API到API的规范推荐引擎

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

JP Morgan Chase(摩根大通)

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

AI总结:

针对API设计中缺乏标准化比较方法导致学习成本高的问题,研究提出API-Miner推荐引擎,通过新型信息提取、特征技术及对数线性模型检索OpenAPI规范组件,性能优于基线,可加速开发并提升API质量。

摘要:

在为大型项目设计新API时,开发者需要做出明智的设计选择,以确保代码库能够可持续增长。为了保证新API组件设计合理,开发者可以从现有API组件中学习经验。然而,由于缺乏标准化的API设计比较方法,这一学习过程既耗时又困难。为填补这一空白,我们开发了API-Miner——据我们所知,它是首批API到API的规范推荐引擎之一。API-Miner能够检索用OpenAPI(一种被广泛采用的Web API描述语言)编写的相关规范组件。API-Miner具备多项重要贡献,包括:(1)用于从OpenAPI规范中处理和提取关键信息的新型方法;(2)针对高度技术性的API规范领域优化的创新特征提取技术;(3)一种新型对数线性概率模型,该模型结合多种信号,能够根据查询规范检索出相关且高质量的OpenAPI规范组件。我们通过定量和定性任务对API-Miner进行了评估,其整体recall@1达到91.7%,F1值达到56.2%,相比基线性能,recall@1提升了15.4%,F1值提升了3.2%。总体而言,API-Miner能够让开发者在API开发周期的早期阶段,从公共或内部数据库中检索相关的OpenAPI规范组件,从而借鉴已有的成熟案例,还可能发现自身工作中的冗余部分。它为开发者提供了所需的指导,有助于加快开发进程,并助力开发者设计出经过深思熟虑的API,提升代码的可维护性和质量。代码已在GitHub上公开,地址为https://github.com/jpmorganchase/api-miner。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑