diff --git a/swagger_spec_validator/validator20.py b/swagger_spec_validator/validator20.py
index fe17ded..77920c1 100644
--- a/swagger_spec_validator/validator20.py
+++ b/swagger_spec_validator/validator20.py
@@ -7,6 +7,7 @@ from __future__ import unicode_literals
 import functools
 import logging
 import string
+from collections import defaultdict
 
 from jsonschema.validators import Draft4Validator
 from jsonschema.validators import RefResolver
@@ -196,6 +197,8 @@ def validate_apis(apis, deref):
     :raises: :py:class:`swagger_spec_validator.SwaggerValidationError`
     :raises: :py:class:`jsonschema.exceptions.ValidationError`
     """
+    operation_tag_to_operation_id_set = defaultdict(set)
+
     for api_name, api_body in iteritems(apis):
         api_body = deref(api_body)
         api_params = deref(api_body.get('parameters', []))
@@ -206,6 +209,20 @@ def validate_apis(apis, deref):
             if oper_name == 'parameters' or oper_name.startswith('x-'):
                 continue
             oper_body = deref(api_body[oper_name])
+            oper_tags = deref(oper_body.get('tags', [None]))
+
+            # Check that, if this operation has an operationId defined,
+            # no other operation with a same tag also has that
+            # operationId.
+            operation_id = oper_body.get('operationId')
+            if operation_id is not None:
+                for oper_tag in oper_tags:
+                    if operation_id in operation_tag_to_operation_id_set[oper_tag]:
+                        raise SwaggerValidationError(
+                            "Duplicate operationId: {}".format(operation_id)
+                        )
+                    operation_tag_to_operation_id_set[oper_tag].add(operation_id)
+
             oper_params = deref(oper_body.get('parameters', []))
             validate_duplicate_param(oper_params, deref)
             all_path_params = list(set(

Validator does not check uniqueness of operation ids
According to the Swagger spec, the `operationId` of an operation object is:

> Unique string used to identify the operation. The id MUST be unique among all operations described in the API. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is recommended to follow common programming naming conventions.

The validator does not currently check that `operationId`s are unique across the API.  This would be a helpful feature because some codegen tools fail if this constraint is not met.
diff --git a/tests/validator20/validate_apis_test.py b/tests/validator20/validate_apis_test.py
index 56f1e14..d1198d6 100644
--- a/tests/validator20/validate_apis_test.py
+++ b/tests/validator20/validate_apis_test.py
@@ -152,3 +152,91 @@ def test_api_check_default_fails(partial_parameter_spec, validator, instance):
     validation_error = excinfo.value.args[1]
     assert validation_error.instance == instance
     assert validation_error.validator == validator
+
+
+@pytest.mark.parametrize(
+    'apis',
+    [
+        {
+            '/api': {
+                'get': {
+                    'operationId': 'duplicateOperationId',
+                    'responses': {},
+                },
+                'post': {
+                    'operationId': 'duplicateOperationId',
+                    'responses': {},
+                },
+            },
+        },
+        {
+            '/api1': {
+                'get': {
+                    'operationId': 'duplicateOperationId',
+                    'responses': {},
+                },
+            },
+            '/api2': {
+                'get': {
+                    'operationId': 'duplicateOperationId',
+                    'responses': {},
+                },
+            },
+        },
+        {
+            '/api1': {
+                'get': {
+                    'operationId': 'duplicateOperationId',
+                    'tags': ['tag1', 'tag2'],
+                    'responses': {},
+                },
+            },
+            '/api2': {
+                'get': {
+                    'operationId': 'duplicateOperationId',
+                    'tags': ['tag1'],
+                    'responses': {},
+                },
+            },
+        },
+    ]
+)
+def test_duplicate_operationIds_fails(apis):
+    with pytest.raises(SwaggerValidationError) as excinfo:
+        validate_apis(apis, lambda x: x)
+
+    swagger_validation_error = excinfo.value
+    error_message = swagger_validation_error.args[0]
+
+    assert error_message == "Duplicate operationId: duplicateOperationId"
+
+
+@pytest.mark.parametrize(
+    'apis',
+    [
+        {
+            '/api1': {
+                'get': {
+                    'operationId': 'duplicateOperationId',
+                    'tags': ['tag1'],
+                    'responses': {},
+                },
+            },
+            '/api2': {
+                'get': {
+                    'operationId': 'duplicateOperationId',
+                    'tags': ['tag2'],
+                    'responses': {},
+                },
+            },
+            '/api3': {
+                'get': {
+                    'operationId': 'duplicateOperationId',
+                    'responses': {},
+                },
+            },
+        },
+    ]
+)
+def test_duplicate_operationIds_succeeds_if_tags_differ(apis):
+    validate_apis(apis, lambda x: x)
diff --git a/tests/validator20/validate_rich_spec_test.py b/tests/validator20/validate_rich_spec_test.py
index 593b9c0..0f5df04 100644
--- a/tests/validator20/validate_rich_spec_test.py
+++ b/tests/validator20/validate_rich_spec_test.py
@@ -36,10 +36,11 @@ def test_failure_on_duplicate_operation_parameters(swagger_spec):
 
 
 def test_failure_on_unresolvable_path_parameter(swagger_spec):
-    swagger_spec['paths']['/pet/{foo}'] = swagger_spec['paths']['/pet']
+    swagger_spec['paths']['/pet/{petId}']['get']['parameters'] = []
+
     with pytest.raises(SwaggerValidationError) as exc_info:
         validate_spec(swagger_spec)
-    assert "Path parameter 'foo' used is not documented on '/pet/{foo}'" in str(exc_info.value)
+    assert "Path parameter 'petId' used is not documented on '/pet/{petId}'" in str(exc_info.value)
 
 
 def test_failure_on_path_parameter_used_but_not_defined(swagger_spec):

pip install -e .[dev]
parse_log_pytest
requirements.txt
3.6
requirements-dev.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
certifi==2021.5.30
httpretty==1.1.4
importlib-metadata==4.8.3
iniconfig==1.1.1
jsonschema==3.2.0
mock==5.2.0
packaging==21.3
pluggy==1.0.0
py==1.11.0
pyparsing==3.1.4
pyrsistent==0.18.0
pytest==7.0.1
PyYAML==6.0.1
six==1.17.0
-e git+https://github.com/Yelp/swagger_spec_validator.git@40e1cc926775777ff2d56e271fd61697c6235579#egg=swagger_spec_validator
tomli==1.2.3
typing_extensions==4.1.1
zipp==3.6.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
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - 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=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - httpretty==1.1.4
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - jsonschema==3.2.0
      - mock==5.2.0
      - packaging==21.3
      - pluggy==1.0.0
      - py==1.11.0
      - pyparsing==3.1.4
      - pyrsistent==0.18.0
      - pytest==7.0.1
      - pyyaml==6.0.1
      - six==1.17.0
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - zipp==3.6.0
prefix: /opt/conda/envs/swagger_spec_validator

tests/validator20/validate_apis_test.py::test_duplicate_operationIds_fails[apis0] tests/validator20/validate_apis_test.py::test_duplicate_operationIds_fails[apis1] tests/validator20/validate_apis_test.py::test_duplicate_operationIds_fails[apis2]
tests/validator20/validate_apis_test.py::test_api_check_default_succeed[partial_parameter_spec0] tests/validator20/validate_apis_test.py::test_api_check_default_succeed[partial_parameter_spec1] tests/validator20/validate_apis_test.py::test_api_check_default_succeed[partial_parameter_spec2] tests/validator20/validate_apis_test.py::test_api_check_default_succeed[partial_parameter_spec3] tests/validator20/validate_apis_test.py::test_api_check_default_succeed[partial_parameter_spec4] tests/validator20/validate_apis_test.py::test_api_check_default_succeed[partial_parameter_spec5] tests/validator20/validate_apis_test.py::test_api_check_default_succeed[partial_parameter_spec6] tests/validator20/validate_apis_test.py::test_api_check_default_succeed[partial_parameter_spec7] tests/validator20/validate_apis_test.py::test_api_check_default_succeed[partial_parameter_spec8] tests/validator20/validate_apis_test.py::test_api_check_default_succeed[partial_parameter_spec9] tests/validator20/validate_apis_test.py::test_api_check_default_succeed[partial_parameter_spec10] tests/validator20/validate_apis_test.py::test_api_check_default_fails[partial_parameter_spec0-type-wrong_type] tests/validator20/validate_apis_test.py::test_api_check_default_fails[partial_parameter_spec1-type-wrong_type] tests/validator20/validate_apis_test.py::test_api_check_default_fails[partial_parameter_spec2-type-wrong_type] tests/validator20/validate_apis_test.py::test_api_check_default_fails[partial_parameter_spec3-type-wrong_type] tests/validator20/validate_apis_test.py::test_api_check_default_fails[partial_parameter_spec4-type-wrong_type] tests/validator20/validate_apis_test.py::test_api_check_default_fails[partial_parameter_spec5-type-wrong_type] tests/validator20/validate_apis_test.py::test_api_check_default_fails[partial_parameter_spec6-type--1] tests/validator20/validate_apis_test.py::test_api_check_default_fails[partial_parameter_spec7-minLength-short_string] tests/validator20/validate_apis_test.py::test_api_check_default_fails[partial_parameter_spec8-type-not_a_number_or_boolean] tests/validator20/validate_rich_spec_test.py::test_failure_on_duplicate_api_parameters tests/validator20/validate_rich_spec_test.py::test_failure_on_duplicate_operation_parameters tests/validator20/validate_rich_spec_test.py::test_failure_on_unresolvable_path_parameter tests/validator20/validate_rich_spec_test.py::test_failure_on_path_parameter_used_but_not_defined tests/validator20/validate_rich_spec_test.py::test_failure_on_unresolvable_ref_of_props_required_list
tests/validator20/validate_apis_test.py::test_api_level_params_ok tests/validator20/validate_apis_test.py::test_api_level_x_hyphen_ok tests/validator20/validate_apis_test.py::test_duplicate_operationIds_succeeds_if_tags_differ[apis0] tests/validator20/validate_rich_spec_test.py::test_failure_on_unresolvable_model_reference_from_model tests/validator20/validate_rich_spec_test.py::test_failure_on_unresolvable_model_reference_from_param tests/validator20/validate_rich_spec_test.py::test_failure_on_unresolvable_model_reference_from_resp
swagger_spec_validator/validator20.py
swagger_spec_validator/validator20.py