a2aproject / a2aproject/a2a-tck
[Bug]: inconsistent snake_case usage for REST
- Langage dominant
- Python
- Étoiles
- 50
- Forks
- 40
- Merge moyen
- 7 j 1 h
- PR mergées (30 j)
- 1
Description
### 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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- api, testing
- Type d'issue
- Bug
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 65/100