官术网_书友最值得收藏!

Open API and Swagger

Because APIs are very common, the Open API Specification is a community-driven open specification within the OpenAPI Initiative, a Linux Foundation Collaborative Project.

The OpenAPI Specification (OAS), formerly called the Swagger Specification, is an API description format for REST APIs. An Open API file allows you to describe your entire API, including the following:

  • Available endpoints 
  • Endpoint operations (GET, PUT, DELETE, and so on)
  • Parameter input and output for each operation
  • Authentication methods
  • Contact information, license, terms of use, and other information.

Open API has many versions and is rapidly developing. The current stable version is 3.0.

There are two formats, JSON and YAML, that are supported by OAS. Swagger and Open API both are different. Swagger has many products, including the following:

  • Swagger UI (for validating Open API files and interactive docs)
  • Swagger Codegen (for generating server stubs)

Whenever we develop a REST API, it is a better practice to create an Open API/Swagger file that captures all the necessary details and descriptions of the API. The file can then be used in Swagger UI to create interactive documentation.

主站蜘蛛池模板: 弥渡县| 蒙山县| 承德市| 彩票| 那坡县| 方山县| 定安县| 体育| 宁国市| 泾源县| 桦南县| 岳西县| 绍兴市| 万山特区| 定远县| 盘山县| 新蔡县| 靖西县| 陆河县| 延长县| 安溪县| 阿尔山市| 永州市| 滨海县| 东丰县| 长宁区| 盱眙县| 安吉县| 渭南市| 孟州市| 牡丹江市| 乌苏市| 寻乌县| 乡宁县| 丁青县| 卢龙县| 台东县| 大理市| 克什克腾旗| 武山县| 虎林市|