Skip to content

Commit

Permalink
fix(vdp): the type of total_size is wrong (#481)
Browse files Browse the repository at this point in the history
Because

- We initially used `int64` for `total_size`, but it gets converted to a
string when using `grpc-gateway`, which is not ideal.

This commit

- changes the `total_size` type to `int32` to ensure better
compatibility with `grpc-gateway` and JSON formatting.
  • Loading branch information
donch1989 authored Oct 3, 2024
1 parent 54137c1 commit e04c859
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions openapiv2/vdp/service.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3112,8 +3112,8 @@ definitions:
description: The list of component runs.
readOnly: true
totalSize:
type: string
format: int64
type: integer
format: int32
description: The total number of component runs matching the request.
readOnly: true
page:
Expand Down Expand Up @@ -3278,8 +3278,8 @@ definitions:
description: The list of pipeline runs.
readOnly: true
totalSize:
type: string
format: int64
type: integer
format: int32
description: The total number of pipeline runs matching the request.
readOnly: true
page:
Expand Down
4 changes: 2 additions & 2 deletions vdp/pipeline/v1beta/pipeline.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1990,7 +1990,7 @@ message ListPipelineRunsResponse {
repeated PipelineRun pipeline_runs = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// The total number of pipeline runs matching the request.
int64 total_size = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
int32 total_size = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

// The current page number.
int32 page = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
Expand Down Expand Up @@ -2029,7 +2029,7 @@ message ListComponentRunsResponse {
repeated ComponentRun component_runs = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// The total number of component runs matching the request.
int64 total_size = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
int32 total_size = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

// The current page number.
int32 page = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
Expand Down

0 comments on commit e04c859

Please sign in to comment.