From f2e60ea3473f1560e315ccee8f98b4d51584b006 Mon Sep 17 00:00:00 2001 From: Spring Operator Date: Tue, 26 Mar 2019 04:42:31 -0500 Subject: [PATCH 1/4] Use HTTPS for external links where possible See gh-609 --- CODE_OF_CONDUCT.md | 4 ++-- CONTRIBUTING.md | 2 +- docs/src/docs/asciidoc/contributing.adoc | 2 +- docs/src/docs/asciidoc/documenting-your-api.adoc | 2 +- docs/src/docs/asciidoc/getting-started.adoc | 6 +++--- docs/src/docs/asciidoc/index.adoc | 4 ++-- docs/src/docs/asciidoc/introduction.adoc | 2 +- docs/src/docs/asciidoc/working-with-asciidoctor.adoc | 10 +++++----- .../src/main/asciidoc/getting-started-guide.adoc | 2 +- .../test/java/com/example/notes/ApiDocumentation.java | 8 ++++---- .../src/docs/asciidoc/getting-started-guide.adoc | 2 +- .../test/java/com/example/notes/ApiDocumentation.java | 8 ++++---- .../restdocs/hypermedia/HypermediaDocumentation.java | 4 ++-- .../preprocess/PrettyPrintingContentModifier.java | 2 +- .../hypermedia/LinkExtractorsPayloadTests.java | 10 +++++----- .../multiple-fields-and-embedded-and-links.json | 4 ++-- .../field-payloads/multiple-fields-and-links.json | 4 ++-- .../atom/multiple-links-different-rels.json | 4 ++-- .../link-payloads/atom/multiple-links-same-rels.json | 4 ++-- .../test/resources/link-payloads/atom/single-link.json | 2 +- .../resources/link-payloads/atom/wrong-format.json | 4 ++-- .../hal/multiple-links-different-rels.json | 4 ++-- .../link-payloads/hal/multiple-links-same-rels.json | 4 ++-- .../test/resources/link-payloads/hal/single-link.json | 2 +- .../test/resources/link-payloads/hal/wrong-format.json | 4 ++-- 25 files changed, 52 insertions(+), 52 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 4df5b8d4..b8dfcb90 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -42,5 +42,5 @@ with regard to the reporter of an incident. This Code of Conduct is adapted from the [Contributor Covenant][1], version 1.3.0, available at [contributor-covenant.org/version/1/3/0/][2]. -[1]: http://contributor-covenant.org -[2]: http://contributor-covenant.org/version/1/3/0/ \ No newline at end of file +[1]: https://contributor-covenant.org +[2]: https://contributor-covenant.org/version/1/3/0/ \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5b609d53..2a8c3c7f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -62,4 +62,4 @@ The project can then be imported into Eclipse using `File -> Import…` and then [1]: CODE_OF_CONDUCT.md [2]: https://support.springsource.com/spring_committer_signup -[3]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html \ No newline at end of file +[3]: https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html \ No newline at end of file diff --git a/docs/src/docs/asciidoc/contributing.adoc b/docs/src/docs/asciidoc/contributing.adoc index ce726ed6..c2c59436 100644 --- a/docs/src/docs/asciidoc/contributing.adoc +++ b/docs/src/docs/asciidoc/contributing.adoc @@ -9,7 +9,7 @@ for your RESTful services. However, we can't achieve that goal without your cont [[contributing-questions]] === Questions -You can ask questions about Spring REST Docs on http://stackoverflow.com[StackOverflow] +You can ask questions about Spring REST Docs on https://stackoverflow.com[StackOverflow] using the `spring-restdocs` tag. Similarly, we encourage you to help your fellow Spring REST Docs users by answering questions. diff --git a/docs/src/docs/asciidoc/documenting-your-api.adoc b/docs/src/docs/asciidoc/documenting-your-api.adoc index 25fc52b1..01928fba 100644 --- a/docs/src/docs/asciidoc/documenting-your-api.adoc +++ b/docs/src/docs/asciidoc/documenting-your-api.adoc @@ -444,7 +444,7 @@ A number of snippets are produced automatically when you document a call to |Snippet | Description | `curl-request.adoc` -| Contains the http://curl.haxx.se[`curl`] command that is equivalent to the `MockMvc` +| Contains the https://curl.haxx.se[`curl`] command that is equivalent to the `MockMvc` call that is being documented | `http-request.adoc` diff --git a/docs/src/docs/asciidoc/getting-started.adoc b/docs/src/docs/asciidoc/getting-started.adoc index 4a12eef4..69a07874 100644 --- a/docs/src/docs/asciidoc/getting-started.adoc +++ b/docs/src/docs/asciidoc/getting-started.adoc @@ -10,9 +10,9 @@ This section describes how to get started with Spring REST Docs. If you want to jump straight in, there are two sample applications available. {samples}/rest-notes-spring-hateoas[One sample] uses -http://projects.spring.io/spring-hateoas/[Spring HATEOAS] and +https://projects.spring.io/spring-hateoas/[Spring HATEOAS] and {samples}/rest-notes-spring-data-rest[the other] uses -http://projects.spring.io/spring-data-rest/[Spring Data REST]. Both samples use +https://projects.spring.io/spring-data-rest/[Spring Data REST]. Both samples use Spring REST Docs to produce a detailed API guide and a getting started walkthrough. Each sample contains a file named `api-guide.adoc` that produces an API guide for the @@ -295,7 +295,7 @@ that can be produced by Spring REST Docs. === Using the snippets The generated snippets can be included in your documentation using the -http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#include-files[include macro]. +https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#include-files[include macro]. The `snippets` attribute specified in the <> can be used to reference the snippets output directory. For example: diff --git a/docs/src/docs/asciidoc/index.adoc b/docs/src/docs/asciidoc/index.adoc index 17cde86e..96f519d7 100644 --- a/docs/src/docs/asciidoc/index.adoc +++ b/docs/src/docs/asciidoc/index.adoc @@ -12,8 +12,8 @@ Andy Wilkinson :source: {github}/tree/{branch-or-tag} :samples: {source}/samples :templates: {source}spring-restdocs/src/main/resources/org/springframework/restdocs/templates -:spring-boot-docs: http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle -:spring-framework-docs: http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle +:spring-boot-docs: https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle +:spring-framework-docs: https://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle [[abstract]] diff --git a/docs/src/docs/asciidoc/introduction.adoc b/docs/src/docs/asciidoc/introduction.adoc index 9590ac35..2eef3b6d 100644 --- a/docs/src/docs/asciidoc/introduction.adoc +++ b/docs/src/docs/asciidoc/introduction.adoc @@ -6,7 +6,7 @@ services that is accurate and readable. Writing high-quality documentation is difficult. One way to ease that difficulty is to use tools that are well-suited to the job. To this end, Spring REST Docs uses -http://asciidoctor.org[Asciidoctor]. Asciidoctor processes plain text and produces +https://asciidoctor.org[Asciidoctor]. Asciidoctor processes plain text and produces HTML, styled and layed out to suit your needs. Spring REST Docs makes use of snippets produced by tests written with diff --git a/docs/src/docs/asciidoc/working-with-asciidoctor.adoc b/docs/src/docs/asciidoc/working-with-asciidoctor.adoc index ce166410..75a3ba7f 100644 --- a/docs/src/docs/asciidoc/working-with-asciidoctor.adoc +++ b/docs/src/docs/asciidoc/working-with-asciidoctor.adoc @@ -9,15 +9,15 @@ relevant to Spring REST Docs. [[working-with-asciidoctor-resources]] === Resources - * http://asciidoctor.org/docs/asciidoc-syntax-quick-reference[Syntax quick reference] - * http://asciidoctor.org/docs/user-manual[User manual] + * https://asciidoctor.org/docs/asciidoc-syntax-quick-reference[Syntax quick reference] + * https://asciidoctor.org/docs/user-manual[User manual] [[working-with-asciidoctor-including-snippets]] === Including snippets -The http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#include-files[include +The https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#include-files[include macro] is used to include generated snippets in your documentation. The `snippets` attribute specified in the <> can be used to reference the snippets output directory, for example: @@ -42,7 +42,7 @@ snippet is included or by using a custom snippet template. ==== Formatting columns Asciidoctor has rich support for -http://asciidoctor.org/docs/user-manual/#cols-format[formatting a table's columns]. For +https://asciidoctor.org/docs/user-manual/#cols-format[formatting a table's columns]. For example, the widths of a table's columns can be specified using the `cols` attribute: [source,adoc,indent=0] @@ -71,5 +71,5 @@ The title of a table can be specified using a line prefixed by a `.`: ==== Further reading -Refer to the http://asciidoctor.org/docs/user-manual/#tables[Tables section of +Refer to the https://asciidoctor.org/docs/user-manual/#tables[Tables section of the Asciidoctor user manual] for more information about customizing tables. \ No newline at end of file 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 df16161a..0068e8fc 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 @@ -20,7 +20,7 @@ to describe the relationships between resources and to allow navigation between [getting-started-running-the-service] == Running the service -RESTful Notes is written using http://projects.spring.io/spring-boot[Spring Boot] which +RESTful Notes is written using https://projects.spring.io/spring-boot[Spring Boot] which makes it easy to get it up and running so that you can start exploring the REST API. The first step is to clone the Git repository: diff --git a/samples/rest-notes-spring-data-rest/src/test/java/com/example/notes/ApiDocumentation.java b/samples/rest-notes-spring-data-rest/src/test/java/com/example/notes/ApiDocumentation.java index 4eda380e..498eee26 100644 --- a/samples/rest-notes-spring-data-rest/src/test/java/com/example/notes/ApiDocumentation.java +++ b/samples/rest-notes-spring-data-rest/src/test/java/com/example/notes/ApiDocumentation.java @@ -125,7 +125,7 @@ public class ApiDocumentation { this.noteRepository.deleteAll(); createNote("REST maturity model", - "http://martinfowler.com/articles/richardsonMaturityModel.html"); + "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/"); @@ -151,7 +151,7 @@ public class ApiDocumentation { Map note = new HashMap(); note.put("title", "REST maturity model"); - note.put("body", "http://martinfowler.com/articles/richardsonMaturityModel.html"); + note.put("body", "https://martinfowler.com/articles/richardsonMaturityModel.html"); note.put("tags", Arrays.asList(tagLocation)); this.mockMvc.perform( @@ -179,7 +179,7 @@ public class ApiDocumentation { Map note = new HashMap(); note.put("title", "REST maturity model"); - note.put("body", "http://martinfowler.com/articles/richardsonMaturityModel.html"); + note.put("body", "https://martinfowler.com/articles/richardsonMaturityModel.html"); note.put("tags", Arrays.asList(tagLocation)); String noteLocation = this.mockMvc @@ -239,7 +239,7 @@ public class ApiDocumentation { public void noteUpdateExample() throws Exception { Map note = new HashMap(); note.put("title", "REST maturity model"); - note.put("body", "http://martinfowler.com/articles/richardsonMaturityModel.html"); + note.put("body", "https://martinfowler.com/articles/richardsonMaturityModel.html"); String noteLocation = this.mockMvc .perform( diff --git a/samples/rest-notes-spring-hateoas/src/docs/asciidoc/getting-started-guide.adoc b/samples/rest-notes-spring-hateoas/src/docs/asciidoc/getting-started-guide.adoc index 096e00ab..c951418c 100644 --- a/samples/rest-notes-spring-hateoas/src/docs/asciidoc/getting-started-guide.adoc +++ b/samples/rest-notes-spring-hateoas/src/docs/asciidoc/getting-started-guide.adoc @@ -20,7 +20,7 @@ to describe the relationships between resources and to allow navigation between [getting-started-running-the-service] == Running the service -RESTful Notes is written using http://projects.spring.io/spring-boot[Spring Boot] which +RESTful Notes is written using https://projects.spring.io/spring-boot[Spring Boot] which makes it easy to get it up and running so that you can start exploring the REST API. The first step is to clone the Git repository: 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 a0166eda..4c72fe81 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 @@ -151,7 +151,7 @@ public class ApiDocumentation { this.noteRepository.deleteAll(); createNote("REST maturity model", - "http://martinfowler.com/articles/richardsonMaturityModel.html"); + "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/"); @@ -178,7 +178,7 @@ public class ApiDocumentation { Map note = new HashMap(); note.put("title", "REST maturity model"); - note.put("body", "http://martinfowler.com/articles/richardsonMaturityModel.html"); + note.put("body", "https://martinfowler.com/articles/richardsonMaturityModel.html"); note.put("tags", Arrays.asList(tagLocation)); ConstrainedFields fields = new ConstrainedFields(NoteInput.class); @@ -209,7 +209,7 @@ public class ApiDocumentation { Map note = new HashMap(); note.put("title", "REST maturity model"); - note.put("body", "http://martinfowler.com/articles/richardsonMaturityModel.html"); + note.put("body", "https://martinfowler.com/articles/richardsonMaturityModel.html"); note.put("tags", Arrays.asList(tagLocation)); String noteLocation = this.mockMvc @@ -275,7 +275,7 @@ public class ApiDocumentation { public void noteUpdateExample() throws Exception { Map note = new HashMap(); note.put("title", "REST maturity model"); - note.put("body", "http://martinfowler.com/articles/richardsonMaturityModel.html"); + note.put("body", "https://martinfowler.com/articles/richardsonMaturityModel.html"); String noteLocation = this.mockMvc .perform( diff --git a/spring-restdocs-core/src/main/java/org/springframework/restdocs/hypermedia/HypermediaDocumentation.java b/spring-restdocs-core/src/main/java/org/springframework/restdocs/hypermedia/HypermediaDocumentation.java index 937dbbc8..f259d3b2 100644 --- a/spring-restdocs-core/src/main/java/org/springframework/restdocs/hypermedia/HypermediaDocumentation.java +++ b/spring-restdocs-core/src/main/java/org/springframework/restdocs/hypermedia/HypermediaDocumentation.java @@ -146,7 +146,7 @@ public abstract class HypermediaDocumentation { * { * "_links": { * "self": { - * "href": "http://example.com/foo" + * "href": "https://example.com/foo" * } * } * } @@ -167,7 +167,7 @@ public abstract class HypermediaDocumentation { * "links": [ * { * "rel": "self", - * "href": "http://example.com/foo" + * "href": "https://example.com/foo" * } * ] * } 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 67f0949d..8dbfaec7 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("{http://xml.apache.org/xslt}indent-amount", + transformer.setOutputProperty("{https://xml.apache.org/xslt}indent-amount", "4"); transformer.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, "yes"); ByteArrayOutputStream transformed = new ByteArrayOutputStream(); diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/hypermedia/LinkExtractorsPayloadTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/hypermedia/LinkExtractorsPayloadTests.java index b6d8f4c3..8889d365 100644 --- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/hypermedia/LinkExtractorsPayloadTests.java +++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/hypermedia/LinkExtractorsPayloadTests.java @@ -68,23 +68,23 @@ public class LinkExtractorsPayloadTests { public void singleLink() throws IOException { Map> links = this.linkExtractor .extractLinks(createResponse("single-link")); - assertLinks(Arrays.asList(new Link("alpha", "http://alpha.example.com")), links); + assertLinks(Arrays.asList(new Link("alpha", "https://alpha.example.com")), links); } @Test public void multipleLinksWithDifferentRels() throws IOException { Map> links = this.linkExtractor .extractLinks(createResponse("multiple-links-different-rels")); - assertLinks(Arrays.asList(new Link("alpha", "http://alpha.example.com"), - new Link("bravo", "http://bravo.example.com")), links); + assertLinks(Arrays.asList(new Link("alpha", "https://alpha.example.com"), + new Link("bravo", "https://bravo.example.com")), links); } @Test public void multipleLinksWithSameRels() throws IOException { Map> links = this.linkExtractor .extractLinks(createResponse("multiple-links-same-rels")); - assertLinks(Arrays.asList(new Link("alpha", "http://alpha.example.com/one"), - new Link("alpha", "http://alpha.example.com/two")), links); + assertLinks(Arrays.asList(new Link("alpha", "https://alpha.example.com/one"), + new Link("alpha", "https://alpha.example.com/two")), links); } @Test diff --git a/spring-restdocs-core/src/test/resources/field-payloads/multiple-fields-and-embedded-and-links.json b/spring-restdocs-core/src/test/resources/field-payloads/multiple-fields-and-embedded-and-links.json index fdaf197d..e4ceed00 100644 --- a/spring-restdocs-core/src/test/resources/field-payloads/multiple-fields-and-embedded-and-links.json +++ b/spring-restdocs-core/src/test/resources/field-payloads/multiple-fields-and-embedded-and-links.json @@ -1,7 +1,7 @@ { "_links": { - "alpha": "http://alpha.example.com", - "bravo": "http://bravo.example.com" + "alpha": "https://alpha.example.com", + "bravo": "https://bravo.example.com" }, "_embedded": "embedded-test", "beta": "beta-value", diff --git a/spring-restdocs-core/src/test/resources/field-payloads/multiple-fields-and-links.json b/spring-restdocs-core/src/test/resources/field-payloads/multiple-fields-and-links.json index 794ece50..b4ca7edc 100644 --- a/spring-restdocs-core/src/test/resources/field-payloads/multiple-fields-and-links.json +++ b/spring-restdocs-core/src/test/resources/field-payloads/multiple-fields-and-links.json @@ -1,7 +1,7 @@ { "_links": { - "alpha": "http://alpha.example.com", - "bravo": "http://bravo.example.com" + "alpha": "https://alpha.example.com", + "bravo": "https://bravo.example.com" }, "beta": "beta-value", "charlie": "charlie-value" diff --git a/spring-restdocs-core/src/test/resources/link-payloads/atom/multiple-links-different-rels.json b/spring-restdocs-core/src/test/resources/link-payloads/atom/multiple-links-different-rels.json index 35e63537..f20e706c 100644 --- a/spring-restdocs-core/src/test/resources/link-payloads/atom/multiple-links-different-rels.json +++ b/spring-restdocs-core/src/test/resources/link-payloads/atom/multiple-links-different-rels.json @@ -1,9 +1,9 @@ { "links": [ { "rel": "alpha", - "href": "http://alpha.example.com" + "href": "https://alpha.example.com" }, { "rel": "bravo", - "href": "http://bravo.example.com" + "href": "https://bravo.example.com" } ] } \ No newline at end of file diff --git a/spring-restdocs-core/src/test/resources/link-payloads/atom/multiple-links-same-rels.json b/spring-restdocs-core/src/test/resources/link-payloads/atom/multiple-links-same-rels.json index ff0d3f4a..8257cb9f 100644 --- a/spring-restdocs-core/src/test/resources/link-payloads/atom/multiple-links-same-rels.json +++ b/spring-restdocs-core/src/test/resources/link-payloads/atom/multiple-links-same-rels.json @@ -1,9 +1,9 @@ { "links": [ { "rel": "alpha", - "href": "http://alpha.example.com/one" + "href": "https://alpha.example.com/one" }, { "rel": "alpha", - "href": "http://alpha.example.com/two" + "href": "https://alpha.example.com/two" } ] } \ No newline at end of file diff --git a/spring-restdocs-core/src/test/resources/link-payloads/atom/single-link.json b/spring-restdocs-core/src/test/resources/link-payloads/atom/single-link.json index 57532675..e50f46c1 100644 --- a/spring-restdocs-core/src/test/resources/link-payloads/atom/single-link.json +++ b/spring-restdocs-core/src/test/resources/link-payloads/atom/single-link.json @@ -1,6 +1,6 @@ { "links": [ { "rel": "alpha", - "href": "http://alpha.example.com" + "href": "https://alpha.example.com" } ] } \ No newline at end of file diff --git a/spring-restdocs-core/src/test/resources/link-payloads/atom/wrong-format.json b/spring-restdocs-core/src/test/resources/link-payloads/atom/wrong-format.json index a5e2e40f..00c90d2f 100644 --- a/spring-restdocs-core/src/test/resources/link-payloads/atom/wrong-format.json +++ b/spring-restdocs-core/src/test/resources/link-payloads/atom/wrong-format.json @@ -1,9 +1,9 @@ { "links": { "alpha": [{ - "href": "http://alpha.example.com/one" + "href": "https://alpha.example.com/one" }, { - "href": "http://alpha.example.com/two" + "href": "https://alpha.example.com/two" }] } } \ No newline at end of file diff --git a/spring-restdocs-core/src/test/resources/link-payloads/hal/multiple-links-different-rels.json b/spring-restdocs-core/src/test/resources/link-payloads/hal/multiple-links-different-rels.json index 08d0f3ea..c329418c 100644 --- a/spring-restdocs-core/src/test/resources/link-payloads/hal/multiple-links-different-rels.json +++ b/spring-restdocs-core/src/test/resources/link-payloads/hal/multiple-links-different-rels.json @@ -1,10 +1,10 @@ { "_links": { "alpha": { - "href": "http://alpha.example.com" + "href": "https://alpha.example.com" }, "bravo": { - "href": "http://bravo.example.com" + "href": "https://bravo.example.com" } } } \ No newline at end of file diff --git a/spring-restdocs-core/src/test/resources/link-payloads/hal/multiple-links-same-rels.json b/spring-restdocs-core/src/test/resources/link-payloads/hal/multiple-links-same-rels.json index 45ebca3c..aa62edc5 100644 --- a/spring-restdocs-core/src/test/resources/link-payloads/hal/multiple-links-same-rels.json +++ b/spring-restdocs-core/src/test/resources/link-payloads/hal/multiple-links-same-rels.json @@ -1,9 +1,9 @@ { "_links": { "alpha": [{ - "href": "http://alpha.example.com/one" + "href": "https://alpha.example.com/one" }, { - "href": "http://alpha.example.com/two" + "href": "https://alpha.example.com/two" }] } } \ No newline at end of file diff --git a/spring-restdocs-core/src/test/resources/link-payloads/hal/single-link.json b/spring-restdocs-core/src/test/resources/link-payloads/hal/single-link.json index d19ca125..64ece04c 100644 --- a/spring-restdocs-core/src/test/resources/link-payloads/hal/single-link.json +++ b/spring-restdocs-core/src/test/resources/link-payloads/hal/single-link.json @@ -1,7 +1,7 @@ { "_links": { "alpha": { - "href": "http://alpha.example.com" + "href": "https://alpha.example.com" } } } \ No newline at end of file diff --git a/spring-restdocs-core/src/test/resources/link-payloads/hal/wrong-format.json b/spring-restdocs-core/src/test/resources/link-payloads/hal/wrong-format.json index 7c99aa4e..a4d79046 100644 --- a/spring-restdocs-core/src/test/resources/link-payloads/hal/wrong-format.json +++ b/spring-restdocs-core/src/test/resources/link-payloads/hal/wrong-format.json @@ -1,9 +1,9 @@ { "_links": [ { "rel": "alpha", - "href": "http://alpha.example.com/one" + "href": "https://alpha.example.com/one" }, { "rel": "alpha", - "href": "http://alpha.example.com/two" + "href": "https://alpha.example.com/two" } ] } \ No newline at end of file From 447cc4940e5916b6cef2cfe33b24e823f49a094f Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 26 Mar 2019 10:29:14 +0000 Subject: [PATCH 2/4] Polish "Use HTTPS for external links where possible" See gh-609 --- .../src/test/java/com/example/notes/ApiDocumentation.java | 6 +++--- .../src/test/java/com/example/notes/ApiDocumentation.java | 6 +++--- .../operation/preprocess/PrettyPrintingContentModifier.java | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/samples/rest-notes-spring-data-rest/src/test/java/com/example/notes/ApiDocumentation.java b/samples/rest-notes-spring-data-rest/src/test/java/com/example/notes/ApiDocumentation.java index 498eee26..cabce107 100644 --- a/samples/rest-notes-spring-data-rest/src/test/java/com/example/notes/ApiDocumentation.java +++ b/samples/rest-notes-spring-data-rest/src/test/java/com/example/notes/ApiDocumentation.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 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. @@ -127,8 +127,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-hateoas/src/test/java/com/example/notes/ApiDocumentation.java b/samples/rest-notes-spring-hateoas/src/test/java/com/example/notes/ApiDocumentation.java index 4c72fe81..3b9983fd 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 @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 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. @@ -153,9 +153,9 @@ 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.document.snippets( responseFields( fieldWithPath("_embedded.notes").description("An array of <>"))); 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(); From 1fa4c293c6d0931ae99ab64a45678e1e9b2f5028 Mon Sep 17 00:00:00 2001 From: Spring Operator Date: Tue, 26 Mar 2019 04:42:52 -0500 Subject: [PATCH 3/4] Use HTTPS for external links where possible See gh-610 --- .../docs/asciidoc/documenting-your-api.adoc | 2 +- docs/src/docs/asciidoc/getting-started.adoc | 8 +-- docs/src/docs/asciidoc/introduction.adoc | 2 +- samples/rest-notes-grails/README.md | 2 +- .../grails-app/conf/logback.groovy | 2 +- samples/rest-notes-slate/README.md | 2 +- samples/rest-notes-slate/slate/README.md | 50 +++++++++---------- .../slate/source/javascripts/app/_lang.js | 2 +- .../slate/source/javascripts/lib/_energize.js | 2 +- .../javascripts/lib/_jquery.highlight.js | 2 +- .../source/javascripts/lib/_jquery.tocify.js | 6 +-- .../source/javascripts/lib/_jquery_ui.js | 12 ++--- .../slate/source/javascripts/lib/_lunr.js | 8 +-- .../com/example/notes/ApiDocumentation.java | 8 +-- .../com/example/notes/ApiDocumentation.java | 2 +- .../PrettyPrintingContentModifier.java | 2 +- ...riModifyingOperationPreprocessorTests.java | 36 ++++++------- 17 files changed, 74 insertions(+), 74 deletions(-) diff --git a/docs/src/docs/asciidoc/documenting-your-api.adoc b/docs/src/docs/asciidoc/documenting-your-api.adoc index af969619..d4918e4b 100644 --- a/docs/src/docs/asciidoc/documenting-your-api.adoc +++ b/docs/src/docs/asciidoc/documenting-your-api.adoc @@ -769,7 +769,7 @@ A number of snippets are produced automatically when you document a request and call that is being documented | `httpie-request.adoc` -| Contains the http://httpie.org[`HTTPie`] command that is equivalent to the `MockMvc` +| Contains the https://httpie.org[`HTTPie`] command that is equivalent to the `MockMvc` call that is being documented | `http-request.adoc` diff --git a/docs/src/docs/asciidoc/getting-started.adoc b/docs/src/docs/asciidoc/getting-started.adoc index 69794b13..daa7739b 100644 --- a/docs/src/docs/asciidoc/getting-started.adoc +++ b/docs/src/docs/asciidoc/getting-started.adoc @@ -19,12 +19,12 @@ If you want to jump straight in, a number of sample applications are available: | {samples}/rest-notes-spring-data-rest[Spring Data REST] | Maven | Demonstrates the creation of a getting started guide and an API guide for a service - implemented using http://projects.spring.io/spring-data-rest/[Spring Data REST]. + implemented using https://projects.spring.io/spring-data-rest/[Spring Data REST]. | {samples}/rest-notes-spring-hateoas[Spring HATEOAS] | Gradle | Demonstrates the creation of a getting started guide and an API guide for a service - implemented using http://projects.spring.io/spring-hateoas/[Spring HATEOAS]. + implemented using https://projects.spring.io/spring-hateoas/[Spring HATEOAS]. |=== @@ -54,7 +54,7 @@ If you want to jump straight in, a number of sample applications are available: | {samples}/rest-notes-slate[Slate] | Gradle | Demonstrates the use of Spring REST Docs with Markdown and - http://github.com/tripit/slate[Slate]. + https://github.com/tripit/slate[Slate]. | {samples}/testng[TestNG] | Gradle @@ -244,7 +244,7 @@ from where it will be included in the jar file. === Generating documentation snippets Spring REST Docs uses {spring-framework-docs}/#spring-mvc-test-framework[Spring's MVC Test framework] or -http://www.rest-assured.io[REST Assured] to make requests to the service that you are +http://rest-assured.io/[REST Assured] to make requests to the service that you are documenting. It then produces documentation snippets for the request and the resulting response. diff --git a/docs/src/docs/asciidoc/introduction.adoc b/docs/src/docs/asciidoc/introduction.adoc index d0943da8..a44c2339 100644 --- a/docs/src/docs/asciidoc/introduction.adoc +++ b/docs/src/docs/asciidoc/introduction.adoc @@ -12,7 +12,7 @@ can also be configured to use Markdown. Spring REST Docs makes use of snippets produced by tests written with {spring-framework-docs}/#spring-mvc-test-framework[Spring MVC Test] or -http://www.rest-assured.io[REST Assured]. This test-driven approach helps to guarantee the +http://rest-assured.io/[REST Assured]. This test-driven approach helps to guarantee the accuracy of your service's documentation. If a snippet is incorrect the test that produces it will fail. diff --git a/samples/rest-notes-grails/README.md b/samples/rest-notes-grails/README.md index d6c1be30..0e62fb32 100644 --- a/samples/rest-notes-grails/README.md +++ b/samples/rest-notes-grails/README.md @@ -3,7 +3,7 @@ ## Overview This is a sample project using Grails 3, Spock, and Spring REST docs. For more -information about the Grails framework please see [grails.org](http://grails.org). +information about the Grails framework please see [grails.org](https://grails.org). Grails is built on top of Spring Boot and Gradle so there are a few different ways to run this project including: diff --git a/samples/rest-notes-grails/grails-app/conf/logback.groovy b/samples/rest-notes-grails/grails-app/conf/logback.groovy index 72cda2de..41467f2a 100644 --- a/samples/rest-notes-grails/grails-app/conf/logback.groovy +++ b/samples/rest-notes-grails/grails-app/conf/logback.groovy @@ -17,7 +17,7 @@ import grails.util.BuildSettings import grails.util.Environment -// See http://logback.qos.ch/manual/groovy.html for details on configuration +// See https://logback.qos.ch/manual/groovy.html for details on configuration appender('STDOUT', ConsoleAppender) { encoder(PatternLayoutEncoder) { pattern = "%level %logger - %msg%n" diff --git a/samples/rest-notes-slate/README.md b/samples/rest-notes-slate/README.md index bb4de692..37f6935e 100644 --- a/samples/rest-notes-slate/README.md +++ b/samples/rest-notes-slate/README.md @@ -21,4 +21,4 @@ documentation by [ERB][4]. The combined Markdown document is then turned into HT [1]: https://github.com/tripit/slate [2]: slate/api-guide.md.erb [3]: src/test/java/com/example/notes/ApiDocumentation.java -[4]: http://ruby-doc.org/stdlib-2.2.3/libdoc/erb/rdoc/ERB.html \ No newline at end of file +[4]: https://ruby-doc.org/stdlib-2.2.3/libdoc/erb/rdoc/ERB.html \ No newline at end of file diff --git a/samples/rest-notes-slate/slate/README.md b/samples/rest-notes-slate/slate/README.md index 2f042e7f..68c04128 100644 --- a/samples/rest-notes-slate/slate/README.md +++ b/samples/rest-notes-slate/slate/README.md @@ -7,7 +7,7 @@ Slate helps you create beautiful API documentation. Think of it as an intelligen Screenshot of Example Documentation created with Slate -*The example above was created with Slate. Check it out at [tripit.github.io/slate](http://tripit.github.io/slate).* +*The example above was created with Slate. Check it out at [tripit.github.io/slate](https://tripit.github.io/slate).* Features ------------ @@ -20,15 +20,15 @@ Features * **Write code samples in multiple languages** — if your API has bindings in multiple programming languages, you easily put in tabs to switch between them. In your document, you'll distinguish different languages by specifying the language name at the top of each code block, just like with Github Flavored Markdown! -* **Out-of-the-box syntax highlighting** for [almost 60 languages](http://rouge.jayferd.us/demo), no configuration required. +* **Out-of-the-box syntax highlighting** for [almost 60 languages](https://rouge.jayferd.us/demo), no configuration required. * **Automatic, smoothly scrolling table of contents** on the far left of the page. As you scroll, it displays your current position in the document. It's fast, too. We're using Slate at TripIt to build documentation for our new API, where our table of contents has over 180 entries. We've made sure that the performance remains excellent, even for larger documents. * **Let your users update your documentation for you** — by default, your Slate-generated documentation is hosted in a public Github repository. Not only does this mean you get free hosting for your docs with Github Pages, but it also makes it's simple for other developers to make pull requests to your docs if they find typos or other problems. Of course, if you don't want to, you're welcome to not use Github and host your docs elsewhere! -Getting starting with Slate is super easy! Simply fork this repository, and then follow the instructions below. Or, if you'd like to check out what Slate is capable of, take a look at the [sample docs](http://tripit.github.io/slate). +Getting starting with Slate is super easy! Simply fork this repository, and then follow the instructions below. Or, if you'd like to check out what Slate is capable of, take a look at the [sample docs](https://tripit.github.io/slate). - + Getting Started with Slate ------------------------------ @@ -66,34 +66,34 @@ Now that Slate is all set up your machine, you'll probably want to learn more ab Examples of Slate in the Wild --------------------------------- -* [Travis-CI's API docs](http://docs.travis-ci.com/api/) -* [Mozilla's localForage docs](http://mozilla.github.io/localForage/) -* [Mozilla Recroom](http://mozilla.github.io/recroom/) -* [ChaiOne Gameplan API docs](http://chaione.github.io/gameplanb2b/#introduction) -* [Drcaban's Build a Quine tutorial](http://drcabana.github.io/build-a-quine/#introduction) +* [Travis-CI's API docs](https://docs.travis-ci.com/api/) +* [Mozilla's localForage docs](https://mozilla.github.io/localForage/) +* [Mozilla Recroom](https://mozilla.github.io/recroom/) +* [ChaiOne Gameplan API docs](https://chaione.github.io/gameplanb2b/#introduction) +* [Drcaban's Build a Quine tutorial](https://drcabana.github.io/build-a-quine/#introduction) * [PricePlow API docs](https://www.priceplow.com/api/documentation) -* [Emerging Threats API docs](http://apidocs.emergingthreats.net/) -* [Appium docs](http://appium.io/slate/en/master) -* [Golazon Developer](http://developer.golazon.com) +* [Emerging Threats API docs](https://apidocs.emergingthreats.net/) +* [Appium docs](https://appium.io/slate/en/master) +* [Golazon Developer](https://developer.golazon.com) * [Dwolla API docs](https://docs.dwolla.com/) -* [RozpisyZapasu API docs](http://www.rozpisyzapasu.cz/dev/api/) -* [Codestar Framework Docs](http://codestarframework.com/documentation/) +* [RozpisyZapasu API docs](https://www.rozpisyzapasu.cz/dev/api/) +* [Codestar Framework Docs](https://codestarframework.com/documentation/) * [Buddycloud API](http://buddycloud.com/api) * [Crafty Clicks API](https://craftyclicks.co.uk/api/) * [Paracel API Reference](http://paracel.io/docs/api_reference.html) -* [Switch Payments Documentation](http://switchpayments.com/docs/) & [API](http://switchpayments.com/developers/) +* [Switch Payments Documentation](https://switchpayments.com/docs/) & [API](https://switchpayments.com/developers/) * [Coinbase API Reference](https://developers.coinbase.com/api) * [Whispir.io API](https://whispir.github.io/api) * [NASA API](https://data.nasa.gov/developer/external/planetary/) * [CardPay API](https://developers.cardpay.com/) * [IBM Cloudant](https://docs-testb.cloudant.com/content-review/_design/couchapp/index.html) -* [Bitrix basis components](http://bbc.bitrix.expert/) -* [viagogo API Documentation](http://developer.viagogo.net/) -* [Fidor Bank API Documentation](http://docs.fidor.de/) -* [Market Prophit API Documentation](http://developer.marketprophit.com/) -* [OAuth.io API Documentation](http://docs.oauth.io/) -* [Aircall for Developers](http://developer.aircall.io/) -* [SupportKit API Docs](http://docs.supportkit.io/) +* [Bitrix basis components](https://bbc.bitrix.expert/) +* [viagogo API Documentation](https://developer.viagogo.net/) +* [Fidor Bank API Documentation](https://docs.fidor.de/) +* [Market Prophit API Documentation](https://developer.marketprophit.com/) +* [OAuth.io API Documentation](https://docs.oauth.io/) +* [Aircall for Developers](https://developer.aircall.io/) +* [SupportKit API Docs](https://docs.smooch.io/) * [SocialRadar's LocationKit Docs](https://docs.locationkit.io/) * [SafetyCulture API Documentation](https://developer.safetyculture.io/) * [hosting.de API Documentation](https://www.hosting.de/docs/api/) @@ -109,7 +109,7 @@ Just [submit a issue](https://github.com/tripit/slate/issues) to the Slate Githu Contributors -------------------- -Slate was built by [Robert Lord](https://lord.io) while at [TripIt](http://tripit.com). +Slate was built by [Robert Lord](https://lord.io) while at [TripIt](https://tripit.com). Thanks to the following people who have submitted major pull requests: @@ -117,7 +117,7 @@ Thanks to the following people who have submitted major pull requests: - [@bootstraponline](https://github.com/bootstraponline) - [@realityking](https://github.com/realityking) -Also, thanks to [Sauce Labs](http://saucelabs.com) for helping sponsor the project. +Also, thanks to [Sauce Labs](https://saucelabs.com) for helping sponsor the project. Special Thanks -------------------- @@ -125,4 +125,4 @@ Special Thanks - [jquery.tocify.js](https://github.com/gfranko/jquery.tocify.js) - [middleman-syntax](https://github.com/middleman/middleman-syntax) - [middleman-gh-pages](https://github.com/neo/middleman-gh-pages) -- [Font Awesome](http://fortawesome.github.io/Font-Awesome/) +- [Font Awesome](https://fortawesome.github.io/Font-Awesome/) diff --git a/samples/rest-notes-slate/slate/source/javascripts/app/_lang.js b/samples/rest-notes-slate/slate/source/javascripts/app/_lang.js index 9d45388e..9ba1aebc 100644 --- a/samples/rest-notes-slate/slate/source/javascripts/app/_lang.js +++ b/samples/rest-notes-slate/slate/source/javascripts/app/_lang.js @@ -61,7 +61,7 @@ under the License. key = decodeURIComponent(key); // missing `=` should be `null`: - // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters + // https://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters val = val === undefined ? null : decodeURIComponent(val); if (!ret.hasOwnProperty(key)) { diff --git a/samples/rest-notes-slate/slate/source/javascripts/lib/_energize.js b/samples/rest-notes-slate/slate/source/javascripts/lib/_energize.js index 6798f3c0..58240784 100644 --- a/samples/rest-notes-slate/slate/source/javascripts/lib/_energize.js +++ b/samples/rest-notes-slate/slate/source/javascripts/lib/_energize.js @@ -115,7 +115,7 @@ /** * Special logic for standalone web apps - * See http://stackoverflow.com/questions/2898740/iphone-safari-web-app-opens-links-in-new-window + * See https://stackoverflow.com/questions/2898740/iphone-safari-web-app-opens-links-in-new-window */ if(standAlone) { window.location = target.getAttribute("href"); diff --git a/samples/rest-notes-slate/slate/source/javascripts/lib/_jquery.highlight.js b/samples/rest-notes-slate/slate/source/javascripts/lib/_jquery.highlight.js index 9dcf3c7a..6c240860 100644 --- a/samples/rest-notes-slate/slate/source/javascripts/lib/_jquery.highlight.js +++ b/samples/rest-notes-slate/slate/source/javascripts/lib/_jquery.highlight.js @@ -2,7 +2,7 @@ * jQuery Highlight plugin * * Based on highlight v3 by Johann Burkard - * http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html + * https://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html * * Code a little bit refactored and cleaned (in my humble opinion). * Most important changes: diff --git a/samples/rest-notes-slate/slate/source/javascripts/lib/_jquery.tocify.js b/samples/rest-notes-slate/slate/source/javascripts/lib/_jquery.tocify.js index 91cf6379..b60bc686 100644 --- a/samples/rest-notes-slate/slate/source/javascripts/lib/_jquery.tocify.js +++ b/samples/rest-notes-slate/slate/source/javascripts/lib/_jquery.tocify.js @@ -1,5 +1,5 @@ /* jquery Tocify - v1.8.0 - 2013-09-16 -* http://www.gregfranko.com/jquery.tocify.js/ +* http://gregfranko.com/jquery.tocify.js/ * Copyright (c) 2013 Greg Franko; Licensed MIT * Modified lightly by Robert Lord to fix a bug I found, * and also so it adds ids to headers @@ -10,7 +10,7 @@ // Immediately-Invoked Function Expression (IIFE) [Ben Alman Blog Post](http://benalman.com/news/2010/11/immediately-invoked-function-expression/) that calls another IIFE that contains all of the plugin logic. I used this pattern so that anyone viewing this code would not have to scroll to the bottom of the page to view the local parameters that were passed to the main IIFE. (function(tocify) { - // ECMAScript 5 Strict Mode: [John Resig Blog Post](http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/) + // ECMAScript 5 Strict Mode: [John Resig Blog Post](https://johnresig.com/blog/ecmascript-5-strict-mode-json-and-more/) "use strict"; // Calls the second IIFE and locally passes in the global jQuery, window, and document objects @@ -21,7 +21,7 @@ // Locally passes in `jQuery`, the `window` object, the `document` object, and an `undefined` variable. The `jQuery`, `window` and `document` objects are passed in locally, to improve performance, since javascript first searches for a variable match within the local variables set before searching the global variables set. All of the global variables are also passed in locally to be minifier friendly. `undefined` can be passed in locally, because it is not a reserved word in JavaScript. (function($, window, document, undefined) { - // ECMAScript 5 Strict Mode: [John Resig Blog Post](http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/) + // ECMAScript 5 Strict Mode: [John Resig Blog Post](https://johnresig.com/blog/ecmascript-5-strict-mode-json-and-more/) "use strict"; var tocClassName = "tocify", diff --git a/samples/rest-notes-slate/slate/source/javascripts/lib/_jquery_ui.js b/samples/rest-notes-slate/slate/source/javascripts/lib/_jquery_ui.js index 637e9c14..2417b46e 100644 --- a/samples/rest-notes-slate/slate/source/javascripts/lib/_jquery_ui.js +++ b/samples/rest-notes-slate/slate/source/javascripts/lib/_jquery_ui.js @@ -1,5 +1,5 @@ /*! jQuery UI - v1.11.3 - 2015-02-12 - * http://jqueryui.com + * https://jqueryui.com * Includes: widget.js * Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ @@ -16,13 +16,13 @@ }(function( $ ) { /*! * jQuery UI Widget 1.11.3 - * http://jqueryui.com + * https://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. - * http://jquery.org/license + * https://jquery.org/license * - * http://api.jqueryui.com/jQuery.widget/ + * https://api.jqueryui.com/jQuery.widget/ */ @@ -41,7 +41,7 @@ $( elem ).triggerHandler( "remove" ); } - // http://bugs.jquery.com/ticket/8235 + // https://bugs.jquery.com/ticket/8235 } catch ( e ) {} } orig( elems ); @@ -305,7 +305,7 @@ .unbind( this.eventNamespace ) .removeData( this.widgetFullName ) // support: jquery <1.6.3 - // http://bugs.jquery.com/ticket/9413 + // https://bugs.jquery.com/ticket/9413 .removeData( $.camelCase( this.widgetFullName ) ); this.widget() .unbind( this.eventNamespace ) diff --git a/samples/rest-notes-slate/slate/source/javascripts/lib/_lunr.js b/samples/rest-notes-slate/slate/source/javascripts/lib/_lunr.js index 54457dab..31aa9246 100644 --- a/samples/rest-notes-slate/slate/source/javascripts/lib/_lunr.js +++ b/samples/rest-notes-slate/slate/source/javascripts/lib/_lunr.js @@ -1,5 +1,5 @@ /** - * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.5.7 + * lunr - https://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.5.7 * Copyright (C) 2014 Oliver Nightingale * MIT Licensed * @license @@ -1298,12 +1298,12 @@ /*! * lunr.stemmer * Copyright (C) 2014 Oliver Nightingale - * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt + * Includes code from - https://tartarus.org/~martin/PorterStemmer/js.txt */ /** * lunr.stemmer is an english language stemmer, this is a JavaScript - * implementation of the PorterStemmer taken from http://tartaurs.org/~martin + * implementation of the PorterStemmer taken from https://tartaurs.org/~martin * * @module * @param {String} str The string to stem @@ -1689,7 +1689,7 @@ /*! * lunr.stemmer * Copyright (C) 2014 Oliver Nightingale - * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt + * Includes code from - https://tartarus.org/~martin/PorterStemmer/js.txt */ /** 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 56a5b645..417d970a 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 @@ -126,7 +126,7 @@ public class ApiDocumentation { this.noteRepository.deleteAll(); createNote("REST maturity model", - "http://martinfowler.com/articles/richardsonMaturityModel.html"); + "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/"); @@ -152,7 +152,7 @@ public class ApiDocumentation { Map note = new HashMap(); note.put("title", "REST maturity model"); - note.put("body", "http://martinfowler.com/articles/richardsonMaturityModel.html"); + note.put("body", "https://martinfowler.com/articles/richardsonMaturityModel.html"); note.put("tags", Arrays.asList(tagLocation)); this.mockMvc.perform( @@ -180,7 +180,7 @@ public class ApiDocumentation { Map note = new HashMap(); note.put("title", "REST maturity model"); - note.put("body", "http://martinfowler.com/articles/richardsonMaturityModel.html"); + note.put("body", "https://martinfowler.com/articles/richardsonMaturityModel.html"); note.put("tags", Arrays.asList(tagLocation)); String noteLocation = this.mockMvc @@ -240,7 +240,7 @@ public class ApiDocumentation { public void noteUpdateExample() throws Exception { Map note = new HashMap(); note.put("title", "REST maturity model"); - note.put("body", "http://martinfowler.com/articles/richardsonMaturityModel.html"); + note.put("body", "https://martinfowler.com/articles/richardsonMaturityModel.html"); String noteLocation = this.mockMvc .perform( 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 23d51fcf..1fdc0f99 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"); + createNote("REST maturity model", "https://martinfowler.com/articles/richardsonMaturityModel.html");<<<<<<< HEAD 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 67f0949d..8dbfaec7 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("{http://xml.apache.org/xslt}indent-amount", + transformer.setOutputProperty("{https://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 1782a4d7..a356d1d2 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 @@ -63,9 +63,9 @@ public class UriModifyingOperationPreprocessorTests { public void requestUriHostCanBeModified() { this.preprocessor.host("api.example.com"); OperationRequest processed = this.preprocessor - .preprocess(createRequestWithUri("http://api.foo.com:12345")); + .preprocess(createRequestWithUri("https://api.foo.com:12345")); assertThat(processed.getUri(), - is(equalTo(URI.create("http://api.example.com:12345")))); + is(equalTo(URI.create("https://api.example.com:12345")))); assertThat(processed.getHeaders().getFirst(HttpHeaders.HOST), is(equalTo("api.example.com:12345"))); } @@ -74,9 +74,9 @@ public class UriModifyingOperationPreprocessorTests { public void requestUriPortCanBeModified() { this.preprocessor.port(23456); OperationRequest processed = this.preprocessor - .preprocess(createRequestWithUri("http://api.example.com:12345")); + .preprocess(createRequestWithUri("https://api.example.com:12345")); assertThat(processed.getUri(), - is(equalTo(URI.create("http://api.example.com:23456")))); + is(equalTo(URI.create("https://api.example.com:23456")))); assertThat(processed.getHeaders().getFirst(HttpHeaders.HOST), is(equalTo("api.example.com:23456"))); } @@ -85,8 +85,8 @@ public class UriModifyingOperationPreprocessorTests { public void requestUriPortCanBeRemoved() { this.preprocessor.removePort(); OperationRequest processed = this.preprocessor - .preprocess(createRequestWithUri("http://api.example.com:12345")); - assertThat(processed.getUri(), is(equalTo(URI.create("http://api.example.com")))); + .preprocess(createRequestWithUri("https://api.example.com:12345")); + assertThat(processed.getUri(), is(equalTo(URI.create("https://api.example.com")))); assertThat(processed.getHeaders().getFirst(HttpHeaders.HOST), is(equalTo("api.example.com"))); } @@ -95,27 +95,27 @@ public class UriModifyingOperationPreprocessorTests { public void requestUriPathIsPreserved() { this.preprocessor.removePort(); OperationRequest processed = this.preprocessor - .preprocess(createRequestWithUri("http://api.example.com:12345/foo/bar")); + .preprocess(createRequestWithUri("https://api.example.com:12345/foo/bar")); assertThat(processed.getUri(), - is(equalTo(URI.create("http://api.example.com/foo/bar")))); + is(equalTo(URI.create("https://api.example.com/foo/bar")))); } @Test public void requestUriQueryIsPreserved() { this.preprocessor.removePort(); OperationRequest processed = this.preprocessor - .preprocess(createRequestWithUri("http://api.example.com:12345?foo=bar")); + .preprocess(createRequestWithUri("https://api.example.com:12345?foo=bar")); assertThat(processed.getUri(), - is(equalTo(URI.create("http://api.example.com?foo=bar")))); + is(equalTo(URI.create("https://api.example.com?foo=bar")))); } @Test public void requestUriAnchorIsPreserved() { this.preprocessor.removePort(); OperationRequest processed = this.preprocessor - .preprocess(createRequestWithUri("http://api.example.com:12345#foo")); + .preprocess(createRequestWithUri("https://api.example.com:12345#foo")); assertThat(processed.getUri(), - is(equalTo(URI.create("http://api.example.com#foo")))); + is(equalTo(URI.create("https://api.example.com#foo")))); } @Test @@ -135,7 +135,7 @@ public class UriModifyingOperationPreprocessorTests { .preprocess(createRequestWithContent( "The uri 'http://localhost:12345' should be used")); assertThat(new String(processed.getContent()), - is(equalTo("The uri 'http://api.example.com:12345' should be used"))); + is(equalTo("The uri 'https://api.example.com:12345' should be used"))); } @Test @@ -215,7 +215,7 @@ public class UriModifyingOperationPreprocessorTests { .preprocess(createResponseWithContent( "The uri 'http://localhost:12345' should be used")); assertThat(new String(processed.getContent()), - is(equalTo("The uri 'http://api.example.com:12345' should be used"))); + is(equalTo("The uri 'https://api.example.com:12345' should be used"))); } @Test @@ -283,7 +283,7 @@ public class UriModifyingOperationPreprocessorTests { OperationRequest processed = this.preprocessor.host("api.example.com") .preprocess(createRequestWithHeader("Foo", "http://locahost:12345")); assertThat(processed.getHeaders().getFirst("Foo"), - is(equalTo("http://api.example.com:12345"))); + is(equalTo("https://api.example.com:12345"))); assertThat(processed.getHeaders().getFirst("Host"), is(equalTo("api.example.com"))); } @@ -293,7 +293,7 @@ public class UriModifyingOperationPreprocessorTests { OperationResponse processed = this.preprocessor.host("api.example.com") .preprocess(createResponseWithHeader("Foo", "http://locahost:12345")); assertThat(processed.getHeaders().getFirst("Foo"), - is(equalTo("http://api.example.com:12345"))); + is(equalTo("https://api.example.com:12345"))); } @Test @@ -301,7 +301,7 @@ public class UriModifyingOperationPreprocessorTests { OperationRequest processed = this.preprocessor.host("api.example.com").preprocess( createRequestWithPartWithHeader("Foo", "http://locahost:12345")); assertThat(processed.getParts().iterator().next().getHeaders().getFirst("Foo"), - is(equalTo("http://api.example.com:12345"))); + is(equalTo("https://api.example.com:12345"))); } @Test @@ -310,7 +310,7 @@ public class UriModifyingOperationPreprocessorTests { .preprocess(createRequestWithPartWithContent( "The uri 'http://localhost:12345' should be used")); assertThat(new String(processed.getParts().iterator().next().getContent()), - is(equalTo("The uri 'http://api.example.com:12345' should be used"))); + is(equalTo("The uri 'https://api.example.com:12345' should be used"))); } @Test From 9444083b81eac7f09b6f058f99a1115da0039ffc Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 26 Mar 2019 11:07:18 +0000 Subject: [PATCH 4/4] Polish "Use HTTPS for external links where possible" See gh-610 --- .../rest-notes-slate/slate/source/api-guide.md.erb | 6 +++--- .../java/com/example/notes/ApiDocumentation.java | 4 ++-- .../src/main/asciidoc/api-guide.adoc | 8 ++++---- .../src/main/asciidoc/getting-started-guide.adoc | 3 ++- .../src/docs/asciidoc/api-guide.adoc | 8 ++++---- .../java/com/example/notes/ApiDocumentation.java | 2 +- .../preprocess/PrettyPrintingContentModifier.java | 2 +- .../UriModifyingOperationPreprocessorTests.java | 14 +++++++------- 8 files changed, 24 insertions(+), 23 deletions(-) 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"))); }