@@ -230,6 +230,8 @@ void buildClass() {
230230 String summary = parseDocumentation (apiDef .getSummary ());
231231 if (!summary .isEmpty ()) {
232232 builder .addJavadoc ("$L" , summary + "\n " );
233+ } else {
234+ builder .addJavadoc ("The $L operation\n " , apiDef .getGraphOpName ());
233235 }
234236 String desc = parseDocumentation (apiDef .getDescription ());
235237 if (!desc .isEmpty ()) {
@@ -264,8 +266,7 @@ void buildClass() {
264266 typeParams .add (typeVar );
265267 builder .addTypeVariable (typeVar );
266268 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 ());
269270 }
270271 }
271272 }
@@ -473,7 +474,11 @@ private void buildFactoryMethods() {
473474 String name = getJavaName (input );
474475
475476 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 )));
477482 factoryBuilder .addParameter (param .build ());
478483
479484 typeVars .addAll (type .findGenerics ());
@@ -501,7 +506,13 @@ private void buildFactoryMethods() {
501506
502507 ParameterSpec .Builder builder = ParameterSpec
503508 .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 )));
505516
506517 typeVars .addAll (type .findGenerics ());
507518
0 commit comments