Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differences Between OpenAPI 2.0 and 3.0 #9

Open
ntk148v opened this issue Sep 4, 2021 · 0 comments
Open

Differences Between OpenAPI 2.0 and 3.0 #9

ntk148v opened this issue Sep 4, 2021 · 0 comments

Comments

@ntk148v
Copy link
Owner

ntk148v commented Sep 4, 2021


title: Differences Between OpenAPI 2.0 and 3.0
path: web-dev/openapi-2-and-3.md

Specification Restructured to Increase Reusability

image

Extended JSON Schema Support

The 3.0 release includes extended support for JSON Schema, which means you can use more JSON Schema keywords than with version 2.0. Some keywords supported in version 3.0 are handled slightly differently than in JSON Schema, including:

  • oneOf
  • anyOf
  • allOf

OpenAPI 2.0 does not support the oneOf or anyOf keywords, but you can use these keywords with version 3.0.

Examples Overhauled for Easy Reusability

Improved Parameter Descriptions

Version 3.0 includes improvements to parameter descriptions. The body and formData parameter types have been removed and replaced with requestBody. The specification supports arrays and objects in operation parameters, and you can specify the method of serialization. Operation parameters include path, query, header, and cookie.

More

Source: https://blog.stoplight.io/difference-between-open-v2-v3-v31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant