From the course: Building APIs with Swagger and the OpenAPI Specification

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Defining APIs

Defining APIs - REST Tutorial

From the course: Building APIs with Swagger and the OpenAPI Specification

Start my 1-month free trial

Defining APIs

- [Instructor] We took a small peek at the open API specification. However, there are many additional objects within the spec that can be used to create API definitions. Let's take a high-level look at the specification to explore these new objects. OAS-compliant definition files may contains seven sections at the root level. Within these seven objects we can nest additional properties to build a definition for an API. OAS definitions can be built with either YAML or JSON. However, in this course we will use YAML because it is the most common markup you will encounter when using Swagger. Of these initial sections, only the info and paths object are required. However, the paths and components objects are arguably the two most important within an API definition. We'll do most of the work within these sections throughout the course. We've had a glimpse at the info object. It contains general API information such as a name and description for the API. It also allows us to provide other…

Contents