In this tutorial, I want to give you a short introduction on how to integrate OpenAPI into a Slim Project or any other that is based on PHP. We will use the approach to first write the code and then add annotations to it.
OpenAPI or Swagger? First, I want to clarify most times in this article we will be talking about OpenAPI, but a few times like the UI npm package we will be referring to Swagger. Till version 2 the specification was named Swagger, with major version 3 it was renamed to OpenAPI. Some tools developed by SmartBear are still named Swagger, you find more details here https://swagger.io/about/.
Here is a short overview of the workflow I will be providing in this tutorial. There are several other ways how to do that, one is to write the documentation first.
Here is a short overview of how the structure of our OpenAPI will look like.
In this tutorial I will give you a brief overview of the most used fields, if you want to go deeper or need to use more fields you find the documentation here https://swagger.io/specification/#openapi-object
#swagger #slim #php #open-api