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

The OpenAPI Specification

As the name suggests, the OpenAPI Specification (OAS) is driven by an open source community that's focused on the OpenAPI Initiative within the Linux Foundation Collaborative Project.

In a few words, the OpenAPI Specification is a language-agnostic interface that was designed for REST APIs and allows consumers to discover the capabilities of a service without even knowing what code base is being used to implement the API. The API may not even be ready to use or have a single line of code written. The main reason for this is mentioned in the documentation provided by OpenAPI. Once you have an OpenAPI Specification for your API, it is easy to add the Swagger UI to the project as an interactive communication tool.

Swagger is a project that's composed of tools that help the developers of REST APIs in tasks such as the following:

  • API modeling
  • Generating API documentation (readable)
  • Generating client and server code, with support for various programming languages

In addition to OpenAPI, Swagger provides an ecosystem of tools to help developers when they're designing a new API or maintaining an existing one . Some of these tools are as follows:

  • Swagger Editor—for creating a contract:
  • Swagger UI—for publishing documentation:
  • Swagger Codegen—for generating the skeletons of servers:

In a few words, OpenAPI describes APIs that could be represented in either YAML or JSON formats.

At the time of writing this book, OpenAPI is on Version 3. It is versioned using Semantic Versioning 2.0.0 (semver) and follows the semver specification.

The following sections will walk you through how to get started with OpenAPI with Swagger.

It is strongly recommended that you take a look at the OpenAPI Specification itself, which is available at https://www.openapis.org/, as well as the Swagger specification, which is available at https://Swagger.io/specification, to learn more.
主站蜘蛛池模板: 焦作市| 边坝县| 苗栗县| 琼结县| 乌鲁木齐市| 岳阳县| 当阳市| 廊坊市| 五大连池市| 开平市| 乐东| 顺平县| 时尚| 怀来县| 新和县| 静宁县| 延长县| 革吉县| 四川省| 卫辉市| 青阳县| 大洼县| 娄底市| 台州市| 兴隆县| 铜梁县| 峡江县| 元江| 临泽县| 高要市| 台南市| 贺州市| 新邵县| 苏尼特右旗| 克拉玛依市| 云安县| 客服| 西吉县| 和林格尔县| 镇宁| 霍林郭勒市|