Skip to content

Commit b4a0961

Browse files
author
Mathias Düsterhöft
committed
Version updates. Polish readme.
1 parent d3d99a1 commit b4a0961

File tree

5 files changed

+23
-18
lines changed

5 files changed

+23
-18
lines changed

README.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,16 @@ This is why we came up with this project.
3737
- [Getting started](#getting-started)
3838
- [Project structure](#project-structure)
3939
- [Build configuration](#build-configuration)
40+
- [Gradle](#gradle)
41+
- [Maven](#maven)
4042
- [Usage with Spring REST Docs](#usage-with-spring-rest-docs)
4143
- [Documenting Bean Validation constraints](#documenting-bean-validation-constraints)
4244
- [Migrate existing Spring REST Docs tests](#migrate-existing-spring-rest-docs-tests)
4345
- [Security Definitions](#security-definitions)
4446
- [Running the gradle plugin](#running-the-gradle-plugin)
4547
- [Gradle plugin configuration](#gradle-plugin-configuration)
46-
- [Generate HTML](#generate-html)
47-
- [Convert to RAML](#convert-to-raml)
48+
- [Generate an HTML-based API reference](#generate-an-html-based-api-reference)
49+
- [RAML](#raml)
4850
- [Limitations](#limitations)
4951
- [Rest Assured](#rest-assured)
5052

@@ -63,6 +65,8 @@ The [ResourceSnippet](restdocs-openapi/src/main/kotlin/com/epages/restdocs/opena
6365

6466
### Build configuration
6567

68+
#### Gradle
69+
6670
```groovy
6771
buildscript {
6872
repositories {
@@ -71,7 +75,7 @@ buildscript {
7175
}
7276
dependencies {
7377
//..
74-
classpath("com.github.epages-de.restdocs-openapi:restdocs-openapi-gradle-plugin:0.3.1") //2
78+
classpath("com.github.epages-de.restdocs-openapi:restdocs-openapi-gradle-plugin:0.4.2") //2
7579
}
7680
}
7781
//..
@@ -85,8 +89,8 @@ repositories { //4
8589
8690
dependencies {
8791
//..
88-
testCompile 'com.github.epages-de.restdocs-openapi:restdocs-openapi:0.3.1' //5
89-
testCompile 'org.json:json:20170516' //6
92+
testCompile 'com.github.epages-de.restdocs-openapi:restdocs-openapi:0.4.2' //5
93+
testCompile 'org.json:json:20170516' //6 spring boot 1 only
9094
}
9195
9296
openapi { //7
@@ -103,12 +107,15 @@ openapi { //7
103107
3. apply `restdocs-openapi-gradle-plugin`
104108
4. add repositories used for dependency resolution. We use [jitpack](https://jitpack.io) here.
105109
5. add the actual `restdocs-openapi` dependency to the test scope
106-
6. `spring-boot` specifies an old version of `org.json:json`. We use [everit-org/json-schema](https://github.com/everit-org/json-schema) to generate json schema files. This project depends on a newer version of `org.json:json`. As versions from BOM always override transitive versions coming in through maven dependencies, you need to add an explicit dependency to `org.json:json:20170516`
107-
7. add configuration options for restdocs-openapi-gradle-plugin see [Gradle plugin configuration](#gradle-plugin-configuration)
110+
6. Only needed if you are using `spring-boot 1.x`. `Spring-boot` specifies an old version of `org.json:json`. We use [everit-org/json-schema](https://github.com/everit-org/json-schema) to generate json schema files. This project depends on a newer version of `org.json:json`. As versions from BOM always override transitive versions coming in through maven dependencies, you need to add an explicit dependency to `org.json:json:20170516`
111+
7. add configuration options for restdocs-openapi-gradle-plugin`. See [Gradle plugin configuration](#gradle-plugin-configuration)
108112

109113
See the [build.gradle](samples/restdocs-openapi-sample/build.gradle) for the setup used in the sample project.
110114

111-
If you are searching for a maven plugin that works with `restdocs-openapi` head over to https://github.com/BerkleyTechnologyServices/restdocs-spec.
115+
#### Maven
116+
117+
The root project does not provide a gradle plugin.
118+
But you can find a maven plugin that works with `restdocs-openapi` at [BerkleyTechnologyServices/restdocs-spec](https://github.com/BerkleyTechnologyServices/restdocs-spec).
112119

113120
### Usage with Spring REST Docs
114121

@@ -309,17 +316,17 @@ The `scopeDescriptionsPropertiesFile` is supposed to be a yaml file:
309316
scope-name: A description
310317
```
311318

312-
## Generate HTML
319+
## Generate an HTML-based API reference
313320

314-
We can use [redoc](https://github.com/Rebilly/ReDoc) to generate HTML API reference from our OpenAPI specification.
321+
We can use [redoc](https://github.com/Rebilly/ReDoc) to generate an HTML API reference from our OpenAPI specification.
315322

316323
The [redoc-cli](https://www.npmjs.com/package/redoc-cli) can be used to serve this API reference
317324
```
318325
npm install -g redoc-cli
319326
redoc-cli serve build/openapi/openapi.json
320327
```
321328

322-
## Convert to RAML
329+
## RAML
323330

324331
This project supersedes [restdocs-raml](https://github.com/ePages-de/restdocs-raml).
325332
So if you are coming from `restdocs-raml` you might want to switch to `restdocs-openapi`.

restdocs-openapi-generator/build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies {
1414
compile(kotlin("stdlib-jdk8"))
1515

1616
compile(project(":restdocs-openapi-model"))
17-
compile("io.swagger:swagger-core:1.5.20")
17+
compile("io.swagger:swagger-core:1.5.21")
1818
compile("com.fasterxml.jackson.core:jackson-databind:2.9.5")
1919
compile("com.fasterxml.jackson.module:jackson-module-kotlin:2.9.5")
2020
compile("com.github.everit-org.json-schema:org.everit.json.schema:1.9.1")
@@ -23,7 +23,6 @@ dependencies {
2323
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.2.0")
2424
testImplementation("org.assertj:assertj-core:3.10.0")
2525

26-
testImplementation("org.amshove.kluent:kluent:1.35")
2726
testImplementation("com.jayway.jsonpath:json-path:2.4.0")
2827
testImplementation("com.github.java-json-tools:json-schema-validator:2.2.10")
2928
}

restdocs-openapi-gradle-plugin/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ dependencies {
3737
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.2.0")
3838
testImplementation("org.assertj:assertj-core:3.10.0")
3939

40-
testImplementation("org.amshove.kluent:kluent:1.35")
4140
testImplementation("com.jayway.jsonpath:json-path:2.4.0")
4241

4342
testCompile(gradleTestKit())

restdocs-openapi/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies {
1515
compile("com.fasterxml.jackson.core:jackson-databind:2.9.5")
1616
compile("com.fasterxml.jackson.module:jackson-module-kotlin:2.9.5")
1717

18-
testCompile("org.springframework.boot:spring-boot-starter-test:2.0.4.RELEASE") {
18+
testCompile("org.springframework.boot:spring-boot-starter-test:2.0.5.RELEASE") {
1919
exclude("junit")
2020
}
2121
testCompile("org.junit.jupiter:junit-jupiter-engine:5.2.0")

samples/restdocs-openapi-sample/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
buildscript {
22
ext {
3-
springBootVersion = '2.0.4.RELEASE'
3+
springBootVersion = '2.0.5.RELEASE'
44
}
55
repositories {
66
mavenCentral()
@@ -9,7 +9,7 @@ buildscript {
99
}
1010
dependencies {
1111
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
12-
classpath("com.github.epages-de.restdocs-openapi:restdocs-openapi-gradle-plugin:0.3.1")
12+
classpath("com.github.epages-de.restdocs-openapi:restdocs-openapi-gradle-plugin:0.4.2")
1313
}
1414
}
1515

@@ -42,7 +42,7 @@ dependencies {
4242
testCompile('org.springframework.boot:spring-boot-starter-test')
4343
testCompile('org.springframework.restdocs:spring-restdocs-mockmvc')
4444

45-
testCompile('com.github.epages-de.restdocs-openapi:restdocs-openapi:0.3.1')
45+
testCompile('com.github.epages-de.restdocs-openapi:restdocs-openapi:0.4.2')
4646
//testCompile project(':restdocs-openapi') //enable for depending on the submodule directly
4747
testCompile('com.google.guava:guava:23.0')
4848
}

0 commit comments

Comments
 (0)