diff --git a/openapi_test.go b/openapi_test.go index dd4bfbf..25c8c21 100644 --- a/openapi_test.go +++ b/openapi_test.go @@ -103,6 +103,10 @@ func TestOpenAPI(t *testing.T) { //nolint: maintidx return Three{} }) + r.POST("/three", func() Three { + return Three{} + }) + r.GET("/four", fnFour) doc := r.OpenAPI().JSON() @@ -335,6 +339,21 @@ func TestOpenAPI(t *testing.T) { //nolint: maintidx }, }, }, + "post": map[string]interface{}{ + "operationId": "func6", + "responses": map[string]interface{}{ + "200": map[string]interface{}{ + "content": map[string]interface{}{ + "application/json": map[string]interface{}{ + "schema": map[string]interface{}{ + "type": "string", + }, + }, + }, + "description": "OK", + }, + }, + }, }, "/two/{id}": map[string]interface{}{ "get": map[string]interface{}{