Skip to content

Commit

Permalink
Update docs with base_uri examples
Browse files Browse the repository at this point in the history
  • Loading branch information
p1c2u committed Jul 9, 2023
1 parent db40da1 commit 99e9887
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Python package
from openapi_spec_validator import validate_spec
from openapi_spec_validator.readers import read_from_filename
spec_dict, spec_url = read_from_filename('openapi.yaml')
spec_dict, base_uri = read_from_filename('openapi.yaml')
# If no exception is raised by validate_spec(), the spec is valid.
validate_spec(spec_dict)
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Usage
from openapi_spec_validator import validate_spec
from openapi_spec_validator.readers import read_from_filename
spec_dict, spec_url = read_from_filename('openapi.yaml')
spec_dict, base_uri = read_from_filename('openapi.yaml')
# If no exception is raised by validate_spec(), the spec is valid.
validate_spec(spec_dict)
Expand Down
6 changes: 3 additions & 3 deletions docs/python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ By default, OpenAPI spec version is detected. To validate spec:
from openapi_spec_validator import validate_spec
from openapi_spec_validator.readers import read_from_filename
spec_dict, spec_url = read_from_filename('openapi.yaml')
spec_dict, base_uri = read_from_filename('openapi.yaml')
# If no exception is raised by validate_spec(), the spec is valid.
validate_spec(spec_dict)
Expand All @@ -19,11 +19,11 @@ By default, OpenAPI spec version is detected. To validate spec:
...
OpenAPIValidationError: 'info' is a required property
Add ``spec_url`` to validate spec with relative files:
Add ``base_uri`` to validate spec with relative files:

.. code:: python
validate_spec(spec_dict, spec_url='file:///path/to/spec/openapi.yaml')
validate_spec(spec_dict, base_uri='file:///path/to/spec/openapi.yaml')
You can also validate spec from url:

Expand Down

0 comments on commit 99e9887

Please sign in to comment.