Skip to content

Commit 5b9ce67

Browse files
committed
Add Any type attributes to test of openapi v3
1 parent 4688308 commit 5b9ce67

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

http/codegen/openapi/v3/testdata/dsls/types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ func ObjectResponseBodyDSL(svcName, metName string) func() {
8282
Result(func() {
8383
Attribute("name")
8484
Attribute("age", Int)
85+
Attribute("misc", Any)
8586
})
8687
HTTP(func() {
8788
POST("/")

http/codegen/openapi/v3/types_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func TestBuildBodyTypes(t *testing.T) {
119119
DSL: dsls.ObjectResponseBodyDSL(svcName, "object_response_body"),
120120

121121
ExpectedType: tempty,
122-
ExpectedResponseTypes: rt{200: tobj("name", tstring, "age", tint)},
122+
ExpectedResponseTypes: rt{200: tobj("name", tstring, "age", tint, "misc", tempty)},
123123
}, {
124124
Name: "multi_cookie_response_body",
125125
DSL: dsls.MultiCookieResponseBodyDSL(svcName, "multi_cookie_response_body"),
@@ -137,7 +137,7 @@ func TestBuildBodyTypes(t *testing.T) {
137137
DSL: dsls.ObjectResponseBodyDSL(svcName, "object_streaming_response_body"),
138138

139139
ExpectedType: tempty,
140-
ExpectedResponseTypes: rt{200: tobj("name", tstring, "age", tint)},
140+
ExpectedResponseTypes: rt{200: tobj("name", tstring, "age", tint, "misc", tempty)},
141141
}, {
142142
Name: "string_error_response",
143143
DSL: dsls.StringErrorResponseBodyDSL(svcName, "string_error_response"),

0 commit comments

Comments
 (0)