anchor.diff:              list.write("\"$value\"");
               values.write(value);
             });
  -          tmp.write("    if ($variable != null && ![$list].contains($variable)) {\n");
  -          tmp.write("      paramErrors.add(\"Allowed values for $variable: $values\");\n");
  -          tmp.write("    }\n");
  -        }
  -        tmp.write("    if ($variable != null) $location[\"$name\"] = $variable;\n");
  -      });
  -    }
  -
  -    tmp.write("""
  +          sink.write("    if ($variable != null && ![$list].contains($variable)) {\n");
  +          sink.write("      paramErrors.add(\"Allowed values for $variable: $values\");\n");
  +          sink.write("    }\n");
  +        }
  +        sink.write("    if ($variable != null) $location[\"$name\"] = $variable;\n");
  +      });
  +    }
  +
  +    sink.write("""
       if (optParams != null) {
         optParams.forEach((key, value) {
           if (value != null && queryParams[key] == null) {
  
positive.code:         if (type != null) {
            String propName = escapeProperty(cleanName(key));
            String jsonName = key.replaceAll("\$", "\\\$");
            tmp.write("    if (json.containsKey(\"$jsonName\")) {\n");
            if (array) {
              tmp.write("      $propName = [];\n");
              tmp.write("      json[\"$jsonName\"].forEach((item) {\n");
              if (object) {
                tmp.write("        $propName.add(new $type.fromJson(item));\n");
              } else {
                tmp.write("        $propName.add(item);\n");
              }
              tmp.write("      });\n");
            } else {
              if (object) {
                tmp.write("      $propName = new $type.fromJson(json[\"$jsonName\"]);\n");
              } else {
                if(schemaType=="string" && schemaFormat == "int64") {
                  tmp.write("      if(json[\"$jsonName\"] is core.String){\n");
                  tmp.write("        $propName = core.int.parse(json[\"$jsonName\"]);\n");
                  tmp.write("      }else{\n");
                  tmp.write("        $propName = json[\"$jsonName\"];\n");
                  tmp.write("      }\n");
                }else{
                  tmp.write("      $propName = json[\"$jsonName\"];\n");
                }
              }
            }
            tmp.write("    }\n");
          }
        });
      }
      tmp.write("  }\n\n");
  
      tmp.write("  /** Create JSON Object for $name */\n");
      tmp.write("  core.Map toJson() {\n");
      tmp.write("    var output = new core.Map();\n\n");
      if (data.containsKey("properties")) {
        data["properties"].forEach((key, property) {
          var schemaType = property["type"];
  
negative.code: 
      writeString("$libFolder/$srcFolder/client/client.dart", _createClientClass);
  
      writeFile("$libFolder/$srcFolder/client/schemas.dart", _writeSchemas);
  
      writeFile("$libFolder/$srcFolder/client/resources.dart", _writeResources);
  
      // Create browser versions of the libraries
      writeString("$libFolder/$_libraryBrowserName.dart", _createBrowserLibrary(srcFolder));
  
      writeString("$libFolder/$srcFolder/browser/browser_client.dart", _createBrowserClientClass);
  
      writeFile("$libFolder/$srcFolder/browser/$_name.dart", _writeBrowserMainClass);
  
      // Create console versions of the libraries
      writeString("$libFolder/$_libraryConsoleName.dart", _createConsoleLibrary(srcFolder));
  
      writeString("$libFolder/$srcFolder/console/console_client.dart", _createConsoleClientClass);
  
      writeFile("$libFolder/$srcFolder/console/$_name.dart", _writeConsoleMainClass);
  
      // Create hop_runner for the libraries
      writeString("$mainFolder/tool/hop_runner.dart", _createHopRunner);
  