Notice: wp_deregister_script的调用方法不正确。脚本和样式应在wp_enqueue_scriptsadmin_enqueue_scriptslogin_enqueue_scripts钩子之后再加入加载队列(enqueue)或注册(register)。 请查阅调试WordPress来获取更多信息。 (这个消息是在3.3.0版本添加的。) in /home/www/htdocs/wp-includes/functions.php on line 4188 什么是OpenAPI?Swagger是什么? - Break易站

什么是OpenAPI?Swagger是什么?

作者: Arvin Chen 分类: Swagger 来源: Break易站(www.breakyizhan.com)

什么是OpenAPI?

OpenAPI规范(以前称为Swagger规范)是REST API的API描述格式。 OpenAPI文件允许您描述整个API,包括:

  • 每个端点上的可用端点(/users)和操作(GET /users,POST /users)
  • 操作参数每个操作的输入和输出
  • 认证方法
  • 联系信息,许可证,使用条款和其他信息。
  • API规范可以用YAML或JSON编写。该格式对人和机器都很容易学习和阅读。

完整的OpenAPI规范可以在GitHub上找到:
OpenAPI 3.0规范

Swagger是什么?

Swagger是一套围绕OpenAPI规范构建的开源工具,可以帮助您设计,构建,编写和使用REST API。

主要的Swagger工具包括:

  • Swagger编辑器 - 基于浏览器的编辑器,您可以在其中编写OpenAPI规范。
  • Swagger UI - 将OpenAPI规范呈现为交互式API文档。
  • Swagger Codegen - 根据OpenAPI规范生成服务器存根和客户端库。

为什么要使用OpenAPI?
API描述其自身结构的能力是OpenAPI中所有迷人的根源。一旦编写完成,OpenAPI规范和Swagger工具可以以各种方式进一步推动您的API开发:

设计优先用户:

  • 使用Swagger Codegen为您的API生成服务器存根。剩下的唯一事情就是实现服务器逻辑 - 而且你的API已经准备好了!
  • 使用Swagger Codegen以超过40种语言为您的API生成客户端库。
  • 使用Swagger UI生成交互式API文档,让用户直接在浏览器中尝试API调用。
  • 使用该规范将API相关工具连接到您的API。例如,将规范导入到SoapUI来为您的API创建自动化测试。
    查看与Swagger集成的开源和商业工具。
  •   本文标题:什么是OpenAPI?Swagger是什么? - Break易站
    转载请保留页面地址:https://www.breakyizhan.com/swagger/2806.html
    Swagger的相关文章
    Notice: Undefined variable: post in /home/www/htdocs/wp-content/themes/breakyizhan/functions.php on line 493 Notice: Trying to get property of non-object in /home/www/htdocs/wp-content/themes/breakyizhan/functions.php on line 493 Notice: 自3.1.0版本起,已不建议给WP_Query传入一个参数!caller_get_posts已被废弃,请改用ignore_sticky_posts。 in /home/www/htdocs/wp-includes/functions.php on line 4072 Notice: Undefined variable: post in /home/www/htdocs/wp-content/themes/breakyizhan/functions.php on line 510 Notice: Trying to get property of non-object in /home/www/htdocs/wp-content/themes/breakyizhan/functions.php on line 510 Notice: Undefined variable: post in /home/www/htdocs/wp-content/themes/breakyizhan/functions.php on line 510 Notice: Trying to get property of non-object in /home/www/htdocs/wp-content/themes/breakyizhan/functions.php on line 510 Notice: Undefined variable: post in /home/www/htdocs/wp-content/themes/breakyizhan/functions.php on line 510 Notice: Trying to get property of non-object in /home/www/htdocs/wp-content/themes/breakyizhan/functions.php on line 510 Notice: Undefined variable: post in /home/www/htdocs/wp-content/themes/breakyizhan/functions.php on line 510 Notice: Trying to get property of non-object in /home/www/htdocs/wp-content/themes/breakyizhan/functions.php on line 510 Notice: Undefined variable: post in /home/www/htdocs/wp-content/themes/breakyizhan/functions.php on line 510 Notice: Trying to get property of non-object in /home/www/htdocs/wp-content/themes/breakyizhan/functions.php on line 510 Notice: Undefined variable: post in /home/www/htdocs/wp-content/themes/breakyizhan/functions.php on line 510 Notice: Trying to get property of non-object in /home/www/htdocs/wp-content/themes/breakyizhan/functions.php on line 510 Notice: Undefined variable: post in /home/www/htdocs/wp-content/themes/breakyizhan/functions.php on line 510 Notice: Trying to get property of non-object in /home/www/htdocs/wp-content/themes/breakyizhan/functions.php on line 510 Notice: Undefined variable: post in /home/www/htdocs/wp-content/themes/breakyizhan/functions.php on line 510 Notice: Trying to get property of non-object in /home/www/htdocs/wp-content/themes/breakyizhan/functions.php on line 510
      微信返利机器人
      免费:淘宝,京东,拼多多优惠券
      腾讯,爱奇艺,优酷的VIP视频免费解析,免费看
      即刻扫描二维码,添加微信机器人!
    Notice: Undefined variable: aria_req in /home/www/htdocs/wp-content/themes/breakyizhan/comments.php on line 56 Notice: Undefined variable: aria_req in /home/www/htdocs/wp-content/themes/breakyizhan/comments.php on line 57 Notice: Undefined variable: aria_req in /home/www/htdocs/wp-content/themes/breakyizhan/comments.php on line 58

    发表笔记

    电子邮件地址不会被公开。 必填项已用*标注