-
Notifications
You must be signed in to change notification settings - Fork 478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for HATEOAS-Links in Json-Views #359
Conversation
…iding a tooling interface. Signed-off-by: Karsten Tinnefeld <k.tinnefeld@googlemail.com>
Signed-off-by: Karsten Tinnefeld <k.tinnefeld@googlemail.com>
… by providing a tooling interface." This reverts commit 0fdf663.
when filtered by providing a tooling interface, now complete. Signed-off-by: Karsten Tinnefeld <k.tinnefeld@googlemail.com>
Signed-off-by: Karsten Tinnefeld <k.tinnefeld@googlemail.com>
Signed-off-by: Karsten Tinnefeld <k.tinnefeld@googlemail.com>
Signed-off-by: Karsten Tinnefeld <k.tinnefeld@googlemail.com>
Hi, |
Use 0.18.0.Build-snapshot from repo.spring.io/lib-snapshot. Sent from my iPhone
|
Sorry for the inconvenience, but I've just tried the build from either http://repo.gradle.org/gradle/repo/org/springframework/hateoas/spring-hateoas/0.18.0.BUILD-SNAPSHOT/ and https://repo.spring.io/libs-snapshot/org/springframework/hateoas/spring-hateoas/0.18.0.BUILD-SNAPSHOT/. None of those builds contain nor ResourcesLinksVisible or Link.LinkView class interfaces. As far as I could understand, my View classes must extend one of those interfaces (don't know which of them exactly, though). |
@gBarrerasSanz This pull request has not yet been merged into the main project, please build from source by cloning https://github.com/tinne/spring-hateoas.git in the meantime. |
Hi all |
Spring Framework 4.0.9 -> 4.1.7 Minidev JSON 2.1.1 -> 2.2 JSONPath 0.9.1 -> 2.0.0 Spring Data Build Resources 1.6.0 -> 1.6.2 Lombok 1.14.4 -> 1.16.4 JUnit 4.11 -> 4.12 Mockito 1.9.5 -> 1.10.19 JodaTime 2.3 -> 2.8.1 XMLUnit 1.5 -> 1.6 Asciidoctor Maven Plugin 1.5.2 -> 1.5.2.1 AsciidoctorJ PDF 1.5.0-alpha.6 -> 1.5.0-alpha.8 Maven Assembly Plugin 2.5.4 -> 2.5.5 Updated available build profiles. Update Javadoc reference to link to used Spring Framework version.
…ion. Original pull request: spring-projects#364.
Original pull request: spring-projects#329.
Updated changelog.
…rializer on Jackson 2.6. Added missing override for isEmpty(…) that gets used by Jackson 2.6+ to prevent { templated : false } get rendered in HAL link representations. Polished Javadoc on the way.
…figure multiple curies. DefaultCurieProvider now also takes a Map<String, UriTemplate> to expose multiple curies. The default curie to be used to expand unprefixed, non-IANA link relations has to be defined explicitly in case more than one curie is if given. If there's only one, that becomes the default, too.
The curie rendering has been improved in the following ways: - Resources now get their embeds inspected for namespaced keys and curies are added if at least one is found. This makes sure curies are also rendered if no namespaced link is registered. - Nested resources skip curies entirely, assuming they have been added to the root correctly. Had to change the order of _embedded and _links to make sure the embedded elements are processed first to tweak the links to indicate the need for curies.
…d through a resource bundle. HalLinkListSerializer now tries to obtain a link title by looking up key _links.$rel.title for both the namespaced (curied) and local link relation if the former doesn't resolve into a message.
This commit updates Spring HATEOAS' optional dependency on the JAX-RS API to use the latest version (which uses a different artifact ID). This change will make things a little easier for the Spring IO Platform which currently provides dependency management for Jersey 2.x (which uses JAX-RS 2.0), by allowing it to stop providing dependency management for the JAX-RS 1.0 API.
Any chance you add a few test cases to express the purpose of the changes and prevent regressions? Also, please remove all changes not related to this ticket, i.e. the cahnge in |
…MessageConverter drop information on rendering on Spring 4.2 and Jackson 2.6. Related tickets: spring-projects/spring-boot#3731, SPR-13318.
…e Maven build runs them.
We now avoid calling URI.toString() to early to prevent the need to re-parse it and thus accidentally cause a double-encoding. Original pull request: spring-projects#382.
Re-introduced the simple isEmpty(…) methods in custom Jackson serializers as the more complex ones were introduced in Jackson 2.5 only. Removed the @OverRide annotations so that we could even compile against 2.4 if needed.
I did not post my test project and an still digging through your test code, so you will get your tests some day later. Extracting removal of the warning expression was most easy so you got this as a separate pull request first. Let me first start with the semantics (notation borrowed from jasmine):
|
Hi olivergierke, And in general most of the models have id and method implemented getId(), and ResourceSupport has method getId to get link. is there any other way to use it except changing the method name in model class ? |
Same issues as @DharaSingh
Using 0.20.0.RELEASE |
Thank you for the discussion. Kindly move it (and your support) to #387. |
Thanks @tinne and @odrotbohm , |
The @JSONVIEW annotation supports filtering class trees in order to provide custom views on specific partial data, cf. eg. https://spring.io/blog/2014/12/02/latest-jackson-integration-improvements-in-spring
The main purpose of this patch is to provide a means of views including the links properties of REST models using ResourceSupport. Usage: extend Link.LinkView to denote your view properties.
Also contributes bundlor support for eclipse m2e environment: tell eclipse to run bundlor:bundlor even on incremental builds.