A Study of the Effectiveness of Usage Examples in REST API Documentation

被引:0
|
作者
Sohan, S. M. [1 ]
Maurer, Frank [1 ]
Anslow, Craig [2 ]
Robillard, Martin P. [3 ]
机构
[1] Univ Calgary, Dept Comp Sci, Calgary, AB, Canada
[2] Victoria Univ Wellington, Sch Engn & Comp Sci, Wellington, New Zealand
[3] McGill Univ, Sch Comp Sci, Montreal, PQ, Canada
关键词
API; REST; Documentation; Usage Examples; Empirical Study; Controlled Study; Productivity; USABILITY;
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Generating and maintaining REST API documentation with usage examples can be a time consuming and expensive process for evolving APIs. Most REST API documentation tools focus on automating the documentation of the API objects, but require manual effort for capturing usage examples. Consequently, REST API developers need to know the cost vs. benefit of providing usage examples in the documentation to prioritize the documentation efforts. To this end, we have performed a controlled study with 26 experienced software engineers to understand problems that REST API client developers face while using an API without usage examples. We found that REST API client developers face productivity problems with using correct data types, data formats, required HTTP headers and request body when documentation lacks usage examples. By following the REST API documentation suggestions from this paper, REST API developers can reduce the errors, improve success rate and satisfaction of API client developers.
引用
收藏
页码:53 / 61
页数:9
相关论文
共 50 条
  • [21] Automated Generation of REST API Specification from Plain HTML']HTML Documentation
    Cao, Hanyang
    Falleri, Jean-Remy
    Blanc, Xavier
    SERVICE-ORIENTED COMPUTING, ICSOC 2017, 2017, 10601 : 453 - 461
  • [22] CodeKernel: A Graph Kernel based Approach to the Selection of API Usage Examples
    Gu, Xiaodong
    Zhang, Hongyu
    Kim, Sunghun
    34TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE 2019), 2019, : 602 - 613
  • [23] Demystify Official API Usage Directives with Crowdsourced API Misuse Scenarios, Erroneous Code Examples and Patches
    Ren, Xiaoxue
    Sun, Jiamou
    Xing, Zhenchang
    Xia, Xin
    Sun, Jianlin
    2020 ACM/IEEE 42ND INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2020), 2020, : 925 - 936
  • [24] Automatic API Usage Scenario Documentation from Technical Q&A Sites
    Uddin, Gias
    Khomh, Foutse
    Roy, Chanchal K.
    ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2021, 30 (03)
  • [25] Enriching API Documentation with Code Samples and Usage Scenarios from Crowd Knowledge
    Zhang, Jingxuan
    Jiang, He
    Ren, Zhilei
    Zhang, Tao
    Huang, Zhiqiu
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2021, 47 (06) : 1299 - 1314
  • [26] REST API Design Analysis and Empirical Study
    Zhou X.-Y.
    Chen W.
    Wu G.-Q.
    Wei J.
    Ruan Jian Xue Bao/Journal of Software, 2022, 33 (09):
  • [27] Live API Documentation
    Subramanian, Siddharth
    Inozemtseva, Laura
    Holmes, Reid
    36TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2014), 2014, : 643 - 652
  • [28] Why API documentation is insufficient for developers: an empirical study
    Fan, Qiang
    Yu, Yue
    Wang, Tao
    Yin, Gang
    Wang, Huaimin
    SCIENCE CHINA-INFORMATION SCIENCES, 2021, 64 (01)
  • [29] Why API documentation is insufficient for developers: an empirical study
    Qiang FAN
    Yue YU
    Tao WANG
    Gang YIN
    Huaimin WANG
    ScienceChina(InformationSciences), 2021, 64 (01) : 248 - 250
  • [30] Why API documentation is insufficient for developers: an empirical study
    Qiang Fan
    Yue Yu
    Tao Wang
    Gang Yin
    Huaimin Wang
    Science China Information Sciences, 2021, 64