如何在 WADL 中定义变量资源,例如 /colours/{colour}?
是否可以定义您期望 /colours/{colour} URL 中的 {colour} 作为 WADL 的一部分?如果是这样,你会怎么做?如果不是,这不是对规范的巨大疏忽吗?
为什么我不能做这样的事情来定义 /colours/{colour}:
<resource path="colours" id="Colours">
<resource id="colour" uri="{colour}">
<method name="GET" id="get_colour"/>
</resource>
</resource>
提前致谢。
Is it possible to define the fact that you are expecting a {colour} in the /colours/{colour} URL as part of a WADL? If so, how would you do it? If not, isn't this a huge oversight of the spec?
Why can't I do something like this to define /colours/{colour}:
<resource path="colours" id="Colours">
<resource id="colour" uri="{colour}">
<method name="GET" id="get_colour"/>
</resource>
</resource>
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
找到答案: http://cxf.apache.org/docs/jaxrs-services -description.html
您可以将其定义为具有模板样式的参数,例如:
Found the answer: http://cxf.apache.org/docs/jaxrs-services-description.html
You can define it as a param with a style of template, e.g: