This includes all fields that are used as keys in a map, except where explicitly noted that keys are case insensitive. FormatĪn OpenAPI document that conforms to the OpenAPI Specification is itself a JSON object, which may be represented either in JSON or YAML format.įor example, if a field has an array value, the JSON array representation will be used:Īll field names in the specification are case sensitive. Occasionally, non-backwards compatible changes may be made in minor versions of the OAS where impact is believed to be low relative to the benefit provided.Īn OpenAPI document compatible with OAS 3.*.* contains a required openapi field which designates the version of the OAS that it uses. The patch version SHOULD NOT be considered by tooling, making no distinction between 3.1.0 and 3.1.1 for example. Tooling which supports OAS 3.1 SHOULD be compatible with all OAS 3.1.* versions. minor portion of the version string (for example 3.1) SHALL designate the OAS feature set.patch versions address errors in, or provide clarifications to, this document, not the feature set. The OpenAPI Specification is versioned using a major. The available status codes are defined by ] and registered status codes are listed in the IANA Status Code Registry. The HTTP Status Codes are used to indicate the status of the executed operation. Some examples of possible media type definitions: The media type definitions SHOULD be in compliance with ]. Media type definitions are spread across several resources. The value for these path parameters MUST NOT contain any unescaped “generic syntax” characters described by ]: forward slashes ( /), question marks ( ?), or hashes ( #). An exception is if the path item is empty, for example due to ACL constraints, matching path parameters are not required. Path templating refers to the usage of template expressions, delimited by curly braces (), to mark a section of a URL path as replaceable using path parameters.Įach template expression in the path MUST correspond to a path parameter that is included in the Path Item itself and/or in each of the Path Item’s Operations. An OpenAPI document uses and conforms to the OpenAPI Specification. The OpenAPI document MUST contain at least one paths field, a components field or a webhooks field. DefinitionsĪ self-contained or composite resource which defines or describes an API or elements of an API. When properly defined, a consumer can understand and interact with the remote service with a minimal amount of implementation logic.Īn OpenAPI definition can then be used by documentation generation tools to display the API, code generation tools to generate servers and clients in various programming languages, testing tools, and many other use cases. The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to HTTP APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. This document is licensed under The Apache License, Version 2.0. The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 ] ] when, and only when, they appear in all capitals, as shown here. Status of This DocumentThe source-of-truth for the specification is the GitHub markdown file referenced above. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. OpenAPI Specification v3.1.0 | Introduction, Definitions, & More OpenAPI Specification v3.1.0 The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |