开放API规范中文翻译
  • Introduction
  • 定义
    • OpenAPI 文档
    • 路径模板
    • 媒体类型
    • HTTP 状态码
  • 规范
    • 版本
    • 格式
    • 文档结构
    • 数据类型
    • 富文本格式
    • 相对引用
    • 纲要
      • OpenAPI 对象
      • Info 对象
      • Contact 对象
      • License 对象
      • Server 对象
      • Server Variable 对象
      • Components 对象
      • Paths 对象
      • Path Item 对象
      • Operation 对象
      • External Documentation 对象
      • Parameter 对象
      • Request Body 对象
      • Media Type 对象
      • Encoding 对象
      • Responses 对象
      • Response 对象
      • Callback 对象
      • Example 对象
      • Link 对象
      • Header 对象
      • Tag 对象
      • Reference 对象
      • Schema 对象
      • Discriminator 对象
      • XML 对象
      • Security Scheme 对象
      • OAuth Flows 对象
      • OAuth Flow 对象
      • Security Requirement 对象
    • 规范扩展
    • Security Filtering
  • 附录 A: 修订历史
Powered by GitBook
On this page
  • 中文翻译进行中,欢迎大家协助翻译
  • Current Version - 3.0.3
  • Future Versions
  • Previous Versions
  • See It in Action
  • Tools and Libraries
  • Participation
  • Licensing

Was this helpful?

Introduction

Next定义

Last updated 4 years ago

Was this helpful?

中文翻译进行中,欢迎大家协助翻译

翻译进度

Use cases for machine-readable API definition documents include, but are not limited to: interactive documentation; code generation for documentation, clients, and servers; and automation of test cases. OpenAPI documents describe an API's services and are represented in either YAML or JSON formats. These documents may either be produced and served statically or be generated dynamically from an application.

The OpenAPI Specification does not require rewriting existing APIs. It does not require binding any software to a service — the service being described may not even be owned by the creator of its description. It does, however, require the capabilities of the service be described in the structure of the OpenAPI Specification. Not all services can be described by OpenAPI — this specification is not intended to cover every possible style of REST APIs. The OpenAPI Specification does not mandate a specific development process such as design-first or code-first. It does facilitate either technique by establishing clear interactions with a REST API.

This GitHub project is the starting point for OpenAPI. Here you will find the information you need about the OpenAPI Specification, simple examples of what it looks like, and some general information regarding the project.

Current Version - 3.0.3

Future Versions

Previous Versions

See It in Action

Tools and Libraries

Participation

The OpenAPI Initiative encourages participation from individuals and companies alike. If you want to participate in the evolution of the OpenAPI Specification, consider taking the following actions:

  • Create an issue to describe a new concern. If possible, propose a solution.

Not all feedback can be accommodated and there may be solid arguments for or against a change being appropriate for the specification.

Licensing

The OpenAPI Specification is a community-driven open specification within the , a Linux Foundation Collaborative Project.

The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for , which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.

The current version of the OpenAPI specification is .

- The next MINOR version. Non-breaking changes should be submitted against this branch.

This repository also contains the , which is identical to the Swagger 2.0 specification before it was renamed to "OpenAPI Specification", as well as the Swagger 1.2 and Swagger 2.0 specifications.

Each folder in this repository, such as and , should contain folders pertaining to the current and previous versions of the specification.

If you just want to see it work, check out the .

Looking to see how you can create your own OpenAPI definition, present it, or otherwise use it? Check out the growing .

The current process for development of the OpenAPI Specification is described in . Development of the next version of the OpenAPI Specification is guided by the . This group of committers bring their API expertise, incorporate feedback from the community, and expand the group of committers as appropriate. All development activity on the future specification will be performed as features and merged into this branch. Upon release of the future specification, this branch will be merged to master.

The TSC holds weekly web conferences to review open pull requests and discuss open issues related to the evolving OpenAPI Specification. Participation in weekly calls and scheduled working sessions is open to the community. You can view the , and import it to your calendar using the .

Review the . The human-readable markdown file is the source of truth for the specification.

Review the process so you understand how the spec is evolving.

Check the and to see if someone has already documented your idea or feedback on the specification. You can follow an existing conversation by subscribing to the existing issue or PR.

See:

Analytics
OpenAPI Initiative
REST APIs
OpenAPI Specification 3.0.3
3.1.0
OpenAPI Specification 2.0
examples
schemas
list of current examples
list of 3.0 implementations
Development Guidelines
Technical Steering Committee (TSC)
TSC calendar online
iCal link
current specification
development
issues
pull requests
License (Apache-2.0)
https://github.com/fishead/OpenAPI-Specification
Build Status
Definitions
OpenAPI Document
Path Templating
Media Types
HTTP Status Codes
Specification
Versions
Format
Document Structure
Data Types
Rich Text Formatting
Relative References In URLs
Schema
OpenAPI Object
Info Object
Contact Object
License Object
Server Object
Server Variable Object
Components Object
Paths Object
Path Item Object
Operation Object
External Documentation Object
Parameter Object
Request Body Object
Media Type Object
Encoding Object
Responses Object
Response Object
Callback Object
Example Object
Link Object
Header Object
Tag Object
Reference Object
Schema Object
Discriminator Object
XML Object
Security Scheme Object
OAuth Flows Object
OAuth Flow Object
Security Requirement Object
Specification Extensions
Security Filtering
Appendix A: Revision History