chore(api): spec improvements

This commit is contained in:
ITQ
2025-12-17 12:15:27 +03:00
parent 7545e7c0d7
commit e78bd03396
6 changed files with 45 additions and 43 deletions
+14 -14
View File
@@ -236,9 +236,9 @@ func (x *GetCompetitionResultsRequest) GetCompetitionId() string {
type GetCompetitionResultsResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Results []*UserResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
TotalCount int32 `protobuf:"varint,2,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"`
NextPageToken int32 `protobuf:"varint,3,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
TotalCount int32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"`
NextPageToken int32 `protobuf:"varint,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
Results []*UserResult `protobuf:"bytes,3,rep,name=results,proto3" json:"results,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -273,13 +273,6 @@ func (*GetCompetitionResultsResponse) Descriptor() ([]byte, []int) {
return file_api_proto_results_proto_rawDescGZIP(), []int{3}
}
func (x *GetCompetitionResultsResponse) GetResults() []*UserResult {
if x != nil {
return x.Results
}
return nil
}
func (x *GetCompetitionResultsResponse) GetTotalCount() int32 {
if x != nil {
return x.TotalCount
@@ -294,6 +287,13 @@ func (x *GetCompetitionResultsResponse) GetNextPageToken() int32 {
return 0
}
func (x *GetCompetitionResultsResponse) GetResults() []*UserResult {
if x != nil {
return x.Results
}
return nil
}
type GetUserCompetitionResultsRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
CompetitionId string `protobuf:"bytes,1,opt,name=competition_id,json=competitionId,proto3" json:"competition_id,omitempty"`
@@ -462,11 +462,11 @@ const file_api_proto_results_proto_rawDesc = "" +
"\n" +
"page_token\x18\x02 \x01(\x05R\tpageToken\x12%\n" +
"\x0ecompetition_id\x18\x03 \x01(\tR\rcompetitionId\"\x97\x01\n" +
"\x1dGetCompetitionResultsResponse\x12-\n" +
"\aresults\x18\x01 \x03(\v2\x13.results.UserResultR\aresults\x12\x1f\n" +
"\vtotal_count\x18\x02 \x01(\x05R\n" +
"\x1dGetCompetitionResultsResponse\x12\x1f\n" +
"\vtotal_count\x18\x01 \x01(\x05R\n" +
"totalCount\x12&\n" +
"\x0fnext_page_token\x18\x03 \x01(\x05R\rnextPageToken\"b\n" +
"\x0fnext_page_token\x18\x02 \x01(\x05R\rnextPageToken\x12-\n" +
"\aresults\x18\x03 \x03(\v2\x13.results.UserResultR\aresults\"b\n" +
" GetUserCompetitionResultsRequest\x12%\n" +
"\x0ecompetition_id\x18\x01 \x01(\tR\rcompetitionId\x12\x17\n" +
"\auser_id\x18\x02 \x01(\tR\x06userId\"P\n" +