diff --git a/swagger_spec_validator/validator20.py b/swagger_spec_validator/validator20.py
index 69f9be5..118b676 100644
--- a/swagger_spec_validator/validator20.py
+++ b/swagger_spec_validator/validator20.py
@@ -512,12 +512,13 @@ def validate_definition(definition, deref, def_name=None, visited_definitions_id
             )
 
     if 'additionalProperties' in definition:
-        validate_definition(
-            definition=definition.get('additionalProperties'),
-            deref=deref,
-            def_name='{}/{}'.format(def_name, 'additionalProperties'),
-            visited_definitions_ids=visited_definitions_ids,
-        )
+        if definition.get('additionalProperties') not in (True, False):
+            validate_definition(
+                definition=definition.get('additionalProperties'),
+                deref=deref,
+                def_name='{}/additionalProperties'.format(def_name),
+                visited_definitions_ids=visited_definitions_ids,
+            )
 
     if 'discriminator' in definition:
         required_props, not_required_props = get_collapsed_properties_type_mappings(definition, deref)

validator errors when `additionalProperties: false`
#134 introduces a new code path that validates `additionalProperties`. However, it assumes that additionalProperties, if exists, is an  object

jsonschema allows for boolean values: https://json-schema.org/understanding-json-schema/reference/object.html
> The additionalProperties keyword may be either a boolean or an object. If additionalProperties is a boolean and set to false, no additional properties will be allowed.

Existing schemas with boolean values for additionalProperties are failing validation with:
` 'bool' object has no attribute 'get`

