Skip to content

Convert string to int for integer type #13

@Oreoxmt

Description

@Oreoxmt
int32 port = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
    format: "int32",
    default: "8080",
    example: "8080"

The output:

"port":{
  "type": "integer",
  "format": "int32",
  "example": 8080,
  "default": "8080"
}

Expected output:

"port":{
  "type": "integer",
  "format": "int32",
  "example": 8080,
  "default": 8080
}

JSON Mapping in Proto3
image

Metadata

Metadata

Assignees

Labels

featureyep! a new feature

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions