Skip to content

Commit de0c1ab

Browse files
authoredMay 16, 2023
docs: update readme [skip ci] (#238)
GH-235
1 parent 4893605 commit de0c1ab

File tree

1 file changed

+28
-40
lines changed

1 file changed

+28
-40
lines changed
 

‎README.md

+28-40
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Spring REST Docs API specification Integration
22

33
[![oss lifecycle](https://img.shields.io/badge/oss_lifecycle-maintenance-yellow.svg)](https://github.com/ePages-de/restdocs-api-spec/issues/204)
4+
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=ePages-de_restdocs-api-spec&metric=coverage)](https://sonarcloud.io/summary/new_code?id=ePages-de_restdocs-api-spec)
45
![](https://img.shields.io/github/license/ePages-de/restdocs-openapi.svg)
56
[![Maven Central](https://img.shields.io/maven-central/v/com.epages/restdocs-api-spec)](https://search.maven.org/artifact/com.epages/restdocs-api-spec)
67
[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/restdocs-api-spec/Lobby)
@@ -62,7 +63,6 @@ This is why we came up with this project.
6263
- [OpenAPI 3.0.1](#openapi-301-1)
6364
- [Postman](#postman-1)
6465
- [Generate an HTML-based API reference from OpenAPI](#generate-an-html-based-api-reference-from-openapi)
65-
- [RAML](#raml)
6666

6767
## Getting started
6868

@@ -94,7 +94,7 @@ The [ResourceSnippet](restdocs-api-spec/src/main/kotlin/com/epages/restdocs/apis
9494
* Using the [plugins DSL](https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_block):
9595
```groovy
9696
plugins {
97-
id 'com.epages.restdocs-api-spec' version '0.16.0'
97+
id 'com.epages.restdocs-api-spec' version '0.18.2'
9898
}
9999
```
100100
Examples with Kotlin are also available [here](https://plugins.gradle.org/plugin/com.epages.restdocs-api-spec)
@@ -110,7 +110,7 @@ The [ResourceSnippet](restdocs-api-spec/src/main/kotlin/com/epages/restdocs/apis
110110
}
111111
}
112112
dependencies {
113-
classpath "com.epages:restdocs-api-spec-gradle-plugin:0.16.0" //1.2
113+
classpath "com.epages:restdocs-api-spec-gradle-plugin:0.18.2" //1.2
114114
}
115115
}
116116
@@ -129,7 +129,7 @@ The [ResourceSnippet](restdocs-api-spec/src/main/kotlin/com/epages/restdocs/apis
129129
130130
dependencies {
131131
//..
132-
testImplementation('com.epages:restdocs-api-spec-mockmvc:0.16.0') //2.2
132+
testImplementation('com.epages:restdocs-api-spec-mockmvc:0.18.2') //2.2
133133
}
134134
135135
openapi { //2.3
@@ -569,52 +569,40 @@ redoc-cli bundle build/api-spec/openapi.json
569569
redoc-cli serve build/api-spec/openapi.json
570570
```
571571

572-
## RAML
572+
## Maintenance
573573

574-
This project supersedes [restdocs-raml](https://github.com/ePages-de/restdocs-raml).
575-
So if you are coming from `restdocs-raml` you might want to switch to `restdocs-api-spec`.
574+
This section of the README is targeted at project maintainers.
576575

577-
The API of both projects is fairly similar and it is easy to migrate.
576+
### Publish project
578577

579-
We plan to support RAML in the future.
580-
In the meantime you can use one of several ways to convert an OpenAPI specification to RAML.
581-
There are converters around that can help you to achieve this conversion.
578+
The project is published with the help of [GitHub Actions](./.github/workflows).
579+
It's version number is determined by the Git tags (see [allegro/axion-release-plugin](https://axion-release-plugin.readthedocs.io)).
580+
The Java dependencies are published to Sonatype with the help of the [gradle-nexus/publish-plugin](https://github.com/gradle-nexus/publish-plugin) and the Maven Publish Plugin.
581+
The Gradle plugin is published to the [Gradle plugin portal](https://plugins.gradle.org/plugin/com.epages.restdocs-api-spec) with the help of the ['plugin-publish' plugin](https://plugins.gradle.org/plugin/com.gradle.plugin-publish) (see [docs.gradle.org](https://docs.gradle.org/current/userguide/publishing_gradle_plugins.html)).
582582
583-
- [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/)
584-
- [api-matic](https://apimatic.io/transformer) - an online converter capable of converting between many api specifications
583+
Given that the `master` branch on the upstream repository is in the state from which you want to create a release, execute the following steps:
585584
586-
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.
587-
Using this approach your gradle build can still output a RAML specification.
585+
**(1) Create release**
588586
589-
See [openapi2raml.gradle](samples/restdocs-api-spec-sample/openapi2raml.gradle).
587+
[Create release via the GitHub UI](https://github.com/ePages-de/restdocs-api-spec/releases/new).
590588
591-
```
592-
./gradlew restdocs-api-spec-sample:openapi
593-
./gradlew -b samples/restdocs-api-spec-sample/openapi2raml.gradle openapi2raml
594-
```
589+
Use the intended version number as "Tag version", e.g. "0.18.2".
590+
This will automatically trigger a GitHub Action build which publishes the JAR files for this release to Sonatype.
595591
596-
## Maintenance
592+
**(2) Login to Sonatype**
597593
598-
This section of the README is targeted at project maintainers.
594+
Login to Sonatype and navigate to the [staging repositories](https://oss.sonatype.org/#stagingRepositories).
599595
600-
### Publish project
596+
**(3) Close the staging repository**
597+
598+
Select the generated staging repository and close it.
599+
Check that there are no errors afterwards (e.g. missing signatures or Javadoc JARs).
601600
602-
~~The project is published with the help of [TravisCI](./.travis.yml).~~
603-
It's version number is determined by the Git tags (see [allegro/axion-release-plugin](https://axion-release-plugin.readthedocs.io)).
604-
The Java dependencies are published to Sonatype with the help of the [gradle-nexus/publish-plugin](https://github.com/gradle-nexus/publish-plugin) and the Maven Publish Plugin.
605-
The Gradle plugin is published to the [Gradle plugin portal](https://plugins.gradle.org/plugin/com.epages.restdocs-api-spec) with the help of the ['plugin-publish' plugin](https://plugins.gradle.org/plugin/com.gradle.plugin-publish) (see [docs.gradle.org](https://docs.gradle.org/current/userguide/publishing_gradle_plugins.html)).
601+
**(4) Release the repository**
606602
607-
Given that the `master` branch on the upstream repository is in the state from which you want to create a release, execute the following steps:
603+
Select the generated staging repository and release it.
604+
After few minutes, the release should be available in the ["Public Repositories" of ePages](https://oss.sonatype.org/service/local/repo_groups/public/content/com/epages/).
605+
606+
**(5) Update documentation**
608607
609-
1. [Create release via the GitHub UI](https://github.com/ePages-de/restdocs-api-spec/releases/new) <br>
610-
Use the intended version number as "Tag version", e.g. "0.16.0".
611-
~~This will automatically trigger a Travis build which publishes the JAR files for this release to Sonatype.~~
612-
2. Login to Sonatype and navigate to the [staging repositories](https://oss.sonatype.org/#stagingRepositories)
613-
3. Close the staging repository <br>
614-
Select the generated staging repository and close it.
615-
Check that there are no errors afterwards (e.g. missing signatures or Javadoc JARs).
616-
4. Release the repository <br>
617-
Select the generated staging repository and release it.
618-
Soon after, the release should be available in the ["Public Repositories" of ePages](https://oss.sonatype.org/service/local/repo_groups/public/content/com/epages/).
619-
5. Update documentation <br>
620-
Create a new commit which updates the version numbers in the `README` file.
608+
Create a new commit which updates the version numbers in the `README` file.

0 commit comments

Comments
 (0)
Please sign in to comment.