S.No. | Swagger 2.0 | Open API Specification 3.0 |
1. | Version of specification Ex: Swagger 2.0 | Version of specification Ex: openapi: 3.0.0 |
2. | Swagger2.0 does not support multiple server in servers | Openapi 3.0.0 support multiple server in servers |
3. | Swagger2.0 you could only describe examples using a JSON or YAML object | In Openapi 3.0 you can describe multiple examples of any format using a JSON string |
4. | Swagger 2.0 we can’t add reference external examples | Openapi 3.0 we can also add reference external examples |
5. | In Swagger 2.0, the API endpoint URL definition is broken into 3 components : host, basePath and schemas and the endpoint URL is a combination of these component values. | In OpenAPI 3, this was only allowed in the actual endpoint URLs. You define the templates with a “variable” property. |
6. | In swagger 2.0 body and formData parameter are used . | In Openapi 3.0body and formData parameter types have been removed and replaced with requestBody. |
7. | In swagger 2.0 Cookie authentication is not supported in version 2.0 | In Openapi 3.0 cookie parameter type was added in version 3.0 |
8. | Swagge 2.0 does not support the oneOf or anyOf keywords | Openapi 3.0 support oneOf or anyOf keywords |
9. | Swagger 2.0 authentication types: Basic authentication API key (as a header or a query string parameter) OAuth 2 | Openapi 3.0 authentication types: HTTP authentication BasicBearer other HTTP schemes as defined by RFC 7235 and API keys Cookie authentication OAuth 2OpenID Connect Discovery |
10 | Swagger 2.0provides definitions , parameters, responses | Open API spec 3.0 provides components object which can contain schemas, parameters, responses, examples, security schemes, links, request bodies, headers and callbacks |
11 | Swagger 2.0 support MIME types | Openapi 3.0 support MIME types in a single spec. |
Structural Differences between swagger 2.0 vs opeapi 3.0

Ref Link– https://blog.readme.com/an-example-filled-guide-to-swagger-3-2/
Image courtesy of Admin | APISetu | Blog