Skip to content

Commit

Permalink
Merge pull request #17 from hyperledger/patch
Browse files Browse the repository at this point in the history
Add PATCH to swagger
  • Loading branch information
peterbroadhurst authored Jun 6, 2022
2 parents 3b6224a + e590673 commit c528557
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/ffapi/openapi3.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
2 changes: 1 addition & 1 deletion pkg/ffapi/openapi3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down

0 comments on commit c528557

Please sign in to comment.