code: def _validate_auth(self, path, obj, _):
          
          errs = []
  
          if obj.type == 'apiKey':
              if not obj.passAs:
                  errs.append('need "passAs" for apiKey')
              if not obj.keyname:
                  errs.append('need "keyname" for apiKey')
  
          elif obj.type == 'oauth2':
              if not obj.grantTypes:
                  errs.append('need "grantTypes" for oauth2')
  
          return path, obj.__class__.__name__, errs
docs: validate that apiKey and oauth2 requirements