Skip to content

Commit c91509f

Browse files
committed
chore(openapiv2): regenerate examples with required field fix
1 parent bc635de commit c91509f

File tree

3 files changed

+28
-19
lines changed

3 files changed

+28
-19
lines changed

examples/internal/clients/abe/api/swagger.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6500,6 +6500,15 @@ definitions:
65006500
description: "Nested is nested type."
65016501
example: "{\"ok\":\"TRUE\"}"
65026502
A bit of everything_2:
6503+
required:
6504+
- "doubleValue"
6505+
- "floatValue"
6506+
- "int64Value"
6507+
- "requiredStringField1"
6508+
- "requiredStringField2"
6509+
- "requiredStringViaFieldBehaviorAnnotation"
6510+
- "required_field_behavior_json_name_custom"
6511+
- "required_field_schema_json_name_custom"
65036512
properties:
65046513
singleNested:
65056514
$ref: "#/definitions/ABitOfEverythingNested"

examples/internal/clients/abe/model_a_bit_of_everything_2.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ type ABitOfEverything2 struct {
1919
SingleNested *ABitOfEverythingNested `json:"singleNested,omitempty"`
2020
Nested []ABitOfEverythingNested `json:"nested,omitempty"`
2121
// Float value field
22-
FloatValue float32 `json:"floatValue,omitempty"`
23-
DoubleValue float64 `json:"doubleValue,omitempty"`
24-
Int64Value string `json:"int64Value,omitempty"`
22+
FloatValue float32 `json:"floatValue"`
23+
DoubleValue float64 `json:"doubleValue"`
24+
Int64Value string `json:"int64Value"`
2525
Uint64Value string `json:"uint64Value,omitempty"`
2626
Int32Value int32 `json:"int32Value,omitempty"`
2727
Fixed64Value string `json:"fixed64Value,omitempty"`
@@ -58,16 +58,16 @@ type ABitOfEverything2 struct {
5858
// Nested object description.
5959
NestedAnnotation *ABitOfEverythingNested `json:"nestedAnnotation,omitempty"`
6060
Int64OverrideType int64 `json:"int64OverrideType,omitempty"`
61-
RequiredStringViaFieldBehaviorAnnotation string `json:"requiredStringViaFieldBehaviorAnnotation,omitempty"`
61+
RequiredStringViaFieldBehaviorAnnotation string `json:"requiredStringViaFieldBehaviorAnnotation"`
6262
OutputOnlyStringViaFieldBehaviorAnnotation string `json:"outputOnlyStringViaFieldBehaviorAnnotation,omitempty"`
6363
OptionalStringValue string `json:"optionalStringValue,omitempty"`
6464
// Only digits are allowed.
6565
ProductId []string `json:"productId,omitempty"`
6666
OptionalStringField string `json:"optionalStringField,omitempty"`
67-
RequiredStringField1 string `json:"requiredStringField1,omitempty"`
68-
RequiredStringField2 string `json:"requiredStringField2,omitempty"`
69-
RequiredFieldBehaviorJsonNameCustom string `json:"required_field_behavior_json_name_custom,omitempty"`
70-
RequiredFieldSchemaJsonNameCustom string `json:"required_field_schema_json_name_custom,omitempty"`
67+
RequiredStringField1 string `json:"requiredStringField1"`
68+
RequiredStringField2 string `json:"requiredStringField2"`
69+
RequiredFieldBehaviorJsonNameCustom string `json:"required_field_behavior_json_name_custom"`
70+
RequiredFieldSchemaJsonNameCustom string `json:"required_field_schema_json_name_custom"`
7171
TrailingOnly string `json:"trailingOnly,omitempty"`
7272
// Trailing only dot.
7373
TrailingOnlyDot string `json:"trailingOnlyDot,omitempty"`

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7049,24 +7049,24 @@
70497049
"description": "Find out more about ABitOfEverything",
70507050
"url": "https://github.com/grpc-ecosystem/grpc-gateway"
70517051
},
7052+
"required": [
7053+
"int64Value",
7054+
"doubleValue",
7055+
"required_field_schema_json_name_custom",
7056+
"floatValue",
7057+
"requiredStringViaFieldBehaviorAnnotation",
7058+
"requiredStringField1",
7059+
"requiredStringField2",
7060+
"required_field_behavior_json_name_custom"
7061+
],
70527062
"x-a-bit-of-everything-foo": "bar"
70537063
},
70547064
"updateMask": {
70557065
"type": "string",
70567066
"description": "The paths to update."
70577067
}
70587068
},
7059-
"title": "UpdateV2Request request for update includes the message and the update mask",
7060-
"required": [
7061-
"int64Value",
7062-
"doubleValue",
7063-
"required_field_schema_json_name_custom",
7064-
"floatValue",
7065-
"requiredStringViaFieldBehaviorAnnotation",
7066-
"requiredStringField1",
7067-
"requiredStringField2",
7068-
"required_field_behavior_json_name_custom"
7069-
]
7069+
"title": "UpdateV2Request request for update includes the message and the update mask"
70707070
},
70717071
"MessagePathEnumNestedPathEnum": {
70727072
"type": "string",

0 commit comments

Comments
 (0)