From 289ba5715982b0cb4245bf74fe7f251853e29450 Mon Sep 17 00:00:00 2001 From: Ronald Kurr Date: Wed, 18 Feb 2015 10:38:15 -0500 Subject: [PATCH] Update README to recommend that pretty printing of JSON is enabled Closes gh-16 --- README.md | 7 +++++++ .../src/main/resources/application.properties | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f0e5bacd..e86e47bb 100644 --- a/README.md +++ b/README.md @@ -283,6 +283,13 @@ be written: - `index/response.asciidoc` - `index/request-response.asciidoc` +#### Pretty-printed snippets + +To improve the readability of the generated snippets you may want to configure your +application to produce JSON that has been pretty-printed. If you are a Spring Boot +user you can do so by setting the `spring.jackson.serialization.indent_output` property +to `true`. + ### Hand-written documentation Producing high-quality, easily readable documentation is difficult and the process is diff --git a/samples/rest-notes-spring-hateoas/src/main/resources/application.properties b/samples/rest-notes-spring-hateoas/src/main/resources/application.properties index aa4637f1..8e06a828 100644 --- a/samples/rest-notes-spring-hateoas/src/main/resources/application.properties +++ b/samples/rest-notes-spring-hateoas/src/main/resources/application.properties @@ -1 +1 @@ -http.mappers.json-pretty-print: true \ No newline at end of file +spring.jackson.serialization.indent_output: true \ No newline at end of file