About OpenAPI
It is a specification that allows to describe REST API in a standard way. The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for REST APIs. This allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic.
About Swagger
Swagger is a set of open-source tools built around the OpenAPI Specification that can help software professionals design, build, document, and consume REST APIs. Where OpenAPI deals with specification, Swagger implements the specification to describe a REST API .