Designing APIs with Swagger and OpenAPI

Designing APIs with Swagger and OpenAPI is a comprehensive guide to designing and describing your first RESTful API using the most widely adopted standards. Following expert instruction from Swagger core contributor Josh Ponelat and API consultant Lukas Rosenstock, you'll spend each chapter pro...

Full description

Bibliographic Details
Main Authors: Ponelat, Joshua S,, Rosenstock, Lukas (Author)
Other Authors: Tam, Tony (writer of foreword)
Format: eBook
Language:English
Published: Shelter Island Manning Publications 2022
Subjects:
Online Access:
Collection: O'Reilly - Collection details see MPG.ReNa
Table of Contents:
  • 5.4 JSON Schema
  • 5.4.1 The type field
  • 5.4.2 Adding a field to an object
  • 5.4.3 The minimum and maximum keywords
  • 5.4.4 Number vs. integer
  • 5.5 Status codes
  • 5.6 Media types (aka MIME)
  • 5.7 Describing the GET /reviews response
  • 5.7.1 Smallest response in OpenAPI
  • 5.7.2 The GET /reviews 200 response body
  • 5.7.3 Adding the rating field to our response body
  • 5.7.4 Describing message, uuid, and userId
  • Summary
  • 6 Creating resources
  • 6.1 The problem
  • 6.2 Describing POST /reviews with a request body
  • 6.2.1 Where to find request bodies
  • 4.1.1 The Editor panel
  • 4.1.2 The UI Docs panel
  • 4.1.3 The toolbar
  • 4.1.4 Persistence
  • 4.2 Writing the smallest OpenAPI definition in Swagger Editor
  • 4.2.1 The smallest valid OpenAPI definition
  • 4.2.2 Writing in Swagger Editor
  • 4.2.3 A word on validation
  • 4.3 Adding GET /reviews to our definition
  • 4.4 Interacting with our API
  • 4.4.1 Executing GET /reviews
  • 4.4.2 Adding servers to our definition
  • 4.4.3 Executing GET /reviews (again)
  • Summary
  • 5 Describing API responses
  • 5.1 HTTP responses
  • 5.2 The problem
  • 5.3 The mind-blowing world of data schemas
  • 2.5.1 Forming a POST request in Postman
  • 2.5.2 Verification
  • 2.6 Practice
  • 2.6.1 Cat (and other animal) facts API
  • 2.6.2 Random avatar API
  • 2.6.3 DuckDuckGo's search engine API
  • 2.6.4 Pirate talk API
  • 2.7 HTTP for the brave
  • Summary
  • 3 Our first taste of OpenAPI definitions
  • 3.1 The problem
  • 3.2 Introducing the OpenAPI specification
  • 3.3 A quick refresher on YAML
  • 3.3.1 From JSON to YAML
  • 3.4 Describing our first operation
  • 3.5 Extending our first operation
  • Summary
  • 4 Using Swagger Editor to write OpenAPI definitions
  • 4.1 Introducing Swagger Editor
  • 1.3.1 Example OpenAPI definition
  • 1.4 Where do OpenAPI definitions fit in?
  • 1.5 What is Swagger?
  • 1.6 What about REST?
  • 1.7 When to use OpenAPI
  • 1.7.1 For API consumers
  • 1.7.2 For API producers
  • 1.7.3 For API designers
  • 1.8 This book
  • Summary
  • 2 Getting set up to make API requests
  • 2.1 The problem
  • 2.1.1 FarmStall API overview
  • 2.1.2 The first two operations of the FarmStall API
  • 2.2 Getting set up with Postman
  • 2.3 FarmStall API
  • 2.4 Our first request
  • 2.4.1 Forming a GET request in Postman
  • 2.4.2 Verification
  • 2.5 Adding a review to the FarmStall API
  • Intro
  • inside front cover
  • Designing APIs with Swagger and OpenAPI
  • Copyright
  • dedication
  • contents
  • front matter
  • foreword
  • preface
  • acknowledgments
  • about this book
  • Who should read this book
  • How this book is organized: A roadmap
  • About the code
  • liveBook discussion forum
  • Other online resources
  • about the authors
  • about the cover illustration
  • Part 1 Describing APIs
  • 1 Introducing APIs and OpenAPI
  • 1.1 What is an API ecosystem?
  • 1.2 Describing things
  • 1.2.1 Bridget's task
  • 1.2.2 The potential of Bridget's solution
  • 1.3 What is OpenAPI?