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

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.

主站蜘蛛池模板: 修文县| 嘉善县| 绥化市| 成都市| 乐陵市| 平陆县| 北辰区| 连南| 仲巴县| 济源市| 屏东县| 上饶县| 甘孜县| 娱乐| 永定县| 武威市| 平度市| 牙克石市| 夏邑县| 古蔺县| 景宁| 恩平市| 和田市| 视频| 门头沟区| 抚顺市| 德安县| 西乌珠穆沁旗| 天祝| 洛浦县| 雅安市| 渑池县| 措勤县| 万安县| 汽车| 昌宁县| 静宁县| 兰考县| 宁河县| 阳春市| 丹东市|