1
0
mirror of synced 2026-08-05 15:06:54 +00:00

fix(api): throw TimeoutError on timeout (#323)

This commit is contained in:
Yury Semikhatsky
2021-03-05 13:18:24 -08:00
committed by GitHub
parent d57c449aef
commit 86c06c4fd3
10 changed files with 33 additions and 17 deletions
@@ -1038,6 +1038,10 @@ public class ApiGenerator {
Map<String, TypeDefinition> topLevelTypes = new HashMap<>();
for (JsonElement entry: api) {
String name = entry.getAsJsonObject().get("name").getAsString();
// We write this one manually.
if ("TimeoutError".equals(name)) {
continue;
}
List<String> lines = new ArrayList<>();
new Interface(entry.getAsJsonObject(), topLevelTypes).writeTo(lines, "");
String text = String.join("\n", lines);