We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c40cb75 commit 3515b77Copy full SHA for 3515b77
openapi_spec_validator/__main__.py
@@ -1,8 +1,10 @@
1
import logging
2
import argparse
3
import os
4
+import pathlib
5
import sys
6
7
+
8
from openapi_spec_validator import validate_spec_url, validate_v2_spec_url
9
from openapi_spec_validator.exceptions import ValidationError
10
@@ -33,7 +35,7 @@ def main(args=None):
33
35
validate_url = validate_spec_url
34
36
# validate
37
try:
- validate_url('file://'+filename)
38
+ validate_url(pathlib.Path(filename).as_uri())
39
except ValidationError as e:
40
print(e)
41
sys.exit(1)
0 commit comments