Commit Graph

452 Commits

Author SHA1 Message Date
Oliver Drotbohm
f830d3d641 #806 - Polishing. 2019-02-11 14:57:31 +01:00
Oliver Drotbohm
aca2cc578a #806 - Fixed package cycle between hateoas and hateoas.core packages.
Moved AffordanceModelFactory to the library's root package. Moved Kotlin extensions to hateoas.mvc package.

Added an ArchUnit based test for package cycles.
2019-02-11 14:57:25 +01:00
Oliver Drotbohm
e794bf873a #805 - Polishing.
Whitespace.
2019-02-11 10:41:49 +01:00
Oliver Drotbohm
1dea5f61b9 #805 - Added Links.getRequiredLink(…). 2019-02-11 10:41:49 +01:00
Greg Turnquist
a9bae74dcf #793 - Switch from @Order to Ordered. 2019-02-07 16:44:42 -06:00
Oliver Drotbohm
ca72790b4b #804 - Avoid log output in MultiMediaTypeWebMvcIntegrationTests. 2019-02-07 20:21:41 +01:00
Oliver Drotbohm
c0903cb33e #803 - Polishing.
Method reordering. Whitespace.
2019-02-07 20:13:23 +01:00
Oliver Drotbohm
df6e1e5989 #803 - Removed reflective bridging between JSONPath 0.9 and 1.0.
We're on JSONPath 2.2 already.
2019-02-07 20:12:21 +01:00
Greg Turnquist
9e8e57a74b #787 - Return all Link attributes on discovery. 2019-02-07 11:42:08 -06:00
Greg Turnquist
9518a2db9a #791 - Add 'name' property to Link. (#801) 2019-02-07 08:13:49 -06:00
Greg Turnquist
9590d1f9ef #798 - Polishing. 2019-02-06 10:31:52 -06:00
Jay Bryant
a483daab6d #798 - Modernize documentation production and appearance.
Applied new convention standard for generating documentation using spring-doc-resources.
2019-02-06 10:26:48 -06:00
Jay Bryant
952422b4e5 #797 - Editing pass of the reference documents.
I edited for spelling, punctuation, grammar, usage, and corporate voice.
2019-02-05 11:15:13 -06:00
Oliver Drotbohm
c16ac486e4 #792 - Upgrade to Jackson 2.9.8. 2019-01-29 16:51:34 +01:00
Greg Turnquist
f420b5b258 #788 - Migrate edge release from JDK 12 to JDK 13. 2019-01-23 14:11:50 -06:00
Jens Schauder
9f4f1ad79b #788 - Fixed obvious warning in all touched files.
* Fixed assertions.
* Removed superfluous code.
* Simplified generics.
* Formatting.
2019-01-23 13:59:21 -06:00
Greg Turnquist
4081e58a1f #788 - Switch to IanaLinkRelations internally. 2019-01-18 12:19:25 -06:00
Greg Turnquist
0f696dd637 #788 - Remove redundant generics. 2019-01-18 12:03:45 -06:00
Greg Turnquist
74647cb5b1 #788 - Unify line endings. 2019-01-18 11:38:28 -06:00
Greg Turnquist
5725794a8e #788 - Remove redundant constructs, pre-Java 8 cruft, and superfluous exceptions. 2019-01-18 11:38:19 -06:00
Greg Turnquist
e9074c5d52 #784 - Polishing.
* Formatting.
* Copyright headers.
* Unused/unneeded methods.
2019-01-15 12:12:05 -06:00
Jens Schauder
b7a1c06f79 #784 - Polishing.
* Formatting.
* Extracted conversion methods.
* Tested and fixed NPE with empty pojo.
* Tested and fixed NPE with empty page meta data.
2019-01-15 12:10:47 -06:00
Greg Turnquist
8da3a851ce #784 - Introduce UBER+JSON mediatype.
Based on https://rawgit.com/uber-hypermedia/specification/master/uber-hypermedia.html.
2019-01-09 14:33:41 -06:00
Greg Turnquist
820f66179f #707 - Refactor Affordances to better support Spring Data REST.
* Move Spring MVC method scanning out of the core Affordances API and into SpringMvcAffordanceBuilder to make it easy to use in Spring Data REST (where method scanning isn't needed).
* Also push attributes from Affordance into AffordanceModel to centralize the details.
* Certain serializers must be registered differently due to Jackson's rules of precedence given Spring Data REST needs to override them.
2019-01-07 14:08:42 -06:00
Greg Turnquist
2e7eabdc1a #778 - Introduce LinkRelation and enumerated IANA types.
Include IANA registry text and link to related standard for each link relation.
2019-01-04 12:42:32 -06:00
Kulcsár Roland
9c5d10aa07 #715 - Add link and affordance DSLs to help write idiomatic Kotlin code.
* Provide a LinkBuilderDsl for help create links.
* Provider an AffordanceBuilderDsl to help create affordances.
2019-01-02 13:31:23 -06:00
Greg Turnquist
26c9a3d71e #483 - Polishing.
Since we can't guarantee the incoming Map is <String,Object>, should only cast as <Object,Object> and use `.toString()` for maximum flexibility.
2018-12-21 08:43:21 -06:00
JamesE Richardson
8ced6c5154 #483 - Add composite field support to UriTemplate.
* Added Tests to demonstrate required functionality.
* Expanding variables correctly to meet RFC spec.  Composite values can be expanded either as a list or as an associative array

Also see https://tools.ietf.org/html/rfc6570#section-2.4.2
2018-12-20 20:27:56 -06:00
Jens Schauder
2882e82ba4 #572 - Polishing.
Removed redundant asserts.
2018-12-19 11:36:44 -06:00
Greg Turnquist
a56392ac7c #572 - Create SimpleResourceAssembler for Resource<T>.
Implement a ResourceAssembler based solely on a domain type, returning Resource<T> for the `toResource(obj)` method.

Related issues: #416
2018-12-19 11:36:40 -06:00
Greg Turnquist
62c48544a7 #772 - Fix pipeline to properly build PRs against JDK 12. 2018-12-18 11:12:47 -06:00
Greg Turnquist
a597960711 #416 - Alter ResourceAssemblerSupport.toResources to return Resources.
To avoid confusion about what to return on a Spring MVC endpoint, change toResources to not return `List<D>`, but instead `Resources<D>`. This clearly ensures when used to construct Spring MVC endpoints, will return a type Spring HATEOAS will properly marshal.

To support people that have already built apps on top of Lists, include a `toList<D>` method that honors the old contract.

Related issues: #493
Related pull requests: #572
2018-12-18 10:28:03 -06:00
Greg Turnquist
c333259f2e #764 - Polishing. 2018-12-17 13:31:22 -06:00
Greg Turnquist
a5554ef2e5 #764 - Fix test dependencies to support Java 11.
Several test libraries had to be upgraded to their versions that support Java 11 and higher.
2018-12-17 10:33:16 -06:00
Greg Turnquist
7874be5b08 #764 - Introduce Concourse CI.
Introduces pipeline that replaces the Bambook Spring HATEOAS one which builds on master branch and deploys to artifactory.

Additionally:

* Tests against JDK 8, 11, and 12 before doing the final build and deploy.
* Also handles pull requests, running same suite of tests against mutiple JDKs.
2018-12-14 11:02:48 -06:00
Greg Turnquist
1731b49bc6 #760 - Make Spring Plugin a full dependency.
The scenarios of using Spring HATEOAS without Spring Plugin are too niche to not support the potential error messages should people use Spring HATEOAS outside of Spring Boot.
2018-12-12 12:23:29 -06:00
Greg Turnquist
8bf01c3ee5 #667 - Ignore unknown properties in LinkMixin.
In HAL-based documents (HAL and HAL-FORMS), the "templated" property must be ignored in LinkMixin, because that's where it is applied. Removes the need for a no-op `setTemplated` method in Link.

* Test cases drafted for both HAL an HAL-FORMS to verify proper behavior.
* Jackson2HalFormsIntegrationTest migrated from Hamcrest to AssertJ assertions.

Related pull requests: #668
2018-12-10 08:04:14 -06:00
Jens Schauder
4ce73154df #678 - Polishing.
* Moved compilation of Regexp patterns out of methods in order to not repeat it over and over again.
* Applied soft assertions where multiple assertions where used where one failure didn't guarantee the failure of all other assertions.
* Minor formatting.
2018-12-07 12:26:25 -06:00
Greg Turnquist
6f27ff0379 #678 - Add 'profile' to Link.
Fully support HAL spec by adding "profile" as another optional attribute to `Link`.

See: https://tools.ietf.org/html/draft-kelly-json-hal-08, https://tools.ietf.org/html/rfc5988
2018-12-07 12:26:25 -06:00
Johnny Lim
ca0263fc5a #751 - Align Hop header assertions with HttpHeaders and javadocs.
Spring Framework accepts `null` for header values in HttpHeaders. This is already reflected in the javadocs.
2018-12-07 11:41:10 -06:00
Greg Turnquist
d5649c0de1 #667 - Fix Link to ignore setting "templated" properties.
Deserializing a Link with a templated URI will cause Jackson to break due to there being no "templated" property. This adds a private, no-op `setTemplated` method to allow deserialization to occur yet not alter the Link..
2018-12-06 12:54:28 -06:00
Jens Schauder
367f560745 #695 - Polishing.
* Removed Jaxb annotations from packaga-info.java.
* Simplified Test code by removing unused code a debug output.
* Formatting.
* Updated copyright headers.
2018-12-06 12:25:22 -06:00
Greg Turnquist
dca65e15f8 #695 - Remove Jaxb annotations.
By removing all Jaxb annotations, requesting data from a hypermedia-enabled endpoint inside a browser (which defaults to accept:application/xhtml+xml,*/*), Spring HATEOAS will yield HAL.
2018-12-06 12:00:44 -06:00
Oliver Drotbohm
eff893fcf8 #758 - Polishing.
Original pull request: #717.
2018-12-06 14:21:10 +01:00
Greg Turnquist
bb4a4a615c #758 - Centralize all Forward header handling.
Spring 5.1 is centralizing all Forward header handling. This moves critical bits into one location, making it easy to completely remove once we rebaseline against this version.

Also adds a test profile to ensure Spring 5.1 doesn't break anything.

Original pull request: #717.
2018-12-06 14:20:54 +01:00
Oliver Drotbohm
267ff45043 #754 - Upgrade to Jackson 2.9.7. 2018-12-06 13:22:20 +01:00
Greg Turnquist
9f7eaeecd9 #752 - Upgraded to latest Spring 5.0 version. 2018-11-26 15:29:49 -06:00
Greg Turnquist
df618efd12 #743 - Polishing. 2018-10-25 11:54:25 -05:00
Manish Misra
b60799d7fa #743 - Allow custom headers on each hop. 2018-10-25 11:39:15 -05:00
Oliver Gierke
8cfbfc1b89 #719 - Simplified configuration setup.
We now avoid to register ObjectMapper instances as Spring beans and rather use one already existing in the ApplicationContext and copying the setup before registering the individual HttpMessageConverters for the individual media types.

Replaced a lot of the programmatic component setup via BeanDefinitions with their corresponding JavaConfig alternatives.

Removed obsolete media type specific HttpMessageConverters and configuration classes registering them.
2018-06-22 11:30:16 +02:00