# Path: falconswagger/exceptions.py
# class ModelBaseError(FalconSwaggerError):
#     def __init__(self, message, input_=None):
#         FalconSwaggerError.__init__(self, message, HTTP_BAD_REQUEST)
#         self.input_ = input_


from falconswagger.exceptions import ModelBaseError
from jsonschema import ValidationError
from copy import deepcopy
import json
                values = [cls._build_value(
                    value, items_schema, nested_types, input_) for value in values]

            elif isinstance(items_schema, list):
                if len(items_schema) != len(values):
                    raise ValidationError(
                        "size mismatch for items array '{}'".format(', '.join(values)),
                        instance=input_, schema=items_schema)
                values = [cls._build_value(value, schema, nested_types, input_) \
                            for value, schema in zip(values, items_schema)]

        return values

    def _build_value(cls, value, schema, nested_types, input_):
        type_ = schema['type']
        exception = ValidationError("invalid value '{}' for type '{}'".format(value, type_),
                                    instance=input_, schema=schema)
        if type_ == 'array' or type_ == 'object':
            try:
                return cls._type_builder(type_)(value, schema, nested_types, input_)
            except ValueError:
                raise exception

        try:
            return cls._type_builder(type_)(value)
        except ValueError:
            raise exception

    def _build_object(cls, value, schema, nested_types, input_):
        if 'object' in nested_types:

# Path: falconswagger/exceptions.py
# class ModelBaseError(FalconSwaggerError):
#     def __init__(self, message, input_=None):
#         FalconSwaggerError.__init__(self, message, HTTP_BAD_REQUEST)
#         self.input_ = input_


# Path: falconswagger/json_builder.py
from falconswagger.exceptions import ModelBaseError
from jsonschema import ValidationError
from copy import deepcopy
import json

                values = [cls._build_value(
                    value, items_schema, nested_types, input_) for value in values]

            elif isinstance(items_schema, list):
                if len(items_schema) != len(values):
                    raise ValidationError(
                        "size mismatch for items array '{}'".format(', '.join(values)),
                        instance=input_, schema=items_schema)
                values = [cls._build_value(value, schema, nested_types, input_) \
                            for value, schema in zip(values, items_schema)]

        return values

    def _build_value(cls, value, schema, nested_types, input_):
        type_ = schema['type']
        exception = ValidationError("invalid value '{}' for type '{}'".format(value, type_),
                                    instance=input_, schema=schema)
        if type_ == 'array' or type_ == 'object':
            try:
                return cls._type_builder(type_)(value, schema, nested_types, input_)
            except ValueError:
                raise exception

        try:
            return cls._type_builder(type_)(value)
        except ValueError:
            raise exception

    def _build_object(cls, value, schema, nested_types, input_):
        if 'object' in nested_types:

            raise ModelBaseError('nested object was not allowed', input_=input_)