You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.
generate.dart supports input and output directory parameters for both of its subcommands (package, files). This leads one to believe that it supports multiple discovery documents in the input directory. However, when multiple discovery documents exist, there is only a single client library file generated, which contains the API for only the last document it processed. AND the command's output indicates that both were processed successfully:
I suggest that the files subcommand be changed to file and take an input file (JSON document) and output the library file to standard output, or take a filename as the output parameter.
Plus, the command help is unclear in its use of "already existing", implying that the discovery document might somehow as well be generated by the command.
Alternatively, the files subcommand might indeed process multiple discovery docs, each with a single service API generated using endpointscfg.py, and generate a client library containing the API for all services. This would be really nice for my use case, as I could then declare different clients in a more generic manner in my Dart code that uses the libraries, if that makes any sense:
import "my_api.dart" show MyFirstResourceApi, MySecond...
MyFirstApiResource firstApi;
MySecondResource secondApi;
Trying to do this with a multi-class API as currently generated gives me problems. But that's probably another matter.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
generate.dart
supports input and output directory parameters for both of its subcommands (package, files). This leads one to believe that it supports multiple discovery documents in the input directory. However, when multiple discovery documents exist, there is only a single client library file generated, which contains the API for only the last document it processed. AND the command's output indicates that both were processed successfully:I suggest that the
files
subcommand be changed tofile
and take an input file (JSON document) and output the library file to standard output, or take a filename as the output parameter.Plus, the command help is unclear in its use of "already existing", implying that the discovery document might somehow as well be generated by the command.
Alternatively, the
files
subcommand might indeed process multiple discovery docs, each with a single service API generated usingendpointscfg.py
, and generate a client library containing the API for all services. This would be really nice for my use case, as I could then declare different clients in a more generic manner in my Dart code that uses the libraries, if that makes any sense:Trying to do this with a multi-class API as currently generated gives me problems. But that's probably another matter.
The text was updated successfully, but these errors were encountered: