@Disp.register([GrantType])
    def _validate_granttype(self, path, obj, _):
        errs = []

        if not obj.implicit and not obj.authorization_code:
            errs.append('Either implicit or authorization_code should be defined.')

        return path, obj.__class__.__name__, errs
make sure either implicit or authorization_code is defined
dataset/ETHPy150Open mission-liao/pyswagger/pyswagger/scanner/v1_2/validate.py/Validate._validate_granttype