O'Reilly logo

Distributed Computing with Go by V.N. Nikhil Anurag

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

OpenAPI specification

OpenAPI lets us define RESTful APIs in a standardized manner, and they can be defined without being tied down to any particular programming language or framework being used. This provides us with a powerful abstraction to define an API that can have the initial implementation of the RESTful server in Java or Python; also we can port the codebase to Go, with little to no change in the behavior of the service.

Let's list the general structure of an OpenAPI specification and use it to redefine the Books API described in Chapter 4, The RESTful Web.

If we look at the Books API title, we can define the following elements to describe the API:

  • The URL to our server
  • The basic information about the intent of the API
  • The paths ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required