diff --git a/pkg/ffapi/openapi3.go b/pkg/ffapi/openapi3.go index 2320bd9..edf7c6e 100644 --- a/pkg/ffapi/openapi3.go +++ b/pkg/ffapi/openapi3.go @@ -351,5 +351,7 @@ func (sg *SwaggerGen) addRoute(ctx context.Context, doc *openapi3.T, route *Rout pi.Post = op case http.MethodDelete: pi.Delete = op + case http.MethodPatch: + pi.Patch = op } } diff --git a/pkg/ffapi/openapi3_test.go b/pkg/ffapi/openapi3_test.go index c3a1cda..1246f89 100644 --- a/pkg/ffapi/openapi3_test.go +++ b/pkg/ffapi/openapi3_test.go @@ -70,7 +70,7 @@ var testRoutes = []*Route{ { Name: "op1", Path: "namespaces/{ns}/example1/{id}", - Method: http.MethodPost, + Method: http.MethodPatch, PathParams: []*PathParam{ {Name: "lang", ExampleFromConf: config.Lang, Description: ExampleDesc}, {Name: "id", Example: "id12345", Description: ExampleDesc},