Skip to content

Commit 9727d9f

Browse files
committed
python-openapi/openapi-core#296: Extend readme for OpenAPI 3.1 support
1 parent 7682383 commit 9727d9f

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

README.rst

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@ About
1919
#####
2020

2121
OpenAPI Spec Validator is a Python library that validates OpenAPI Specs
22-
against the `OpenAPI 2.0 (aka
23-
Swagger) <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md>`__
24-
and `OpenAPI
25-
3.0 <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md>`__
26-
specification. The validator aims to check for full compliance with the
27-
Specification.
22+
against the `OpenAPI 2.0 (aka Swagger)
23+
<https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md>`__,
24+
`OpenAPI 3.0 <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md>`__
25+
and `OpenAPI 3.1 <https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md>`__
26+
specification. The validator aims to check for full compliance with the Specification.
2827

2928
Installation
3029
############
@@ -73,7 +72,7 @@ or more pythonic way:
7372
Examples
7473
********
7574

76-
By default, OpenAPI v3 syntax is expected. To validate an OpenAPI v3 spec:
75+
By default, OpenAPI v3.1 syntax is expected. To validate an OpenAPI v3.1 spec:
7776

7877
.. code:: python
7978
@@ -91,7 +90,11 @@ By default, OpenAPI v3 syntax is expected. To validate an OpenAPI v3 spec:
9190
...
9291
OpenAPIValidationError: 'openapi' is a required property
9392
94-
In order to validate a Swagger / OpenAPI 2.0 spec file, import ``validate_v2_spec`` instead of ``validate_spec``. You can also explicitly import ``validate_v3_spec`` if you want to disambiguate the expected version.
93+
In order to validate a Swagger / OpenAPI 2.0 spec file, import ``validate_v2_spec`` instead of ``validate_spec``.
94+
In order to validate a OpenAPI 3.0 spec file, import ``validate_v30_spec`` instead of ``validate_spec``.
95+
96+
You can also explicitly import ``validate_v31_spec`` if you want to disambiguate the expected version or
97+
explicitly import ``validate_v3_spec` which is a shortcut to the latest v3 release.
9598
9699
Add ``spec_url`` to validate spec with relative files:
97100

0 commit comments

Comments
 (0)