arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2008.12808cs.SE
收藏

RESTful API的弃用:一项实证研究

A First Look at the Deprecation of RESTful APIs: An Empirical Study

Jerin Yasmin, Yuan Tian, Jinqiu Yang

摘要:

表示状态转移(REST)被认为是一种标准的软件架构风格,用于构建可以通过互联网集成软件系统的Web API。然而,在连接系统时,RESTful API也可能在引入破坏性更改时破坏依赖其服务的依赖应用程序,例如,不再支持旧版本的API。为了及时警告开发人员,从而防止对下游应用程序的严重影响,应遵循弃用-删除模型,并列出与弃用相关的信息,如替代方法。虽然API弃用分析作为一个主题并不新鲜,但大多数现有的工作都集中在非Web API上,例如Java和Android提供的API。为了研究RESTful API弃用,我们提出了一个名为RADA(RESTful API弃用分析器)的框架。RADA能够自动识别弃用的API元素,并从OpenAPI规范中分析受影响的操作,OpenAPI规范是用于描述RESTful Web服务的机器可读配置文件。我们将RADA应用于从最大的OpenAPI规范目录APIs.guru收集的1,368个RESTful API中的2,224个OpenAPI规范。基于RADA挖掘的数据,我们进行了一项实证研究,以调查RESTful API中如何遵循弃用-删除协议,并描述RESTful API弃用中的实践。我们的研究结果揭示了现有RESTful API中存在的几个严重的弃用相关问题。我们的RADA实现和详细的经验结果可供未来的智能工具公开使用,这些工具可以自动识别和迁移客户端代码中不推荐使用的RESTful API操作。

英文摘要:

REpresentational State Transfer (REST) is considered as one standard software architectural style to build web APIs that can integrate software systems over the internet. However, while connecting systems, RESTful APIs might also break the dependent applications that rely on their services when they introduce breaking changes, e.g., an older version of the API is no longer supported. To warn developers promptly and thus prevent critical impact on downstream applications, a deprecated-removed model should be followed, and deprecation-related information such as alternative approaches should also be listed. While API deprecation analysis as a theme is not new, most existing work focuses on non-web APIs, such as the ones provided by Java and Android. To investigate RESTful API deprecation, we propose a framework called RADA (RESTful API Deprecation Analyzer). RADA is capable of automatically identifying deprecated API elements and analyzing impacted operations from an OpenAPI specification, a machine-readable profile for describing RESTful web service. We apply RADA on 2,224 OpenAPI specifications of 1,368 RESTful APIs collected from APIs.guru, the largest directory of OpenAPI specifications. Based on the data mined by RADA, we perform an empirical study to investigate how the deprecated-removed protocol is followed in RESTful APIs and characterize practices in RESTful API deprecation. The results of our study reveal several severe deprecation-related problems in existing RESTful APIs. Our implementation of RADA and detailed empirical results are publicly available for future intelligent tools that could automatically identify and migrate usage of deprecated RESTful API operations in client code.

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

↑