Skip to content

Commit 60ed08e

Browse files
authored
Merge branch 'master' into master
2 parents 2d5b743 + 526fe9a commit 60ed08e

File tree

515 files changed

+19861
-21087
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

515 files changed

+19861
-21087
lines changed

.travis.yml

-15
This file was deleted.

CODE_OF_CONDUCT.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ with regard to the reporter of an incident.
4242
This Code of Conduct is adapted from the [Contributor Covenant][1], version 1.3.0, available
4343
at [contributor-covenant.org/version/1/3/0/][2].
4444

45-
[1]: http://contributor-covenant.org
46-
[2]: http://contributor-covenant.org/version/1/3/0/
45+
[1]: https://contributor-covenant.org
46+
[2]: https://contributor-covenant.org/version/1/3/0/

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ The project can then be imported into Eclipse using `File -> Import…` and then
6161

6262
[1]: CODE_OF_CONDUCT.md
6363
[2]: https://cla.pivotal.io/sign/spring
64-
[3]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
64+
[3]: https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html

README.md

+17-18
Original file line numberDiff line numberDiff line change
@@ -37,36 +37,35 @@ There are several that you can contribute to Spring REST Docs:
3737

3838
| Name | Description |
3939
| ---- | ----------- |
40-
| [restdocs-wiremock][17] | Auto-generate [WireMock][18] stubs as part of documenting your RESTful API |
41-
| [restdocsext-jersey][19] | Enables Spring REST Docs to be used with [Jersey's test framework][20] |
42-
| [spring-auto-restdocs][21] | Uses introspection and Javadoc to automatically document request and response parameters |
43-
| [restdocs-api-spec][22] | A Spring REST Docs extension that adds API specification support. It currently supports [OpenAPI 2][23] and [OpenAPI 3][24] |
40+
| [restdocs-wiremock][17] | Auto-generate WireMock stubs as part of documenting your RESTful API |
41+
| [restdocsext-jersey][18] | Enables Spring REST Docs to be used with [Jersey's test framework][19] |
42+
| [spring-auto-restdocs][20] | Uses introspection and Javadoc to automatically document request and response parameters |
43+
| [restdocs-api-spec][21] | A Spring REST Docs extension that adds API specification support. It currently supports [OpenAPI 2][22] and [OpenAPI 3][23] |
4444

4545
## Licence
4646

4747
Spring REST Docs is open source software released under the [Apache 2.0 license][14].
4848

4949
[1]: https://build.spring.io/plugins/servlet/wittified/build-status/SRD-PUB (Build status)
5050
[2]: https://build.spring.io/browse/SRD-PUB
51-
[3]: http://asciidoctor.org
52-
[4]: http://docs.spring.io/spring-framework/docs/4.1.x/spring-framework-reference/htmlsingle/#spring-mvc-test-framework
51+
[3]: https://asciidoctor.org
52+
[4]: https://docs.spring.io/spring-framework/docs/4.1.x/spring-framework-reference/htmlsingle/#spring-mvc-test-framework
5353
[5]: https://developer.github.com/v3/
54-
[6]: http://swagger.io
54+
[6]: https://swagger.io
5555
[7]: https://speakerdeck.com/ankinson/documenting-restful-apis-webinar
5656
[8]: https://www.youtube.com/watch?v=knH5ihPNiUs&feature=youtu.be
57-
[9]: http://docs.spring.io/spring-restdocs/docs/
58-
[10]: http://gradle.org
57+
[9]: https://docs.spring.io/spring-restdocs/docs/
58+
[10]: https://gradle.org
5959
[11]: CODE_OF_CONDUCT.md
6060
[12]: https://help.github.com/articles/using-pull-requests/
6161
[13]: CONTRIBUTING.md
62-
[14]: http://www.apache.org/licenses/LICENSE-2.0.html
63-
[15]: http://stackoverflow.com/tags/spring-restdocs
62+
[14]: https://www.apache.org/licenses/LICENSE-2.0.html
63+
[15]: https://stackoverflow.com/tags/spring-restdocs
6464
[16]: https://gitter.im/spring-projects/spring-restdocs
6565
[17]: https://github.com/ePages-de/restdocs-wiremock
66-
[18]: http://wiremock.org/
67-
[19]: https://github.com/RESTDocsEXT/restdocsext-jersey
68-
[20]: https://jersey.java.net/documentation/latest/test-framework.html
69-
[21]: https://github.com/ScaCap/spring-auto-restdocs
70-
[22]: https://github.com/ePages-de/restdocs-api-spec
71-
[23]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md
72-
[24]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md
66+
[18]: https://github.com/RESTDocsEXT/restdocsext-jersey
67+
[19]: https://jersey.java.net/documentation/latest/test-framework.html
68+
[20]: https://github.com/ScaCap/spring-auto-restdocs
69+
[21]: https://github.com/ePages-de/restdocs-api-spec
70+
[22]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md
71+
[23]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md

build.gradle

+31-32
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ buildscript {
88
}
99
dependencies {
1010
classpath 'org.springframework.build.gradle:propdeps-plugin:0.0.7'
11-
classpath 'io.spring.gradle:spring-io-plugin:0.0.8.RELEASE'
1211
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.2'
12+
classpath 'io.spring.gradle:dependency-management-plugin:1.0.8.RELEASE'
1313
classpath "io.spring.javaformat:spring-javaformat-gradle-plugin:$javaFormatVersion"
14+
classpath 'io.spring.nohttp:nohttp-gradle:0.0.2.RELEASE'
1415
}
1516
}
1617

@@ -24,6 +25,7 @@ allprojects {
2425

2526
apply plugin: 'samples'
2627
apply plugin: 'org.sonarqube'
28+
apply plugin: 'io.spring.nohttp'
2729

2830
sonarqube {
2931
properties {
@@ -36,11 +38,19 @@ sonarqube {
3638
}
3739
}
3840

41+
nohttp {
42+
source.exclude 'samples/rest-notes-slate/slate/source/javascripts/lib/_jquery*.js'
43+
source.exclude 'buildSrc/.gradle/**'
44+
source.exclude '**/build/**'
45+
source.exclude '**/target/**'
46+
whitelistFile = project.file('config/nohttp/whitelist.lines')
47+
}
48+
3949
ext {
40-
springVersion = '5.0.5.RELEASE'
50+
springVersion = '5.0.15.RELEASE'
4151
javadocLinks = [
42-
'http://docs.oracle.com/javase/8/docs/api/',
43-
"http://docs.spring.io/spring-framework/docs/$springVersion/javadoc-api/",
52+
'https://docs.oracle.com/javase/8/docs/api/',
53+
"https://docs.spring.io/spring-framework/docs/$springVersion/javadoc-api/",
4454
'https://docs.jboss.org/hibernate/stable/beanvalidation/api/',
4555
'https://docs.jboss.org/hibernate/stable/validator/api/'
4656
] as String[]
@@ -72,9 +82,8 @@ subprojects {
7282
dependency 'junit:junit:4.12'
7383
dependency 'io.rest-assured:rest-assured:3.0.7'
7484
dependency 'org.apache.pdfbox:pdfbox:2.0.7'
75-
dependency 'org.assertj:assertj-core:2.9.1'
76-
dependency 'org.asciidoctor:asciidoctorj:1.5.6'
77-
dependency 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.16'
85+
dependency 'org.assertj:assertj-core:3.11.1'
86+
dependency 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.18'
7887
dependency 'org.hamcrest:hamcrest-core:1.3'
7988
dependency 'org.hamcrest:hamcrest-library:1.3'
8089
dependency 'org.hibernate.validator:hibernate-validator:6.0.9.Final'
@@ -107,33 +116,22 @@ subprojects {
107116
options.compilerArgs = [ '-Xlint:deprecation', '-Xlint:-options', '-Werror' ]
108117
}
109118

119+
tasks.withType(JavaCompile) {
120+
options.encoding = 'UTF-8'
121+
}
122+
110123
}
111124

112-
configure(subprojects - project(":docs")) { subproject ->
125+
def codeProjects = subprojects - project(":docs")
126+
configure(codeProjects) {
113127
apply plugin: 'io.spring.javaformat'
114128
apply plugin: 'checkstyle'
115129
apply from: "${rootProject.projectDir}/gradle/publish-maven.gradle"
116130

117-
if (project.hasProperty('platformVersion') && subproject.path != ':spring-restdocs-asciidoctor') {
118-
apply plugin: 'spring-io'
119-
120-
repositories {
121-
maven { url "https://repo.spring.io/libs-snapshot" }
122-
}
123-
124-
dependencyManagement {
125-
springIoTestRuntime {
126-
imports {
127-
mavenBom "io.spring.platform:platform-bom:${platformVersion}"
128-
}
129-
}
130-
}
131-
}
132-
133131
checkstyle {
134132
configFile = rootProject.file('config/checkstyle/checkstyle.xml')
135133
configProperties = [ 'checkstyle.config.dir' : rootProject.file('config/checkstyle') ]
136-
toolVersion = '6.10.1'
134+
toolVersion = '8.22'
137135
}
138136

139137
configurations {
@@ -144,7 +142,10 @@ configure(subprojects - project(":docs")) { subproject ->
144142
checkstyle "io.spring.javaformat:spring-javaformat-checkstyle:$javaFormatVersion"
145143
jacoco 'org.jacoco:org.jacoco.agent::runtime'
146144
}
145+
}
147146

147+
def publishedCodeProjects = codeProjects.findAll { codeProject -> !codeProject.name.contains('spring-restdocs-asciidoctor-')}
148+
configure(publishedCodeProjects) { subproject ->
148149
javadoc {
149150
description = "Generates project-level javadoc for use in -javadoc jar"
150151
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
@@ -153,6 +154,8 @@ configure(subprojects - project(":docs")) { subproject ->
153154
options.docTitle = "${options.header} API"
154155
options.links = javadocLinks
155156
options.addStringOption '-quiet'
157+
options.encoding = 'UTF-8'
158+
options.source = '1.8'
156159
}
157160

158161
task sourcesJar(type: Jar) {
@@ -178,10 +181,6 @@ samples {
178181
dependOn 'spring-restdocs-webtestclient:install'
179182
dependOn 'spring-restdocs-asciidoctor:install'
180183

181-
restNotesGrails {
182-
workingDir "$projectDir/samples/rest-notes-grails"
183-
}
184-
185184
restNotesSpringHateoas {
186185
workingDir "$projectDir/samples/rest-notes-spring-hateoas"
187186
}
@@ -228,8 +227,8 @@ task api (type: Javadoc) {
228227
options.links = javadocLinks
229228
options.addStringOption '-quiet'
230229

231-
source subprojects.findAll { project -> project.path != ":spring-restdocs-asciidoctor" }
232-
.collect { project -> project.sourceSets.main.allJava }
230+
source publishedCodeProjects.findAll { it.name != 'spring-restdocs-asciidoctor' }
231+
.collect { it.sourceSets.main.allJava }
233232

234233
destinationDir = new File(buildDir, "api")
235234

@@ -268,4 +267,4 @@ configurations {
268267

269268
artifacts {
270269
archives docsZip
271-
}
270+
}

buildSrc/src/main/groovy/org/springframework/restdocs/build/matrix/MatrixTestExtension.groovy

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright 2014-2018 the original author or authors.
2+
* Copyright 2014-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* https://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -43,7 +43,7 @@ public class MatrixTestExtension {
4343
void configureTestTasks(Project project) {
4444
if (!entries.empty) {
4545
cartesianProduct(entries.collect { entry ->
46-
entry.versions.collect { ['group': entry.group, 'version': it] }
46+
entry.versions.collect { ['group': entry.group, 'artifact': entry.artifact, 'version': it] }
4747
}).forEach { configureTestTask(project, it) }
4848
}
4949
}
@@ -64,6 +64,7 @@ public class MatrixTestExtension {
6464
resolutionStrategy.eachDependency { dependency ->
6565
versionSelectors
6666
.findAll{ it.group == dependency.requested.group }
67+
.findAll { !it.artifact || it.artifact == dependency.requested.name }
6768
.each { dependency.useVersion it.version }
6869
}
6970
}
@@ -73,9 +74,6 @@ public class MatrixTestExtension {
7374
}
7475

7576
List<List<Map<String, String>>> cartesianProduct(List<List<Map<String, String>>> lists) {
76-
if (lists.size() == 1) {
77-
return lists
78-
}
7977
return cartesianProduct(lists, 0)
8078
}
8179

@@ -98,6 +96,8 @@ public class MatrixTestExtension {
9896

9997
String group
10098

99+
String artifact
100+
101101
List<String> versions
102102

103103
}

buildSrc/src/main/groovy/org/springframework/restdocs/build/matrix/MatrixTestPlugin.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* https://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,

buildSrc/src/main/groovy/org/springframework/restdocs/build/samples/SampleBuildConfigurer.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* https://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,

buildSrc/src/main/groovy/org/springframework/restdocs/build/samples/SamplesExtension.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* https://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,

buildSrc/src/main/groovy/org/springframework/restdocs/build/samples/SamplesPlugin.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* https://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,

config/checkstyle/checkstyle.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
2+
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd">
33
<module name="com.puppycrawl.tools.checkstyle.Checker">
44
<module name="io.spring.javaformat.checkstyle.SpringChecks" />
55
</module>

0 commit comments

Comments
 (0)