Spring Data Rest : How to expose a json schema from a repository (2.0.0.M1)

限于喜欢 提交于 2019-12-01 06:33:58

Make sure you set the right headers...

Request -  /{repository}/schema
Header - Accept: application/json+schema

Also if you haven't looked into 2.0 snapshots, there are lot more features and changes coming up

EDIT: Jan 27 2014

Correction: Accept should be "application/schema+json" instead of "application/json+schema"

Request -  /{repository}/schema
Header - Accept: application/schema+json

Just an update for version 2.4.0 of Spring Data REST:

JSONSchema is now exposed under the profile link, so you need to change your request as follows:

Request:  /profile/{repository}
Header:   Accept: application/schema+json

You can find the updated documentation here.

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