How to extend rather than replace parent Parameters?

十年热恋 提交于 2019-12-11 07:34:53

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!