a2aproject / a2aproject/a2a-tck

[Bug]: inconsistent snake_case usage for REST

Aperta Adatta ai principianti
#97 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
50
Fork
40
Merge medio
7g 1h
PR unite (30g)
1

Descrizione

### What happened?

Tests for REST transport use snake_case for fields by converting request payloads via [`convert_a2a_message_to_protobuf_json`](https://github.com/a2aproject/a2a-tck/blob/b03fefcae9767dad0e978e11573192f74252dfe3/tck/message_utils.py#L52). Response conversion uses [`convert_protobuf_response_to_a2a_json`](https://github.com/a2aproject/a2a-tck/blob/b03fefcae9767dad0e978e11573192f74252dfe3/tck/message_utils.py#L133C5-L133C42) as all the validations operate on camelCase. However this isn't done in [`send_streaming_message`](https://github.com/a2aproject/a2a-tck/blob/b03fefcae9767dad0e978e11573192f74252dfe3/tck/transport/rest_client.py#L311-L312) while assertions still use camelCase (i.e. [here](https://github.com/a2aproject/a2a-tck/blob/b03fefcae9767dad0e978e11573192f74252dfe3/tests/optional/capabilities/test_streaming_methods.py#L131)).

The proposal is to use camelCase due to:

1. v0.3.0 doesn't mention casing explicitly for REST, however in [this example](https://a2a-protocol.org/v0.3.0/specification/#72-messagestream) response payload in the REST tab is shown in camelCase.

1. v1.0 draft explicitly specifies using camelCase everywhere: [5.5. JSON Field Naming Convention](https://a2a-protocol.org/latest/specification/#55-json-field-naming-convention).

1. SDKs already use camelCase (at lest it's the case for Java, Python and Go).

### Relevant log output

```shell

```

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Examine the `send_streaming_message` function in tck/transport/rest_client.py lines 311-312 to see where snake_case is used. Compare with the conversion functions in tck/message_utils.py. Update the function to use camelCase for consistency, then run the test at tests/optional/capabilities/test_streaming_methods.py line 131 to verify the fix aligns with the assertions.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
api, testing
Tipo di issue
Bug
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
65/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.