From c207caca84b89f85483db5bdc05f518304440aca Mon Sep 17 00:00:00 2001 From: Greg Turnquist Date: Wed, 14 Aug 2019 13:48:14 -0500 Subject: [PATCH] #1054 - Backport fix for unresolved references. --- src/main/asciidoc/index.adoc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/asciidoc/index.adoc b/src/main/asciidoc/index.adoc index fb461e25..f7d03865 100644 --- a/src/main/asciidoc/index.adoc +++ b/src/main/asciidoc/index.adoc @@ -4,6 +4,8 @@ Oliver Gierke; Greg Turnquist; Jay Bryant :revdate: {localdate} :toc: left :hide-uri-scheme: +:base-dir: ../../../ + This project provides some APIs to ease creating REST representations that follow the https://en.wikipedia.org/wiki/HATEOAS[HATEOAS] principle when working with Spring and especially Spring MVC. The core problem it tries to address is link creation and representation assembly. @@ -381,18 +383,18 @@ The example listed above is the simplest version of traversal, where the rels ar There are more options to customize template parameters at each level. -[source,java,indent=0] +[source,java,indent=0, tabsize=2] ---- -include::{baseDir}/src/test/java/org/springframework/hateoas/client/TraversonTest.java[tag=hop-with-param] +include::{base-dir}/src/test/java/org/springframework/hateoas/client/TraversonTest.java[tag=hop-with-param] ---- The static `rel(...)` function is a convenient way to define a single `Hop`. Using `.withParameter(key, value)` makes it simple to specify URI Template variables. NOTE: `.withParameter()` returns a new Hop object that is chainable. You can string together as many `.withParameter` as you like. The result is a single Hop definition. -[source,java,indent=0] +[source,java,indent=0, tabsize=2] ---- -include::{baseDir}/src/test/java/org/springframework/hateoas/client/TraversonTest.java[tag=hop-put] +include::{base-dir}/src/test/java/org/springframework/hateoas/client/TraversonTest.java[tag=hop-put] ---- It's also possible to load an entire `Map` of parameters via `.withParameters(Map)`.