0

Am getting the following stack trace when running the following command:

dart generate.dart package -input googleapis-discovery-documents/ -output googleapis/

My downloaded App Engine API discovery doc is inside googleapis-discovery-documents/ in the current directory.

NoSuchMethodError: method not found: 'toLowerCase'
Receiver: null
Arguments: []
    #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:45)
    #1      ApisPackageGenerator.generateApiPackage (package:discoveryapis_generator/src/apis_package_generator.dart:70:49)
    #2      generateApiPackage (package:discoveryapis_generator/discoveryapis_generator.dart:53:49)
   #3      generateAllLibraries (package:discoveryapis_generator/discoveryapis_generator.dart:64:28)
   #4      main (file:///home/tom/work/dart/dart-sdk/discovery_api_dart_client_generator/bin/generate.dart:112:40)
   #5      _startIsolate (dart:isolate-patch/isolate_patch.dart:237)
   #6      _startMainIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:192)
   #7      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:130)**
7
  • What version of the discoveryapis_generator and Dart are you using? Maybe you should create an issue in the packages GitHub repo. Mar 29, 2015 at 13:39
  • The dart version is 1.8.5. The generator version I don't know. I just cloned it yesterday.There's no command line option to get it. Mar 30, 2015 at 8:28
  • I found another, possibly better supported but heavyweight generator (github.com/google/apis-client-generator). It's giving me problems, too, but I'll create an issue on Github. Mar 30, 2015 at 8:31
  • I think this github.com/dart-lang/discoveryapis_generator is the most recent package for this task and it doesn't have an input option only input-dir Mar 30, 2015 at 8:37
  • 1
    I have just managed to create my first Dart client library using a Google cloud endpoints API discovery document. Very cool. I found using the "files" subcommand easier, as it didn't create new nested subdirectories, the structure of which are unfamiliar. Now to try and get the new library working from the Dart editor... Apr 1, 2015 at 10:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.