v2.5.0 validates successfully. v2.7.0 fails.
[swagger.txt](https://github.com/Yelp/swagger_spec_validator/files/4748947/swagger.txt)
diff --git a/tests/validator20/validate_spec_test.py b/tests/validator20/validate_spec_test.py
index 2d57f05..e9c006f 100644
--- a/tests/validator20/validate_spec_test.py
+++ b/tests/validator20/validate_spec_test.py
@@ -427,8 +427,6 @@ def test_highlight_inconsistent_schema_object_validation(minimal_swagger_dict, s
 
 def test_additional_properties_validated(minimal_swagger_dict, default_checks_spec_dict):
     invalid_spec = {'type': 'object', 'required': ['foo']}
-    minimal_swagger_dict['definitions']['injected_definition'] = invalid_spec
-
     minimal_swagger_dict['definitions']['injected_definition'] = {
         'type': 'object', 'additionalProperties': invalid_spec
     }
@@ -437,10 +435,16 @@ def test_additional_properties_validated(minimal_swagger_dict, default_checks_sp
         validate_spec(minimal_swagger_dict)
 
 
+def test_additional_properties_bool(minimal_swagger_dict, default_checks_spec_dict):
+    minimal_swagger_dict['definitions']['injected_definition'] = {
+        'type': 'object', 'additionalProperties': False,
+    }
+
+    validate_spec(minimal_swagger_dict)
+
+
 def test_array_items_validated(minimal_swagger_dict, default_checks_spec_dict):
     invalid_spec = {'type': 'object', 'required': ['foo']}
-    minimal_swagger_dict['definitions']['injected_definition'] = invalid_spec
-
     minimal_swagger_dict['definitions']['injected_definition'] = {
         'type': 'array', 'items': invalid_spec
     }

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio
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
coverage==6.2
execnet==1.9.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
pytest-asyncio==0.16.0
pytest-cov==4.0.0
pytest-mock==3.6.1
pytest-xdist==3.0.2
PyYAML==6.0.1
six==1.17.0
-e git+https://github.com/Yelp/swagger_spec_validator.git@fcc76043ada7bef905e3b01d55fea830347fa6e0#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
      - coverage==6.2
      - execnet==1.9.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
      - pytest-asyncio==0.16.0
      - pytest-cov==4.0.0
      - pytest-mock==3.6.1
      - pytest-xdist==3.0.2
      - 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_spec_test.py::test_additional_properties_bool
tests/validator20/validate_spec_test.py::test_success tests/validator20/validate_spec_test.py::test_definitons_not_present_success tests/validator20/validate_spec_test.py::test_empty_definitions_success tests/validator20/validate_spec_test.py::test_api_parameters_as_refs tests/validator20/validate_spec_test.py::test_fails_on_invalid_external_ref_in_dict tests/validator20/validate_spec_test.py::test_fails_on_invalid_external_ref_in_list tests/validator20/validate_spec_test.py::test_recursive_ref tests/validator20/validate_spec_test.py::test_recursive_ref_failure tests/validator20/validate_spec_test.py::test_complicated_refs tests/validator20/validate_spec_test.py::test_specs_with_discriminator tests/validator20/validate_spec_test.py::test_specs_with_discriminator_fail_because_not_required tests/validator20/validate_spec_test.py::test_specs_with_discriminator_fail_because_not_string tests/validator20/validate_spec_test.py::test_specs_with_discriminator_fail_because_not_in_properties tests/validator20/validate_spec_test.py::test_specs_with_discriminator_in_allOf tests/validator20/validate_spec_test.py::test_specs_with_discriminator_in_allOf_fail_because_not_required tests/validator20/validate_spec_test.py::test_specs_with_discriminator_in_allOf_fail_because_not_string tests/validator20/validate_spec_test.py::test_specs_with_discriminator_in_allOf_fail_because_not_in_properties tests/validator20/validate_spec_test.py::test_read_yaml_specs tests/validator20/validate_spec_test.py::test_valid_specs_with_check_of_default_types[property_spec0] tests/validator20/validate_spec_test.py::test_valid_specs_with_check_of_default_types[property_spec1] tests/validator20/validate_spec_test.py::test_valid_specs_with_check_of_default_types[property_spec2] tests/validator20/validate_spec_test.py::test_valid_specs_with_check_of_default_types[property_spec3] tests/validator20/validate_spec_test.py::test_valid_specs_with_check_of_default_types[property_spec4] tests/validator20/validate_spec_test.py::test_valid_specs_with_check_of_default_types[property_spec5] tests/validator20/validate_spec_test.py::test_valid_specs_with_check_of_default_types[property_spec6] tests/validator20/validate_spec_test.py::test_valid_specs_with_check_of_default_types[property_spec7] tests/validator20/validate_spec_test.py::test_valid_specs_with_check_of_default_types[property_spec8] tests/validator20/validate_spec_test.py::test_valid_specs_with_check_of_default_types[property_spec9] tests/validator20/validate_spec_test.py::test_valid_specs_with_check_of_default_types[property_spec10] tests/validator20/validate_spec_test.py::test_failure_due_to_wrong_default_type[property_spec0-type-wrong_type] tests/validator20/validate_spec_test.py::test_failure_due_to_wrong_default_type[property_spec1-type-wrong_type] tests/validator20/validate_spec_test.py::test_failure_due_to_wrong_default_type[property_spec2-type-wrong_type] tests/validator20/validate_spec_test.py::test_failure_due_to_wrong_default_type[property_spec3-type-wrong_type] tests/validator20/validate_spec_test.py::test_failure_due_to_wrong_default_type[property_spec4-type-wrong_type] tests/validator20/validate_spec_test.py::test_failure_due_to_wrong_default_type[property_spec5-type-wrong_type] tests/validator20/validate_spec_test.py::test_failure_due_to_wrong_default_type[property_spec6-type--1] tests/validator20/validate_spec_test.py::test_failure_due_to_wrong_default_type[property_spec7-minLength-short_string] tests/validator20/validate_spec_test.py::test_failure_due_to_wrong_default_type[property_spec8-type-not_a_number_or_boolean] tests/validator20/validate_spec_test.py::test_failure_due_to_wrong_default_type[property_spec9-enum-not_valid] tests/validator20/validate_spec_test.py::test_ref_without_str_argument tests/validator20/validate_spec_test.py::test_failure_because_references_in_operation_responses tests/validator20/validate_spec_test.py::test_type_array_with_items_succeed_validation tests/validator20/validate_spec_test.py::test_type_array_without_items_succeed_fails[swagger_dict_override0] tests/validator20/validate_spec_test.py::test_highlight_inconsistent_schema_object_validation[swagger_dict_override0] tests/validator20/validate_spec_test.py::test_highlight_inconsistent_schema_object_validation[swagger_dict_override1] tests/validator20/validate_spec_test.py::test_highlight_inconsistent_schema_object_validation[swagger_dict_override2] tests/validator20/validate_spec_test.py::test_highlight_inconsistent_schema_object_validation[swagger_dict_override3] tests/validator20/validate_spec_test.py::test_highlight_inconsistent_schema_object_validation[swagger_dict_override4] tests/validator20/validate_spec_test.py::test_additional_properties_validated tests/validator20/validate_spec_test.py::test_array_items_validated
swagger_spec_validator/validator20.py
swagger_spec_validator/validator20.py