Skip to content

Commit 35ff0ae

Browse files
ozrazaOmar Raza
authored andcommitted
protoc-gen-swagger: Update internal mapping for boolean type (grpc-ecosystem#1466)
Fixes grpc-ecosystem#1463
1 parent 494cd49 commit 35ff0ae

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

examples/internal/proto/examplepb/wrappers.swagger.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@
5050
"200": {
5151
"description": "A successful response.",
5252
"schema": {
53-
"type": "boolean",
54-
"format": "boolean"
53+
"type": "boolean"
5554
}
5655
},
5756
"default": {
@@ -67,8 +66,7 @@
6766
"in": "body",
6867
"required": true,
6968
"schema": {
70-
"type": "boolean",
71-
"format": "boolean"
69+
"type": "boolean"
7270
}
7371
}
7472
],
@@ -403,9 +401,8 @@
403401
"type": "number",
404402
"format": "double"
405403
},
406-
"boolValue": {
407-
"type": "boolean",
408-
"format": "boolean"
404+
"bool_value": {
405+
"type": "boolean"
409406
},
410407
"uint32Value": {
411408
"type": "integer",

protoc-gen-openapiv2/internal/genopenapi/template.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ var wktSchemas = map[string]schemaCore{
6565
},
6666
".google.protobuf.BoolValue": {
6767
Type: "boolean",
68-
Format: "boolean",
6968
},
7069
".google.protobuf.Empty": {},
7170
".google.protobuf.Struct": {

protoc-gen-openapiv2/internal/genopenapi/template_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2111,7 +2111,6 @@ func TestSchemaOfField(t *testing.T) {
21112111
refs: make(refMap),
21122112
expected: schemaCore{
21132113
Type: "boolean",
2114-
Format: "boolean",
21152114
},
21162115
},
21172116
{

0 commit comments

Comments
 (0)