danielgtaylor / danielgtaylor/python-betterproto
Mixed case request results in missing request parameters in generated code
- Lingua principale
- Python
- Stelle
- 1.8k
- Fork
- 234
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Version: betterproto==2.0.0b3
Requests with capital letters in the name seem to cause an issue with constructing methods. The request parameters are not added to the method. e.g
proto file:
```
rpc TestCAPITALS(TestCAPITALSRequest) returns (TestCAPITALSResponse){}
message TestCAPITALSRequest{
string name = 1;
}
message TestCAPITALSResponse{}
```
generated class:
```
async def test_capitals(self) -> "TestCapitalsResponse":
request = TestCapitalsRequest()
return await self._unary_unary(
"/tumelo.transparency.v1.InstrumentPortfolioTransparency/TestCAPITALS",
request,
TestCapitalsResponse,
)
```
we would expect a `name` field in the request but it is not there
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con le definizioni RPC e request con maiuscole e minuscole miste mostrate nell’issue, quindi confrontale con il metodo async generato e la costruzione della request. Traccia il percorso di generazione del codice che trasforma i nomi dell’RPC e del messaggio nel metodo e verifica che la request generata conservi il campo name. Il lavoro è completato quando il metodo di esempio include il parametro request mantenendo il percorso RPC e il tipo di risposta.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- grpc, python
- Ambito
- devtools
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100