diff options
Diffstat (limited to 'internal/api/model/rule.go')
-rw-r--r-- | internal/api/model/rule.go | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/internal/api/model/rule.go b/internal/api/model/rule.go index f4caf7dd0..b94c502c5 100644 --- a/internal/api/model/rule.go +++ b/internal/api/model/rule.go @@ -27,15 +27,24 @@ type InstanceRule struct { // InstanceRuleCreateRequest represents a request to create a new instance rule, made through the admin API. // -// swagger:model instanceRuleCreateRequest +// swagger:parameters ruleCreate type InstanceRuleCreateRequest struct { - Text string `form:"text" validation:"required"` + // Text body for the instance rule, plaintext. + // required: true + // in: formData + Text string `form:"text" json:"text" validation:"required"` } // InstanceRuleUpdateRequest represents a request to update the text of an instance rule, made through the admin API. // -// swagger:model instanceRuleUpdateRequest +// swagger:parameters ruleUpdate type InstanceRuleUpdateRequest struct { - ID string `form:"id"` - Text string `form:"text"` + // The id of the rule to update. + // required: true + // in: path + ID string `form:"id" json:"id"` + // Text body for the updated instance rule, plaintext. + // required: true + // in: formData + Text string `form:"text" json:"text"` } |