Skip to content

Commit 8b8ee69

Browse files
committed
Bump version in examples to 0.9.5
1 parent 4502fe7 commit 8b8ee69

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Coverage Status](https://coveralls.io/repos/github/ePages-de/restdocs-api-spec/badge.svg?branch=master)](https://coveralls.io/github/ePages-de/restdocs-api-spec?branch=master)
77
[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/restdocs-api-spec/Lobby)
88

9-
This is an extension that adds API specifications as an output format to [Spring REST Docs](https://projects.spring.io/spring-restdocs/).
9+
This is an extension that adds API specifications as an output format to [Spring REST Docs](https://projects.spring.io/spring-restdocs/).
1010
It currently supports:
1111
- [OpenAPI 2.0](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md) in `json` and `yaml`
1212
- [OpenAPI 3.0.1](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md) in `json` and `yaml`
@@ -21,15 +21,15 @@ We plan to add support for:
2121

2222
We especially like its test-driven approach and this is the main reason why we chose it.
2323

24-
It offers support for AsciiDoc and Markdown. This is great for generating simple HTML-based documentation.
25-
But both are markup languages and thus it is hard to get any further than statically generated HTML.
24+
It offers support for AsciiDoc and Markdown. This is great for generating simple HTML-based documentation.
25+
But both are markup languages and thus it is hard to get any further than statically generated HTML.
2626

27-
API specifications like OpenAPI are a lot more flexible.
27+
API specifications like OpenAPI are a lot more flexible.
2828
With e.g. OpenAPI you get a machine-readable description of your API. There is a rich ecosystem around it that contains tools to:
2929
- generate a HTML representation of your API - [ReDoc](https://github.com/Rebilly/ReDoc)
3030
- generate an interactive API reference - e.g. using services like [stoplight.io](https://stoplight.io) or [readme.io](https://readme.io)
3131

32-
Also, API specifications like OpenAPI are supported by many REST clients like [Postman](https://www.getpostman.com) and [Paw](https://paw.cloud).
32+
Also, API specifications like OpenAPI are supported by many REST clients like [Postman](https://www.getpostman.com) and [Paw](https://paw.cloud).
3333
Thus having an API specification for a REST API is a great plus when starting to work with it.
3434

3535
The most common use case to generate an OpenAPI specification is code introspection and adding documentation related annotations to your code.
@@ -89,7 +89,7 @@ buildscript {
8989
}
9090
dependencies {
9191
//..
92-
classpath("com.epages:restdocs-api-spec-gradle-plugin:0.9.3") //2
92+
classpath("com.epages:restdocs-api-spec-gradle-plugin:0.9.5") //2
9393
}
9494
}
9595
//..
@@ -103,7 +103,7 @@ repositories { //4
103103
104104
dependencies {
105105
//..
106-
testCompile('com.epages:restdocs-api-spec-mockmvc:0.9.3') //5
106+
testCompile('com.epages:restdocs-api-spec-mockmvc:0.9.5') //5
107107
}
108108
109109
openapi { //6
@@ -337,15 +337,15 @@ webTestClient.get().uri("/sample/{id}?queryParam=something", "1024").exchange()
337337

338338
### Security Definitions in OpenAPI
339339

340-
The project has limited support for describing security requirements of an API.
340+
The project has limited support for describing security requirements of an API.
341341
Currently we only support Oauth2 with [JWT](https://jwt.io/) tokens and HTTP Basic Auth.
342342

343-
`restdocs-api-spec` inspects the `AUTHORIZATION` header of a request for a `JWT` token.
343+
`restdocs-api-spec` inspects the `AUTHORIZATION` header of a request for a `JWT` token.
344344
Also the a HTTP basic authorization header is discovered and documented.
345-
If such a token is found the scopes are extracted and added to the `resource.json` snippet.
345+
If such a token is found the scopes are extracted and added to the `resource.json` snippet.
346346

347-
The `restdocs-api-spec-gradle-plugin` will consider this information if the `oauth2SecuritySchemeDefinition` configuration option is set (see [Gradle plugin configuration](#gradle-plugin-configuration)).
348-
This will result in a top-level `securityDefinitions` in the OpenAPI definition.
347+
The `restdocs-api-spec-gradle-plugin` will consider this information if the `oauth2SecuritySchemeDefinition` configuration option is set (see [Gradle plugin configuration](#gradle-plugin-configuration)).
348+
This will result in a top-level `securityDefinitions` in the OpenAPI definition.
349349
Additionally the required scopes will be added in the `security` section of an `operation`.
350350

351351
### Running the gradle plugin
@@ -388,7 +388,7 @@ separatePublicApi | Should the plugin generate additional API specification file
388388
outputDirectory | The output directory for the API specification files | `build/api-spec`
389389
snippetsDirectory | The directory Spring REST Docs generated the snippets to | `build/generated-snippets`
390390

391-
#### Common OpenAPI configuration
391+
#### Common OpenAPI configuration
392392

393393
The `restdocs-api-spec-gradle-plugin` takes the following configuration options for OpenAPI 2.0 and OpenAPI 3.0.1 - all are optional.
394394

@@ -487,14 +487,14 @@ servers = [ {
487487
} ]
488488
```
489489

490-
The same structure applies to `server`.
490+
The same structure applies to `server`.
491491
A single server can also be specified using a plain string:
492492

493493
```
494494
server = 'http://some.api/api'
495495
```
496496

497-
#### Postman
497+
#### Postman
498498

499499
The `restdocs-api-spec-gradle-plugin` takes the following configuration options for Postman collections - all are optional.
500500

@@ -527,19 +527,19 @@ redoc-cli serve build/api-spec/openapi.json
527527

528528
## RAML
529529

530-
This project supersedes [restdocs-raml](https://github.com/ePages-de/restdocs-raml).
531-
So if you are coming from `restdocs-raml` you might want to switch to `restdocs-api-spec`.
530+
This project supersedes [restdocs-raml](https://github.com/ePages-de/restdocs-raml).
531+
So if you are coming from `restdocs-raml` you might want to switch to `restdocs-api-spec`.
532532

533533
The API of both projects is fairly similar and it is easy to migrate.
534534

535-
We plan to support RAML in the future.
535+
We plan to support RAML in the future.
536536
In the meantime you can use one of several ways to convert an OpenAPI specification to RAML.
537537
There are converters around that can help you to achieve this conversion.
538538

539539
- [oas-raml-converter](https://github.com/mulesoft/oas-raml-converter) - an npm project that provides a CLI to convert between OpenAPI and RAML - it also provides an [online converter](https://mulesoft.github.io/oas-raml-converter/)
540540
- [api-matic](https://apimatic.io/transformer) - an online converter capable of converting between many api specifications
541541

542-
In the [sample project](samples/restdocs-api-spec-sample) you find a build configuration that uses the [oas-raml-converter-docker](https://hub.docker.com/r/zaddo/oas-raml-converter-docker/) docker image and the [gradle-docker-plugin](https://github.com/bmuschko/gradle-docker-plugin) to leverage the `oas-raml-converter` to convert the output of the `openapi` task to RAML.
542+
In the [sample project](samples/restdocs-api-spec-sample) you find a build configuration that uses the [oas-raml-converter-docker](https://hub.docker.com/r/zaddo/oas-raml-converter-docker/) docker image and the [gradle-docker-plugin](https://github.com/bmuschko/gradle-docker-plugin) to leverage the `oas-raml-converter` to convert the output of the `openapi` task to RAML.
543543
Using this approach your gradle build can still output a RAML specification.
544544

545545
See [openapi2raml.gradle](samples/restdocs-api-spec-sample/openapi2raml.gradle).

samples/restdocs-api-spec-sample-web-test-client/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ buildscript {
99
}
1010
dependencies {
1111
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
12-
classpath("com.epages:restdocs-api-spec-gradle-plugin:0.9.0")
12+
classpath("com.epages:restdocs-api-spec-gradle-plugin:0.9.5")
1313
}
1414
}
1515

@@ -37,7 +37,7 @@ dependencies {
3737
testImplementation('org.springframework.boot:spring-boot-starter-test')
3838
testImplementation('org.springframework.restdocs:spring-restdocs-webtestclient')
3939
testImplementation('io.projectreactor:reactor-test')
40-
testImplementation('com.epages:restdocs-api-spec:0.9.3')
40+
testImplementation('com.epages:restdocs-api-spec:0.9.5')
4141
}
4242

4343
openapi {

samples/restdocs-api-spec-sample/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ buildscript {
99
}
1010
dependencies {
1111
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
12-
classpath("com.epages:restdocs-api-spec-gradle-plugin:0.9.3")
12+
classpath("com.epages:restdocs-api-spec-gradle-plugin:0.9.5")
1313
}
1414
}
1515

@@ -38,7 +38,7 @@ dependencies {
3838
testCompile('org.springframework.boot:spring-boot-starter-test')
3939
testCompile('org.springframework.restdocs:spring-restdocs-mockmvc')
4040

41-
testCompile('com.epages:restdocs-api-spec-mockmvc:0.9.3')
41+
testCompile('com.epages:restdocs-api-spec-mockmvc:0.9.5')
4242
// testCompile project(':restdocs-api-spec-mockmvc') //enable for depending on the submodule directly
4343
testCompile('com.google.guava:guava:23.0')
4444
}

0 commit comments

Comments
 (0)