问题
I've got a resource with multiple parameters, and a single action with one extra. How can I write this with the minimal repeats?
Something like this, but that actually works:
## Items [/item{?type}]
+ Parameters
+ type (enum[string], optional)
+ Default: foo
+ Members
+ foo
+ bar
### List [GET {&from}]
+ Parameters
+ page (integer, optional)
+ Default: 1
All other actions should list type
, while the GET should list both type
and page
.
来源:https://stackoverflow.com/questions/41960087/how-to-extend-rather-than-replace-parent-parameters