Helper function to help validate the convention established in the swagger file on how
        to handle response code mapping/integration

def _validate_error_response_model(self, paths, mods):
        '''
        Helper function to help validate the convention established in the swagger file on how
        to handle response code mapping/integration
        '''
        for path, ops in paths:
            for opname, opobj in six.iteritems(ops):
                if opname not in _Swagger.SWAGGER_OPERATION_NAMES:
                    continue

                if 'responses' not in opobj:
                    raise ValueError('missing mandatory responses field in path item object')
                for rescode, resobj in six.iteritems(opobj.get('responses')):
                    if not self._is_http_error_rescode(str(rescode)):  # future lint: disable=blacklisted-function
                        continue

                    # only check for response code from 400-599
                    if 'schema' not in resobj:
                        raise ValueError('missing schema field in path {0}, '
                                         'op {1}, response {2}'.format(path, opname, rescode))

                    schemaobj = resobj.get('schema')
                    if '$ref' not in schemaobj:
                        raise ValueError('missing $ref field under schema in '
                                         'path {0}, op {1}, response {2}'.format(path, opname, rescode))
                    schemaobjref = schemaobj.get('$ref', '/')
                    modelname = schemaobjref.split('/')[-1]

                    if modelname not in mods:
                        raise ValueError('model schema {0} reference not found '
                                         'under /definitions'.format(schemaobjref))
                    model = mods.get(modelname)

                    if model.get('type') != 'object':
                        raise ValueError('model schema {0} must be type object'.format(modelname))
                    if 'properties' not in model:
                        raise ValueError('model schema {0} must have properties fields'.format(modelname))

                    modelprops = model.get('properties')
                    if 'errorMessage' not in modelprops:
                        raise ValueError('model schema {0} must have errorMessage as a property to '
                                         'match AWS convention. If pattern is not set, .+ will '
                                         'be used'.format(modelname))