chapter one

1 Introducing APIs and OpenAPI

 

This chapter covers:

  • Describing an API Ecosystem
  • What OpenAPI and Swagger are
  • When to use OpenAPI
  • An overview of this book

In this chapter, we’ll take a look at the world of APIs and OpenAPI. To get you a little more comfortable with the topics of this book. We’ll start by taking a look at the benefits of describing an API, how it forms part of an API ecosystem and where OpenAPI fits in. We’ll look at an example of an OpenAPI document and when to use OpenAPI in practice.

Lets get started…

1.1  What is an API Ecosystem?

I like the word ecosystem. It describes the interactions and relationships between living and non-living things inside some environment. I always picture a pond with frogs and wet stones, for some reason. But you might imagine something different.

If we’re to borrow (cough definitely not steal! ) it from biology, we could use it to describe the world of APIs within a team or organization.

The living things can represent the things that we have some control over, that we can change. These are the things we make, our services/stacks/code. The non-living things can be the things that we make use of, that we cannot easily change. Those are the libraries and external services we use via APIs. And of course there is the environment. It might be the Internet, an internal network, a tiny device stuck on the roof of our house or all three!

1.2  Describing things

1.2.1  Bridget’s Task

1.2.2  The potential of Bridget’s solution

1.3  What is OpenAPI?

1.4  Where do OpenAPI definitions fit in ?

1.5  And what is Swagger?

1.6  What about REST?

1.7  Where to use OpenAPI

1.7.1  When speed matters

1.7.2  Internal networks

1.8  Good APIs

1.9  This book

1.10  Summary