fix: change postData field type to Object (#296)
This commit is contained in:
@@ -289,6 +289,9 @@ class TypeRef extends Element {
|
||||
|
||||
private JsonObject stripNullable() {
|
||||
JsonObject jsonType = jsonElement.getAsJsonObject();
|
||||
if (!isNullable()) {
|
||||
return jsonType;
|
||||
}
|
||||
if (!jsonType.has("union")) {
|
||||
return jsonType;
|
||||
}
|
||||
@@ -696,12 +699,6 @@ class Field extends Element {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ("Route.resume.options.postData".equals(jsonPath)) {
|
||||
output.add(offset + "public " + parentClass + " withPostData(String postData) {");
|
||||
output.add(offset + " this.postData = postData.getBytes(StandardCharsets.UTF_8);");
|
||||
output.add(offset + " return this;");
|
||||
output.add(offset + "}");
|
||||
}
|
||||
writeGenericBuilderMethod(output, offset, parentClass, type.toJava());
|
||||
}
|
||||
|
||||
|
||||
@@ -50,9 +50,6 @@ class Types {
|
||||
add("BrowserContext.exposeFunction.callback", "function", "FunctionCallback");
|
||||
add("Page.exposeBinding.callback", "function", "BindingCallback");
|
||||
add("Page.exposeFunction.callback", "function", "FunctionCallback");
|
||||
|
||||
// The method has custom signatures
|
||||
add("Route.resume.options.postData", "Buffer|string", "byte[]", new Empty());
|
||||
}
|
||||
|
||||
Mapping findForPath(String jsonPath) {
|
||||
|
||||
Reference in New Issue
Block a user