Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit 1f314a2

Browse files
committed
fix: bad validation flag for listner methods
1 parent 0611935 commit 1f314a2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

examples/config.simple.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ listeners:
1414
#
1515
/hello:
1616

17+
# We can define which methods to support, defaults to GET and POST
18+
methods:
19+
- GET
20+
- POST
21+
1722
# Returns the output of the command in the response
1823
return: output
1924

pkg/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ type ListenerConfig struct {
4949

5050
// Which methods to enable for this listener. Defaults to GET, POST
5151
// MUST be UPPERCASE!
52-
Methods []string `mapstructure:"methods" validate:"dive,oneof='GET POST PUT PATCH HEAD DELETE OPTIONS'"`
52+
Methods []string `mapstructure:"methods" validate:"dive,oneof=GET POST PUT PATCH HEAD DELETE OPTIONS"`
5353

5454
// Define which temporary files you want to create
5555
Files map[string]*ListenerTemplate `mapstructure:"files"`

0 commit comments

Comments
 (0)