You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,7 @@ or more pythonic way:
73
73
Examples
74
74
********
75
75
76
-
Validate spec:
76
+
By default, OpenAPI v3 syntax is expected. To validate an OpenAPI v3 spec:
77
77
78
78
.. code:: python
79
79
@@ -90,6 +90,8 @@ Validate spec:
90
90
Traceback (most recent call last):
91
91
...
92
92
OpenAPIValidationError: 'openapi'is a required property
93
+
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
95
94
96
Add ``spec_url`` to validate spec with relative files:
0 commit comments