aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/go-openapi/spec/header.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/go-openapi/spec/header.go')
-rw-r--r--vendor/github.com/go-openapi/spec/header.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/vendor/github.com/go-openapi/spec/header.go b/vendor/github.com/go-openapi/spec/header.go
index 39efe452bb..9dfd17b185 100644
--- a/vendor/github.com/go-openapi/spec/header.go
+++ b/vendor/github.com/go-openapi/spec/header.go
@@ -141,6 +141,12 @@ func (h *Header) AllowDuplicates() *Header {
return h
}
+// WithValidations is a fluent method to set header validations
+func (h *Header) WithValidations(val CommonValidations) *Header {
+ h.SetValidations(SchemaValidations{CommonValidations: val})
+ return h
+}
+
// MarshalJSON marshal this to JSON
func (h Header) MarshalJSON() ([]byte, error) {
b1, err := json.Marshal(h.CommonValidations)