Skip to content

Commit 85e52c3

Browse files
committed
Update runtime and unstub tests
Runtime 1.4.0 allows us to run almost all parameter tests.
1 parent 57c5f3c commit 85e52c3

9 files changed

Lines changed: 398 additions & 61 deletions

File tree

examples/petstore-expanded/stdhttp/api/petstore.gen.go

Lines changed: 13 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/test/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ require (
1515
github.com/labstack/echo/v4 v4.15.1
1616
github.com/oapi-codegen/nullable v1.1.0
1717
github.com/oapi-codegen/oapi-codegen/v2 v2.0.0-00010101000000-000000000000
18-
github.com/oapi-codegen/runtime v1.3.1
18+
github.com/oapi-codegen/runtime v1.4.0
1919
github.com/oapi-codegen/testutil v1.1.0
2020
github.com/stretchr/testify v1.11.1
2121
gopkg.in/yaml.v2 v2.4.0

internal/test/go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ github.com/oapi-codegen/nullable v1.1.0 h1:eAh8JVc5430VtYVnq00Hrbpag9PFRGWLjxR1/
182182
github.com/oapi-codegen/nullable v1.1.0/go.mod h1:KUZ3vUzkmEKY90ksAmit2+5juDIhIZhfDl+0PwOQlFY=
183183
github.com/oapi-codegen/runtime v1.3.1 h1:RgDY6J4OGQLbRXhG/Xpt3vSVqYpHQS7hN4m85+5xB9g=
184184
github.com/oapi-codegen/runtime v1.3.1/go.mod h1:kOdeacKy7t40Rclb1je37ZLFboFxh+YLy0zaPCMibPY=
185+
github.com/oapi-codegen/runtime v1.4.0 h1:KLOSFOp7UzkbS7Cs1ms6NBEKYr0WmH2wZG0KKbd2er4=
186+
github.com/oapi-codegen/runtime v1.4.0/go.mod h1:5sw5fxCDmnOzKNYmkVNF8d34kyUeejJEY8HNT2WaPec=
185187
github.com/oapi-codegen/testutil v1.1.0 h1:EufqpNg43acR3qzr3ObhXmWg3Sl2kwtRnUN5GYY4d5g=
186188
github.com/oapi-codegen/testutil v1.1.0/go.mod h1:ttCaYbHvJtHuiyeBF0tPIX+4uhEPTeizXKx28okijLw=
187189
github.com/oasdiff/yaml v0.0.0-20260313112342-a3ea61cb4d4c h1:7ACFcSaQsrWtrH4WHHfUqE1C+f8r2uv8KGaW0jTNjus=

internal/test/issues/issue-2232/issue2232.gen.go

Lines changed: 19 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/test/parameters/echo/parameters_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,15 +505,13 @@ func TestParameterBinding(t *testing.T) {
505505
// See https://github.com/oapi-codegen/runtime/issues/116
506506

507507
t.Run("spaceDelimited array", func(t *testing.T) {
508-
t.Skip("spaceDelimited not yet supported in runtime (oapi-codegen/runtime#116)")
509508
result = testutil.NewRequest().Get("/queryDelimited?sa=3%204%205").GoWithHTTPHandler(t, e)
510509
assert.Equal(t, http.StatusOK, result.Code())
511510
assert.EqualValues(t, expectedArray, ts.array)
512511
ts.reset()
513512
})
514513

515514
t.Run("pipeDelimited array", func(t *testing.T) {
516-
t.Skip("pipeDelimited not yet supported in runtime (oapi-codegen/runtime#116)")
517515
result = testutil.NewRequest().Get("/queryDelimited?pa=3|4|5").GoWithHTTPHandler(t, e)
518516
assert.Equal(t, http.StatusOK, result.Code())
519517
assert.EqualValues(t, expectedArray, ts.array)

internal/test/parameters/echov5/echov5_param_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,8 @@ func testImpl(t *testing.T, handler http.Handler) {
278278
assert.Equal(t, expectedComplexObject, got.DeepObj)
279279
})
280280
t.Run("spaceDelimited", func(t *testing.T) {
281-
t.Skip("spaceDelimited not yet supported in runtime (oapi-codegen/runtime#116)")
282281
})
283282
t.Run("pipeDelimited", func(t *testing.T) {
284-
t.Skip("pipeDelimited not yet supported in runtime (oapi-codegen/runtime#116)")
285283
})
286284
})
287285

0 commit comments

Comments
 (0)