Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kevcodez/semver-rest-api
Spring Boot Service written in Kotlin to validate version ranges according to semver specification.
https://github.com/kevcodez/semver-rest-api
coveralls jacoco java-8 kotlin maven semver spring-boot spring-boot-service springfox swagger swagger-ui travis-ci
Last synced: about 1 month ago
JSON representation
Spring Boot Service written in Kotlin to validate version ranges according to semver specification.
- Host: GitHub
- URL: https://github.com/kevcodez/semver-rest-api
- Owner: kevcodez
- License: mit
- Created: 2017-07-03T09:41:42.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-02T20:25:48.000Z (over 6 years ago)
- Last Synced: 2024-11-08T18:12:43.680Z (3 months ago)
- Topics: coveralls, jacoco, java-8, kotlin, maven, semver, spring-boot, spring-boot-service, springfox, swagger, swagger-ui, travis-ci
- Language: Kotlin
- Homepage:
- Size: 43.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Spring Boot Service written in Kotlin that offers a REST API for semantic versioning, built on [Java SemVer](https://github.com/zafarkhaja/jsemver).
[![Build Status](https://travis-ci.org/kevcodez/semver-rest-api.svg?branch=master)](https://travis-ci.org/kevcodez/semver-rest-api)
[![Coverage Status](https://coveralls.io/repos/github/kevcodez/semver-rest-api/badge.svg)](https://coveralls.io/github/kevcodez/semver-rest-api)## Installation
```
git clone
mvn clean install -DskipTests
java -jar ./target/semver-rest-api.jar
```Visit http://localhost:8080/swagger-ui.html for REST API documentation.
## API
### Version information
GET /info/2.1.0-beta
```json
{
"major": 2,
"minor": 1,
"patch": 0,
"preRelease": "beta",
"normal": "2.1.0"
}
```### Version range validation
POST /validate
```json
{
"versionRange": "^1.0.0",
"versionsToValidate": [
"1.0.0",
"1.1.0",
"2.0.0",
"3.0.0"
]
}
``````json
{
"versionRange": "^1.0.0",
"validatedVersions": {
"2.0.0": false,
"3.0.0": false,
"1.0.0": true,
"1.1.0": true
}
}
```----
GET /validate/1.0.0/inRange/^1.0.0
=> *200 OK* `true`GET /validate/2.0.0/inRange/^1.0.0
=> *200 OK* `false`### Increment versions
The API offers endpoints to increment major, minor, patch and pre release version.
GET /increment/major/1.0.0
```json
{
"major": 2,
"minor": 0,
"patch": 0,
"normal": "2.0.0"
}
```### API documentation
The API is documented using Swagger. You can access the Swagger-UI on /swagger-ui.html.