Skip to content

Commit 0355870

Browse files
committed
chore: Fix Javadoc warnings in spec/ module
1 parent 1277f24 commit 0355870

14 files changed

+61
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,31 @@
11

22
package io.a2a.spec;
33

4+
/**
5+
* Constants defining the A2A protocol method names.
6+
*/
47
public interface A2AMethods {
8+
/** Method name for canceling a task. */
59
String CANCEL_TASK_METHOD = "CancelTask";
10+
/** Method name for deleting task push notification configuration. */
611
String DELETE_TASK_PUSH_NOTIFICATION_CONFIG_METHOD = "DeleteTaskPushNotificationConfig";
12+
/** Method name for getting extended agent card information. */
713
String GET_EXTENDED_AGENT_CARD_METHOD = "GetExtendedAgentCard";
14+
/** Method name for getting a task. */
815
String GET_TASK_METHOD = "GetTask";
16+
/** Method name for getting task push notification configuration. */
917
String GET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD = "GetTaskPushNotificationConfig";
18+
/** Method name for listing tasks. */
1019
String LIST_TASK_METHOD = "ListTasks";
20+
/** Method name for listing task push notification configurations. */
1121
String LIST_TASK_PUSH_NOTIFICATION_CONFIG_METHOD = "ListTaskPushNotificationConfig";
22+
/** Method name for sending a message. */
1223
String SEND_MESSAGE_METHOD = "SendMessage";
24+
/** Method name for sending a streaming message. */
1325
String SEND_STREAMING_MESSAGE_METHOD = "SendStreamingMessage";
26+
/** Method name for setting task push notification configuration. */
1427
String SET_TASK_PUSH_NOTIFICATION_CONFIG_METHOD = "SetTaskPushNotificationConfig";
28+
/** Method name for subscribing to task events. */
1529
String SUBSCRIBE_TO_TASK_METHOD = "SubscribeToTask";
1630

1731
}

spec/src/main/java/io/a2a/spec/APIKeySecurityScheme.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ public record APIKeySecurityScheme(
2929
/**
3030
* Compact constructor with validation.
3131
*
32+
* @param location the location where the API key is sent (required)
33+
* @param name the name of the API key parameter (required)
34+
* @param description a human-readable description (optional)
3235
* @throws IllegalArgumentException if location or name is null
3336
*/
3437
public APIKeySecurityScheme {

spec/src/main/java/io/a2a/spec/DataPart.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public record DataPart(Map<String, Object> data) implements Part<Map<String, Obj
4949
/**
5050
* Compact constructor with validation and defensive copying.
5151
*
52+
* @param data the structured data map (required, defensively copied for immutability)
5253
* @throws IllegalArgumentException if data is null
5354
*/
5455
public DataPart {

spec/src/main/java/io/a2a/spec/FilePart.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public record FilePart(FileContent file) implements Part<FileContent> {
4949
/**
5050
* Compact constructor with validation.
5151
*
52+
* @param file the file content (required, either FileWithBytes or FileWithUri)
5253
* @throws IllegalArgumentException if file is null
5354
*/
5455
public FilePart {

spec/src/main/java/io/a2a/spec/HTTPAuthSecurityScheme.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ public record HTTPAuthSecurityScheme(
4747
/**
4848
* Compact constructor with validation.
4949
*
50+
* @param bearerFormat the bearer token format (optional)
51+
* @param scheme the authentication scheme (required)
52+
* @param description the scheme description (optional)
5053
* @throws IllegalArgumentException if scheme is null
5154
*/
5255
public HTTPAuthSecurityScheme {

spec/src/main/java/io/a2a/spec/ListTaskPushNotificationConfigParams.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ public record ListTaskPushNotificationConfigParams(String id, int pageSize, Stri
2020
* Validates that required parameters are not null.
2121
*
2222
* @param id the task identifier
23+
* @param pageSize the maximum number of items to return per page
24+
* @param pageToken the pagination token for the next page
2325
* @param tenant the tenant identifier
2426
*/
2527
public ListTaskPushNotificationConfigParams {

spec/src/main/java/io/a2a/spec/Message.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@ public record Message(Role role, List<Part<?>> parts,
4747
/**
4848
* Compact constructor with validation and defensive copying.
4949
*
50+
* @param role the role of the message sender (user or agent)
51+
* @param parts the content parts of the message (text, file, or data)
52+
* @param messageId the unique identifier for this message
53+
* @param contextId the conversation context identifier
54+
* @param taskId the task identifier this message is associated with
55+
* @param referenceTaskIds list of reference task identifiers
56+
* @param metadata additional metadata for the message
57+
* @param extensions list of protocol extensions used in this message
5058
* @throws IllegalArgumentException if role, parts, or messageId is null, or if parts is empty
5159
*/
5260
public Message {
@@ -80,6 +88,7 @@ public static Builder builder() {
8088
* Creates a new Builder initialized with values from an existing Message.
8189
*
8290
* @param message the Message to copy values from
91+
* @return a new Builder instance initialized with the message's values
8392
*/
8493
public static Builder builder(Message message) {
8594
return new Builder(message);

spec/src/main/java/io/a2a/spec/OAuth2SecurityScheme.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ public record OAuth2SecurityScheme(
3333
/**
3434
* Compact constructor with validation.
3535
*
36+
* @param flows the OAuth 2.0 flow configuration (required)
37+
* @param description optional description of the security scheme
38+
* @param oauth2MetadataUrl optional URL to OAuth 2.0 metadata (RFC 8414)
3639
* @throws IllegalArgumentException if flows is null
3740
*/
3841
public OAuth2SecurityScheme {

spec/src/main/java/io/a2a/spec/OpenIdConnectSecurityScheme.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ public record OpenIdConnectSecurityScheme(
4141
/**
4242
* Compact constructor with validation.
4343
*
44+
* @param openIdConnectUrl URL to the OpenID Connect Discovery document (required)
45+
* @param description optional description of the security scheme
4446
* @throws IllegalArgumentException if openIdConnectUrl is null
4547
*/
4648
public OpenIdConnectSecurityScheme {

spec/src/main/java/io/a2a/spec/Task.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ public record Task(
5959
/**
6060
* Compact constructor with validation and defensive copying.
6161
*
62+
* @param id the task identifier
63+
* @param contextId the context identifier
64+
* @param status the task status
65+
* @param artifacts the list of artifacts produced by the task
66+
* @param history the message history for this task
67+
* @param metadata additional metadata for the task
6268
* @throws IllegalArgumentException if id, contextId, or status is null
6369
*/
6470
public Task {
@@ -91,6 +97,7 @@ public static Builder builder() {
9197
* by copying all fields and then selectively updating specific values.
9298
*
9399
* @param task the Task to copy values from
100+
* @return a new Builder instance initialized with the task's values
94101
*/
95102
public static Builder builder(Task task) {
96103
return new Builder(task);

0 commit comments

Comments
 (0)