From 99e98876dc22c19f4929510c4470a9de05dba26f Mon Sep 17 00:00:00 2001 From: p1c2u Date: Sun, 9 Jul 2023 20:45:54 +0100 Subject: [PATCH] Update docs with base_uri examples --- README.rst | 2 +- docs/index.rst | 2 +- docs/python.rst | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index adce3a4..10f6eb5 100644 --- a/README.rst +++ b/README.rst @@ -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) diff --git a/docs/index.rst b/docs/index.rst index ca43e04..83ea8f7 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -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) diff --git a/docs/python.rst b/docs/python.rst index aa22442..bb13a26 100644 --- a/docs/python.rst +++ b/docs/python.rst @@ -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) @@ -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: