original_docstring: Validate the schema
  
      Validations performed:
          Values of default data (if any)
          Existence of dynamic modules
          Enums keyed by string value
  
      Args:
          schema (pkcollections.Dict): app schema
      
docstring: Validate the schema
  Validations performed:
  Values of default data (if any)
  Existence of dynamic modules
  Enums keyed by string value
docstring_tokens: Validate the schema Validations performed : Values of default data ( if any ) Existence of dynamic modules Enums keyed by string value
code: def validate(schema):
      """Validate the schema
  
      Validations performed:
          Values of default data (if any)
          Existence of dynamic modules
          Enums keyed by string value
  
      Args:
          schema (pkcollections.Dict): app schema
      """
      sch_models = schema.model
      sch_enums = schema.enum
      sch_ntfy = schema.notifications
      sch_cookies = schema.cookies
      for name in sch_enums:
          for values in sch_enums[name]:
              if not isinstance(values[0], pkconfig.STRING_TYPES):
                  raise AssertionError(util.err(name, 'enum values must be keyed by a string value: {}', type(values[0])))
      for model_name in sch_models:
          sch_model = sch_models[model_name]
          for field_name in sch_model:
              sch_field_info = sch_model[field_name]
              if len(sch_field_info) <= 2:
                  continue
              field_default = sch_field_info[2]
              if field_default == '' or field_default is None:
                  continue
              _validate_enum(field_default, sch_field_info, sch_enums)
              _validate_number(field_default, sch_field_info)
      for n in sch_ntfy:
          if 'cookie' not in sch_ntfy[n] or sch_ntfy[n].cookie not in sch_cookies:
              raise AssertionError(util.err(sch_ntfy[n], 'notification must reference a cookie in the schema'))
      for sc in sch_cookies:
          _validate_cookie_def(sch_cookies[sc])
      for type in schema.dynamicModules:
          for src in schema.dynamicModules[type]:
              pkresource.filename(src[1:])
code_tokens: def validate ( schema ) : sch_models = schema . model sch_enums = schema . enum sch_ntfy = schema . notifications sch_cookies = schema . cookies for name in sch_enums : for values in sch_enums [ name ] : if not isinstance ( values [ 0 ] , pkconfig . STRING_TYPES ) : raise AssertionError ( util . err ( name , 'enum values must be keyed by a string value: {}' , type ( values [ 0 ] ) ) ) for model_name in sch_models : sch_model = sch_models [ model_name ] for field_name in sch_model : sch_field_info = sch_model [ field_name ] if len ( sch_field_info ) <= 2 : continue field_default = sch_field_info [ 2 ] if field_default == '' or field_default is None : continue _validate_enum ( field_default , sch_field_info , sch_enums ) _validate_number ( field_default , sch_field_info ) for n in sch_ntfy : if 'cookie' not in sch_ntfy [ n ] or sch_ntfy [ n ] . cookie not in sch_cookies : raise AssertionError ( util . err ( sch_ntfy [ n ] , 'notification must reference a cookie in the schema' ) ) for sc in sch_cookies : _validate_cookie_def ( sch_cookies [ sc ] ) for type in schema . dynamicModules : for src in schema . dynamicModules [ type ] : pkresource . filename ( src [ 1 : ] )
short_docstring: Validate the schema
  Validations performed:
  Values of default data (if any)
  Existence of dynamic modules
  Enums keyed by string value
short_docstring_tokens: Validate the schema Validations performed : Values of default data ( if any ) Existence of dynamic modules Enums keyed by string value
comment: """Validate the schema
  
      Validations performed:
          Values of default data (if any)
          Existence of dynamic modules
          Enums keyed by string value
  
      Args:
          schema (pkcollections.Dict): app schema
      """