@@ -230,6 +230,8 @@ void buildClass() {
230
230
String summary = parseDocumentation (apiDef .getSummary ());
231
231
if (!summary .isEmpty ()) {
232
232
builder .addJavadoc ("$L" , summary + "\n " );
233
+ } else {
234
+ builder .addJavadoc ("The $L operation\n " , apiDef .getGraphOpName ());
233
235
}
234
236
String desc = parseDocumentation (apiDef .getDescription ());
235
237
if (!desc .isEmpty ()) {
@@ -264,8 +266,7 @@ void buildClass() {
264
266
typeParams .add (typeVar );
265
267
builder .addTypeVariable (typeVar );
266
268
builder .addJavadoc (
267
- "\n @param <" + typeVar .name + "> data type for {@code " + output
268
- .getName () + "} output\n " );
269
+ "\n @param <$L> data type for {@code $L} output\n " , typeVar .name , output .getName ());
269
270
}
270
271
}
271
272
}
@@ -473,7 +474,11 @@ private void buildFactoryMethods() {
473
474
String name = getJavaName (input );
474
475
475
476
ParameterSpec .Builder param = ParameterSpec .builder (type .iterableIfIterable ().javaType , name );
476
- paramTags .put (name , CodeBlock .of ("$L" , parseDocumentation (argDef .getDescription ())));
477
+ String description =
478
+ argDef .getDescription ().isEmpty ()
479
+ ? String .format ("the %s value" , name )
480
+ : argDef .getDescription ();
481
+ paramTags .put (name , CodeBlock .of ("$L" , parseDocumentation (description )));
477
482
factoryBuilder .addParameter (param .build ());
478
483
479
484
typeVars .addAll (type .findGenerics ());
@@ -501,7 +506,13 @@ private void buildFactoryMethods() {
501
506
502
507
ParameterSpec .Builder builder = ParameterSpec
503
508
.builder (type .classIfGeneric ().listIfIterable ().javaType , getJavaName (attr ));
504
- paramTags .put (getJavaName (attr ), CodeBlock .of ("$L" , parseDocumentation (apiAttr .getDescription ())));
509
+
510
+ String javaName = getJavaName (attr );
511
+ String description =
512
+ apiAttr .getDescription ().isEmpty ()
513
+ ? String .format ("the value of the %s property" , javaName )
514
+ : apiAttr .getDescription ();
515
+ paramTags .put (javaName , CodeBlock .of ("$L" , parseDocumentation (description )));
505
516
506
517
typeVars .addAll (type .findGenerics ());
507
518
0 commit comments