diff --git a/samples/rest-notes-slate/slate/source/api-guide.md.erb b/samples/rest-notes-slate/slate/source/api-guide.md.erb index 11248a3e..77dab522 100644 --- a/samples/rest-notes-slate/slate/source/api-guide.md.erb +++ b/samples/rest-notes-slate/slate/source/api-guide.md.erb @@ -49,9 +49,9 @@ that describes the problem. The error object has the following structure: ## Hypermedia RESTful Notes uses hypermedia and resources include links to other resources in their -responses. Responses are in [Hypertext Application Language (HAL)](http://stateless.co/hal_specification.html format). -Links can be found beneath the `_links` key. Users of the API should not create URIs -themselves, instead they should use the above-described links to navigate +responses. Responses are in [Hypertext Application Language (HAL)](https://github.com/mikekelly/hal_specification) +format. Links can be found beneath the `_links` key. Users of the API should not create +URIs themselves, instead they should use the above-described links to navigate diff --git a/samples/rest-notes-slate/src/test/java/com/example/notes/ApiDocumentation.java b/samples/rest-notes-slate/src/test/java/com/example/notes/ApiDocumentation.java index 417d970a..ef702fa1 100644 --- a/samples/rest-notes-slate/src/test/java/com/example/notes/ApiDocumentation.java +++ b/samples/rest-notes-slate/src/test/java/com/example/notes/ApiDocumentation.java @@ -128,8 +128,8 @@ public class ApiDocumentation { createNote("REST maturity model", "https://martinfowler.com/articles/richardsonMaturityModel.html"); createNote("Hypertext Application Language (HAL)", - "http://stateless.co/hal_specification.html"); - createNote("Application-Level Profile Semantics (ALPS)", "http://alps.io/spec/"); + "https://github.com/mikekelly/hal_specification"); + createNote("Application-Level Profile Semantics (ALPS)", "https://github.com/alps-io/spec"); this.mockMvc.perform(get("/notes")) .andExpect(status().isOk()) diff --git a/samples/rest-notes-spring-data-rest/src/main/asciidoc/api-guide.adoc b/samples/rest-notes-spring-data-rest/src/main/asciidoc/api-guide.adoc index 4f7697d7..45a80cb3 100644 --- a/samples/rest-notes-spring-data-rest/src/main/asciidoc/api-guide.adoc +++ b/samples/rest-notes-spring-data-rest/src/main/asciidoc/api-guide.adoc @@ -75,10 +75,10 @@ include::{snippets}/error-example/http-response.adoc[] == Hypermedia RESTful Notes uses hypermedia and resources include links to other resources in their -responses. Responses are in http://stateless.co/hal_specification.html[Hypertext Application -from resource to resource. -Language (HAL)] format. Links can be found beneath the `_links` key. Users of the API should -not create URIs themselves, instead they should use the above-described links to navigate +responses. Responses are in https://github.com/mikekelly/hal_specification[Hypertext +Application Language (HAL)] format. Links can be found beneath the `_links` key. Users of +the API should not create URIs themselves, instead they should use the above-described +links to navigate from resource to resource. [[resources]] = Resources diff --git a/samples/rest-notes-spring-data-rest/src/main/asciidoc/getting-started-guide.adoc b/samples/rest-notes-spring-data-rest/src/main/asciidoc/getting-started-guide.adoc index 0068e8fc..78a44236 100644 --- a/samples/rest-notes-spring-data-rest/src/main/asciidoc/getting-started-guide.adoc +++ b/samples/rest-notes-spring-data-rest/src/main/asciidoc/getting-started-guide.adoc @@ -45,7 +45,8 @@ cURL: include::{snippets}/index/1/curl-request.adoc[] This request should yield the following response in the -http://stateless.co/hal_specification.html[Hypertext Application Language (HAL)] format: +https://github.com/mikekelly/hal_specification[Hypertext Application Language (HAL)] +format: include::{snippets}/index/1/http-response.adoc[] diff --git a/samples/rest-notes-spring-hateoas/src/docs/asciidoc/api-guide.adoc b/samples/rest-notes-spring-hateoas/src/docs/asciidoc/api-guide.adoc index c0a42afd..30d3d159 100644 --- a/samples/rest-notes-spring-hateoas/src/docs/asciidoc/api-guide.adoc +++ b/samples/rest-notes-spring-hateoas/src/docs/asciidoc/api-guide.adoc @@ -82,10 +82,10 @@ include::{snippets}/error-example/http-response.adoc[] == Hypermedia RESTful Notes uses hypermedia and resources include links to other resources in their -responses. Responses are in http://stateless.co/hal_specification.html[Hypertext Application -from resource to resource. -Language (HAL)] format. Links can be found beneath the `_links` key. Users of the API should -not create URIs themselves, instead they should use the above-described links to navigate +responses. Responses are in https://github.com/mikekelly/hal_specification[Hypertext +Application Language (HAL)] format. Links can be found beneath the `_links` key. Users of +the API should not create URIs themselves, instead they should use the above-described +links to navigate from resource to resource. [[resources]] = Resources diff --git a/samples/rest-notes-spring-hateoas/src/test/java/com/example/notes/ApiDocumentation.java b/samples/rest-notes-spring-hateoas/src/test/java/com/example/notes/ApiDocumentation.java index 1fdc0f99..23d51fcf 100644 --- a/samples/rest-notes-spring-hateoas/src/test/java/com/example/notes/ApiDocumentation.java +++ b/samples/rest-notes-spring-hateoas/src/test/java/com/example/notes/ApiDocumentation.java @@ -147,7 +147,7 @@ public class ApiDocumentation { public void notesListExample() throws Exception { this.noteRepository.deleteAll(); - createNote("REST maturity model", "https://martinfowler.com/articles/richardsonMaturityModel.html");<<<<<<< HEAD + createNote("REST maturity model", "https://martinfowler.com/articles/richardsonMaturityModel.html"); createNote("Hypertext Application Language (HAL)", "https://github.com/mikekelly/hal_specification"); createNote("Application-Level Profile Semantics (ALPS)", "https://github.com/alps-io/spec"); diff --git a/spring-restdocs-core/src/main/java/org/springframework/restdocs/operation/preprocess/PrettyPrintingContentModifier.java b/spring-restdocs-core/src/main/java/org/springframework/restdocs/operation/preprocess/PrettyPrintingContentModifier.java index 8dbfaec7..67f0949d 100644 --- a/spring-restdocs-core/src/main/java/org/springframework/restdocs/operation/preprocess/PrettyPrintingContentModifier.java +++ b/spring-restdocs-core/src/main/java/org/springframework/restdocs/operation/preprocess/PrettyPrintingContentModifier.java @@ -82,7 +82,7 @@ public class PrettyPrintingContentModifier implements ContentModifier { public byte[] prettyPrint(byte[] original) throws Exception { Transformer transformer = TransformerFactory.newInstance().newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); - transformer.setOutputProperty("{https://xml.apache.org/xslt}indent-amount", + transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); transformer.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, "yes"); ByteArrayOutputStream transformed = new ByteArrayOutputStream(); diff --git a/spring-restdocs-restassured/src/test/java/org/springframework/restdocs/restassured/operation/preprocess/UriModifyingOperationPreprocessorTests.java b/spring-restdocs-restassured/src/test/java/org/springframework/restdocs/restassured/operation/preprocess/UriModifyingOperationPreprocessorTests.java index a356d1d2..746e2915 100644 --- a/spring-restdocs-restassured/src/test/java/org/springframework/restdocs/restassured/operation/preprocess/UriModifyingOperationPreprocessorTests.java +++ b/spring-restdocs-restassured/src/test/java/org/springframework/restdocs/restassured/operation/preprocess/UriModifyingOperationPreprocessorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2016 the original author or authors. + * Copyright 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -133,7 +133,7 @@ public class UriModifyingOperationPreprocessorTests { this.preprocessor.host("api.example.com"); OperationRequest processed = this.preprocessor .preprocess(createRequestWithContent( - "The uri 'http://localhost:12345' should be used")); + "The uri 'https://localhost:12345' should be used")); assertThat(new String(processed.getContent()), is(equalTo("The uri 'https://api.example.com:12345' should be used"))); } @@ -213,7 +213,7 @@ public class UriModifyingOperationPreprocessorTests { this.preprocessor.host("api.example.com"); OperationResponse processed = this.preprocessor .preprocess(createResponseWithContent( - "The uri 'http://localhost:12345' should be used")); + "The uri 'https://localhost:12345' should be used")); assertThat(new String(processed.getContent()), is(equalTo("The uri 'https://api.example.com:12345' should be used"))); } @@ -281,7 +281,7 @@ public class UriModifyingOperationPreprocessorTests { @Test public void urisInRequestHeadersCanBeModified() { OperationRequest processed = this.preprocessor.host("api.example.com") - .preprocess(createRequestWithHeader("Foo", "http://locahost:12345")); + .preprocess(createRequestWithHeader("Foo", "https://locahost:12345")); assertThat(processed.getHeaders().getFirst("Foo"), is(equalTo("https://api.example.com:12345"))); assertThat(processed.getHeaders().getFirst("Host"), @@ -291,7 +291,7 @@ public class UriModifyingOperationPreprocessorTests { @Test public void urisInResponseHeadersCanBeModified() { OperationResponse processed = this.preprocessor.host("api.example.com") - .preprocess(createResponseWithHeader("Foo", "http://locahost:12345")); + .preprocess(createResponseWithHeader("Foo", "https://locahost:12345")); assertThat(processed.getHeaders().getFirst("Foo"), is(equalTo("https://api.example.com:12345"))); } @@ -299,7 +299,7 @@ public class UriModifyingOperationPreprocessorTests { @Test public void urisInRequestPartHeadersCanBeModified() { OperationRequest processed = this.preprocessor.host("api.example.com").preprocess( - createRequestWithPartWithHeader("Foo", "http://locahost:12345")); + createRequestWithPartWithHeader("Foo", "https://locahost:12345")); assertThat(processed.getParts().iterator().next().getHeaders().getFirst("Foo"), is(equalTo("https://api.example.com:12345"))); } @@ -308,7 +308,7 @@ public class UriModifyingOperationPreprocessorTests { public void urisInRequestPartContentCanBeModified() { OperationRequest processed = this.preprocessor.host("api.example.com") .preprocess(createRequestWithPartWithContent( - "The uri 'http://localhost:12345' should be used")); + "The uri 'https://localhost:12345' should be used")); assertThat(new String(processed.getParts().iterator().next().getContent()), is(equalTo("The uri 'https://api.example.com:12345' should be used"))); }