-
Notifications
You must be signed in to change notification settings - Fork 129
sample_code_init_fields initial value as a file #945
Comments
Some things like |
the syntax |
Good to know that. The samplegen should generate the code to read the file from the sample name of the file; with Node.JS, it's gonna be like var fs = require('fs');
...
var content = fs.readFileSync('audio_file.flac');
var audio = {
content: content
};
... |
So then the Java version might be something like this:
(There might be a more condensed way to do this.) So in the config, we need some language-agnostic way to indicate that the content of a file needs to be read with a given name and populated into a given field. Here is one option:
Here, the |
sounds good to me. |
@garrettjonesgoogle Is this still relevant? |
It's still something we could do that would be helpful. |
We are allowing file input in the standalone samples. When we migrate the same samplegen infrastructure to also generate the in-code samples, this will come along for the ride. |
Moved to backlog. https://github.com/googleapis/gapic-generator/wiki/feature-backlog |
Related to #941 and https://github.com/googleapis/googleapis/issues/243, the speech audio data will normally come from a file, and I believe that data coming from a file will be seen in other APIs. It's nicer to extend the sample_code_init_fields syntax to denote that. I'm not sure about its actual specs though.
The text was updated successfully, but these errors were encountered: