diff --git a/CHANGELOG b/CHANGELOG
index 1624c2b..c55f47a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+Version 1.1.0 (2015-08-24)
+-------------
+ * Validate crossrefs - #33, #34
+
 Version 1.0.12 (2015-07-02)
 -------------
  * Handle API level parameters - #29
diff --git a/swagger_spec_validator/__about__.py b/swagger_spec_validator/__about__.py
index 2ef8969..75e6007 100644
--- a/swagger_spec_validator/__about__.py
+++ b/swagger_spec_validator/__about__.py
@@ -7,7 +7,7 @@ __title__ = "swagger_spec_validator"
 __summary__ = "Validation of Swagger specifications"
 __uri__ = "http://github.com/Yelp/swagger_spec_validator"
 
-__version__ = "1.0.12"
+__version__ = "1.1.0"
 
 __author__ = "John Billings"
 __email__ = "billings@yelp.com"
diff --git a/swagger_spec_validator/util.py b/swagger_spec_validator/util.py
index 1975850..ff60fc3 100644
--- a/swagger_spec_validator/util.py
+++ b/swagger_spec_validator/util.py
@@ -44,7 +44,9 @@ def validate_spec_url(spec_url):
 
     :param spec_url:
       For Swagger 1.2, this is the URL to the resource listing in api-docs.
-      For Swagger 2.0, this is the URL to swagger.json in api-docs.
+      For Swagger 2.0, this is the URL to swagger.json in api-docs. If given
+                       as `file://` this must be an absolute url for
+                       cross-refs to work correctly.
     """
     spec_json = load_json(spec_url)
     validator = get_validator(spec_json, spec_url)
diff --git a/swagger_spec_validator/validator20.py b/swagger_spec_validator/validator20.py
index e1d1a94..4882f24 100644
--- a/swagger_spec_validator/validator20.py
+++ b/swagger_spec_validator/validator20.py
@@ -21,16 +21,17 @@ def validate_spec_url(spec_url):
     :raises: :py:class:`swagger_spec_validator.SwaggerValidationError`
     """
     log.info('Validating %s' % spec_url)
-    validate_spec(load_json(spec_url))
+    validate_spec(load_json(spec_url), spec_url)
 
 
-def validate_spec(spec_json, _spec_url=None):
+def validate_spec(spec_json, spec_url=None):
     """Validates a Swagger 2.0 API Specification given a Swagger Spec.
 
     :param spec_json: the json dict of the swagger spec.
     :type spec_json: dict
-    :param _spec_url: url serving the spec json (currently not used)
-    :type _spec_url: string
+    :param spec_url: url serving the spec json. Used for dereferencing
+                     relative refs. eg: file:///foo/swagger.json
+    :type spec_url: string
     :returns: `None` in case of success, otherwise raises an exception.
     :raises: :py:class:`swagger_spec_validator.SwaggerValidationError`
     """
@@ -38,7 +39,8 @@ def validate_spec(spec_json, _spec_url=None):
 
     # Dereference all $refs so we don't have to deal with them
     fix_malformed_model_refs(spec_json)
-    spec_json = jsonref.JsonRef.replace_refs(spec_json)
+    spec_json = jsonref.JsonRef.replace_refs(spec_json,
+                                             base_uri=spec_url or '')
     replace_jsonref_proxies(spec_json)
 
     # TODO: Extract 'parameters', 'responses' from the spec as well.
@@ -159,7 +161,9 @@ def replace_jsonref_proxies(obj):
                     fragment[k] = v.__subject__
                 descend(fragment[k])
         elif isinstance(fragment, list):
-            for element in fragment:
+            for index, element in enumerate(fragment):
+                if isinstance(element, jsonref.JsonRef):
+                    fragment[index] = element.__subject__
                 descend(element)
 
     descend(obj)

Make use of spec_url being passed to `validate_spec`
`spec_url` [here](https://github.com/Yelp/swagger_spec_validator/blob/master/swagger_spec_validator/validator20.py#L27) is not getting used as of now. Use it to resolve `$ref`s.
diff --git a/tests/data/v2.0/pingpong.json b/tests/data/v2.0/pingpong.json
new file mode 100644
index 0000000..541d9ee
--- /dev/null
+++ b/tests/data/v2.0/pingpong.json
@@ -0,0 +1,21 @@
+{
+  "ping": {
+    "get": {
+      "operationId": "ping",
+      "parameters": [
+          {
+            "name": "pung",
+            "in": "query",
+            "description": "true or false",
+            "type": "boolean"
+          }
+      ],
+      "responses": {
+        "200": {
+          "description": "Successful response"
+        }
+      }
+    }
+  }
+}
+
diff --git a/tests/data/v2.0/relative_ref.json b/tests/data/v2.0/relative_ref.json
new file mode 100644
index 0000000..0c9f600
--- /dev/null
+++ b/tests/data/v2.0/relative_ref.json
@@ -0,0 +1,19 @@
+{
+  "swagger": "2.0",
+  "info": {
+    "version": "1.0.0",
+    "title": "Simple"
+  },
+  "tags": [
+      {
+          "name": "pingpong",
+          "description": "pingpong related specs"
+      }
+  ],
+  "paths": {
+    "/ping": {
+        "$ref": "pingpong.json#/ping"
+    }
+  }
+}
+
diff --git a/tests/validator20/validate_spec_url_test.py b/tests/validator20/validate_spec_url_test.py
index 890d7d2..4112eeb 100644
--- a/tests/validator20/validate_spec_url_test.py
+++ b/tests/validator20/validate_spec_url_test.py
@@ -1,5 +1,6 @@
 import json
 import mock
+import os
 import pytest
 
 from swagger_spec_validator.common import SwaggerValidationError
@@ -14,6 +15,13 @@ def test_success(petstore_contents):
         mock_load_json.assert_called_once_with('http://localhost/api-docs')
 
 
+def test_success_crossref_url():
+    my_dir = os.path.abspath(os.path.dirname(__file__))
+    urlpath = "file://{0}".format(os.path.join(
+        my_dir, "../data/v2.0/relative_ref.json"))
+    validate_spec_url(urlpath)
+
+
 def test_raise_SwaggerValidationError_on_urlopen_error():
     with pytest.raises(SwaggerValidationError) as excinfo:
         validate_spec_url('http://foo')

pip install -e .[dev]
parse_log_pytest
pytest
pytest flake8 mock coverage
3.9
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==25.3.0
coverage==7.8.0
exceptiongroup @ file:///croot/exceptiongroup_1706031385326/work
flake8==7.2.0
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
jsonref==1.1.0
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
mccabe==0.7.0
mock==5.2.0
packaging @ file:///croot/packaging_1734472117206/work
pluggy @ file:///croot/pluggy_1733169602837/work
pycodestyle==2.13.0
pyflakes==3.3.2
pytest @ file:///croot/pytest_1738938843180/work
referencing==0.36.2
rpds-py==0.24.0
six==1.17.0
-e git+https://github.com/Yelp/swagger_spec_validator.git@0d6a8a94a5ce2ea1a5b19bd9a07cad85192b038c#egg=swagger_spec_validator
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work
typing_extensions==4.13.0

name: swagger_spec_validator
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - exceptiongroup=1.2.0=py39h06a4308_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - packaging=24.2=py39h06a4308_0
  - pip=25.0=py39h06a4308_0
  - pluggy=1.5.0=py39h06a4308_0
  - pytest=8.3.4=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py39h06a4308_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==25.3.0
      - coverage==7.8.0
      - flake8==7.2.0
      - jsonref==1.1.0
      - jsonschema==4.23.0
      - jsonschema-specifications==2024.10.1
      - mccabe==0.7.0
      - mock==5.2.0
      - pycodestyle==2.13.0
      - pyflakes==3.3.2
      - referencing==0.36.2
      - rpds-py==0.24.0
      - six==1.17.0
      - typing-extensions==4.13.0
prefix: /opt/conda/envs/swagger_spec_validator

tests/validator20/validate_spec_url_test.py::test_success_crossref_url
tests/validator20/validate_spec_url_test.py::test_raise_SwaggerValidationError_on_urlopen_error
tests/validator20/validate_spec_url_test.py::test_success
swagger_spec_validator/validator20.py swagger_spec_validator/__about__.py CHANGELOG swagger_spec_validator/util.py
swagger_spec_validator/validator20.py swagger_spec_validator/__about__.py CHANGELOG swagger_spec_validator/util.py