code: public JType generate(JCodeModel codeModel, String className, String packageName, URL schemaUrl) {
  
          JPackage jpackage = codeModel._package(packageName);
  
          ObjectNode schemaNode = readSchema(schemaUrl);
  
          return ruleFactory.getSchemaRule().apply(className, schemaNode, null, jpackage, new Schema(null, schemaNode, null));
  
      }
docs: Reads a schema and adds generated types to the given code model.
  
  @param codeModel
  the java code-generation context that should be used to
  generated new types
  @param className
  the name of the parent class the represented by this schema
  @param packageName
  the target package that should be used for generated types
  @param schemaUrl
  location of the schema to be used as input
  @return The top-most type generated from the given file
  @throws IOException
  if the schema content cannot be read