Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发一个执行 CRUD 操作的 RESTful Web 服务。有没有办法为我的数据对象 XML 发布 API?
有描述服务的 WADL,但没有(据我所知)告诉消费者服务期望或作为 XML 数据对象返回什么。
是否有发布此内容的常见做法?
我们在文档页面中为请求和响应提供了 xsd 模式和示例。REL 可以指向这些文档页面。这是一个使用 HAL 的示例,该示例具有文档的占位符。我们还提供额外的链接关系。我们还提供资源的业务描述
http://hal-shop.heroku.com/hal_browser.html#/