OAS 3 This page applies to OpenAPI 3 – the latest version of the OpenAPI Specification.
API General Info
It is considered to be a good practice to include general information about your API into the specification: version number, license notes, contact data, links to documentation, and more. We particularly recommend doing this for publicly available APIs; as this will can increase user confidence in the services, your company provides.
To specify the API metadata, you use properties of the top-level
openapi: 3.0.0 info: # You application title. Required. title: Sample Pet Store App # API version. You can use semantic versioning like 1.0.0, # or an arbitrary string like 0.99-beta. Required. version: 1.0.0 # API description. Arbitrary text in CommonMark or HTML. description: This is a sample server for a pet store. # Link to the page that describes the terms of service. # Must be in the URL format. termsOfService: http://example.com/terms/ # Contact information: name, email, URL. contact: name: API Support email: email@example.com url: http://example.com/support # Name of the license and a URL to the license description. license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html # Link to the external documentation (if any). # Code or documentation generation tools can use description as the text of the link. externalDocs: description: Find out more url: http://example.com
version properties are required, others are optional.
Reference: info Object in OpenAPI 3.0.0 Specification.