def _validate(self):

        v_mod = utils.import_string('.'.join([
            'pyswagger',
            'scanner',
            'v' + self.version.replace('.', '_'),
            'validate'
        ]))

        if not v_mod:
            # there is no validation module
            # for this version of spec
            return []

        s = Scanner(self)
        v = v_mod.Validate()

        s.scan(route=[v], root=self.__raw)
        return v.errs
check if this Swagger API valid or not.
dataset/ETHPy150Open mission-liao/pyswagger/pyswagger/core.py/SwaggerApp._validate