@requires_auth('home')
def schema_collection_endpoint():
 schemas = {}
 for (resource_name, resource_config) in app.config['DOMAIN'].items():
  if resource_name.endswith(config.VERSIONS):
   continue
  internal = resource_config.get('internal_resource', False)
  if internal:
   continue
  auth = resource_auth(resource_name)
  if (auth and (request.method not in resource_config['public_methods'])):
   roles = list(resource_config['allowed_roles'])
   roles += resource_config['allowed_read_roles']
   if (not auth.authorized(roles, resource_name, request.method)):
    continue
  schemas[resource_name] = resource_config['schema']
 return send_response(None, (schemas,))

@ requires_auth ( 'home' ) def schema_collection_endpoint ( ) : schemas = { } for ( resource_name , resource_config ) in app . config [ 'DOMAIN' ] . items ( ) : if resource_name . endswith ( config . VERSIONS ) : continue internal = resource_config . get ( 'internal_resource' , False ) if internal : continue auth = resource_auth ( resource_name ) if ( auth and ( request . method not in resource_config [ 'public_methods' ] ) ) : roles = list ( resource_config [ 'allowed_roles' ] ) roles += resource_config [ 'allowed_read_roles' ] if ( not auth . authorized ( roles , resource_name , request . method ) ) : continue schemas [ resource_name ] = resource_config [ 'schema' ] return send_response ( None , ( schemas , ) )
this endpoint is active when schema_endpoint != none .