Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ body:
attributes:
label: Library version
description: Which version are you using?
placeholder: e.g. 0.1.0-SNAPSHOT
placeholder: e.g. <released-version> or <next-version>-SNAPSHOT
validations:
required: true
- type: textarea
Expand Down
72 changes: 66 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,50 +37,110 @@ Production-oriented JSON-RPC 2.0 server library for Java, with optional Spring W

### Spring Boot starter

Replace `latest-version` with the release you want to use.

Maven:

```xml
<properties>
<jsonrpc.version>latest-version</jsonrpc.version>
</properties>

<dependency>
<groupId>io.github.limehee</groupId>
<artifactId>jsonrpc-spring-boot-starter</artifactId>
<version>0.1.0</version>
<version>${jsonrpc.version}</version>
</dependency>
```

Gradle (Kotlin DSL):

```kotlin
implementation("io.github.limehee:jsonrpc-spring-boot-starter:0.1.0")
val jsonrpcVersion = "latest-version"

dependencies {
implementation("io.github.limehee:jsonrpc-spring-boot-starter:$jsonrpcVersion")
}
```

Gradle (Groovy DSL):

```groovy
implementation 'io.github.limehee:jsonrpc-spring-boot-starter:0.1.0'
def jsonrpcVersion = "latest-version"

dependencies {
implementation "io.github.limehee:jsonrpc-spring-boot-starter:${jsonrpcVersion}"
}
```

Gradle Version Catalog (`libs.versions.toml`):

```toml
[versions]
jsonrpc = "latest-version"

[libraries]
jsonrpc-spring-boot-starter = { module = "io.github.limehee:jsonrpc-spring-boot-starter", version.ref = "jsonrpc" }
```

```kotlin
dependencies {
implementation(libs.jsonrpc.spring.boot.starter)
}
```

### Core only (pure Java)

Replace `latest-version` with the release you want to use.

Maven:

```xml
<properties>
<jsonrpc.version>latest-version</jsonrpc.version>
</properties>

<dependency>
<groupId>io.github.limehee</groupId>
<artifactId>jsonrpc-core</artifactId>
<version>0.1.0</version>
<version>${jsonrpc.version}</version>
</dependency>
```

Gradle (Kotlin DSL):

```kotlin
implementation("io.github.limehee:jsonrpc-core:0.1.0")
val jsonrpcVersion = "latest-version"

dependencies {
implementation("io.github.limehee:jsonrpc-core:$jsonrpcVersion")
}
```

Gradle (Groovy DSL):

```groovy
implementation 'io.github.limehee:jsonrpc-core:0.1.0'
def jsonrpcVersion = "latest-version"

dependencies {
implementation "io.github.limehee:jsonrpc-core:${jsonrpcVersion}"
}
```

Gradle Version Catalog (`libs.versions.toml`):

```toml
[versions]
jsonrpc = "latest-version"

[libraries]
jsonrpc-core = { module = "io.github.limehee:jsonrpc-core", version.ref = "jsonrpc" }
```

```kotlin
dependencies {
implementation(libs.jsonrpc.core)
}
```

## Quick Start (Spring Boot)
Expand Down
72 changes: 66 additions & 6 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,50 +17,110 @@ This guide gets a working JSON-RPC endpoint up quickly and provides the shortest

### 3.1 Spring Boot starter

Replace `latest-version` with the release you want to use.

Maven:

```xml
<properties>
<jsonrpc.version>latest-version</jsonrpc.version>
</properties>

<dependency>
<groupId>io.github.limehee</groupId>
<artifactId>jsonrpc-spring-boot-starter</artifactId>
<version>0.1.0</version>
<version>${jsonrpc.version}</version>
</dependency>
```

Gradle (Kotlin DSL):

```kotlin
implementation("io.github.limehee:jsonrpc-spring-boot-starter:0.1.0")
val jsonrpcVersion = "latest-version"

dependencies {
implementation("io.github.limehee:jsonrpc-spring-boot-starter:$jsonrpcVersion")
}
```

Gradle (Groovy DSL):

```groovy
implementation 'io.github.limehee:jsonrpc-spring-boot-starter:0.1.0'
def jsonrpcVersion = "latest-version"

dependencies {
implementation "io.github.limehee:jsonrpc-spring-boot-starter:${jsonrpcVersion}"
}
```

Gradle Version Catalog (`libs.versions.toml`):

```toml
[versions]
jsonrpc = "latest-version"

[libraries]
jsonrpc-spring-boot-starter = { module = "io.github.limehee:jsonrpc-spring-boot-starter", version.ref = "jsonrpc" }
```

```kotlin
dependencies {
implementation(libs.jsonrpc.spring.boot.starter)
}
```

### 3.2 Core only (pure Java)

Replace `latest-version` with the release you want to use.

Maven:

```xml
<properties>
<jsonrpc.version>latest-version</jsonrpc.version>
</properties>

<dependency>
<groupId>io.github.limehee</groupId>
<artifactId>jsonrpc-core</artifactId>
<version>0.1.0</version>
<version>${jsonrpc.version}</version>
</dependency>
```

Gradle (Kotlin DSL):

```kotlin
implementation("io.github.limehee:jsonrpc-core:0.1.0")
val jsonrpcVersion = "latest-version"

dependencies {
implementation("io.github.limehee:jsonrpc-core:$jsonrpcVersion")
}
```

Gradle (Groovy DSL):

```groovy
implementation 'io.github.limehee:jsonrpc-core:0.1.0'
def jsonrpcVersion = "latest-version"

dependencies {
implementation "io.github.limehee:jsonrpc-core:${jsonrpcVersion}"
}
```

Gradle Version Catalog (`libs.versions.toml`):

```toml
[versions]
jsonrpc = "latest-version"

[libraries]
jsonrpc-core = { module = "io.github.limehee:jsonrpc-core", version.ref = "jsonrpc" }
```

```kotlin
dependencies {
implementation(libs.jsonrpc.core)
}
```

## 4. Spring Boot Minimal Example
Expand Down
38 changes: 34 additions & 4 deletions docs/pure-java-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,56 @@

## 1. Dependency

Replace `latest-version` with the release you want to use.

Maven:

```xml
<properties>
<jsonrpc.version>latest-version</jsonrpc.version>
</properties>

<dependency>
<groupId>io.github.limehee</groupId>
<artifactId>jsonrpc-core</artifactId>
<version>0.1.0</version>
<version>${jsonrpc.version}</version>
</dependency>
```

Gradle (Kotlin DSL):

```kotlin
implementation("io.github.limehee:jsonrpc-core:0.1.0")
val jsonrpcVersion = "latest-version"

dependencies {
implementation("io.github.limehee:jsonrpc-core:$jsonrpcVersion")
}
```

Gradle (Groovy DSL):

```groovy
implementation 'io.github.limehee:jsonrpc-core:0.1.0'
def jsonrpcVersion = "latest-version"

dependencies {
implementation "io.github.limehee:jsonrpc-core:${jsonrpcVersion}"
}
```

Gradle Version Catalog (`libs.versions.toml`):

```toml
[versions]
jsonrpc = "latest-version"

[libraries]
jsonrpc-core = { module = "io.github.limehee:jsonrpc-core", version.ref = "jsonrpc" }
```

```kotlin
dependencies {
implementation(libs.jsonrpc.core)
}
```

## 2. Minimal Dispatcher
Expand Down Expand Up @@ -110,7 +140,7 @@ dispatcher.register(
```java
dispatcher.register(
"health",
factory.noParams(() -> Map.of("status", "UP", "version", "0.1.0"))
factory.noParams(() -> Map.of("status", "UP", "version", "1.0.0"))
);
```

Expand Down
36 changes: 33 additions & 3 deletions docs/spring-boot-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,56 @@ This guide covers production-style Spring Boot usage, including registration str

## 1. Dependency

Replace `latest-version` with the release you want to use.

Maven:

```xml
<properties>
<jsonrpc.version>latest-version</jsonrpc.version>
</properties>

<dependency>
<groupId>io.github.limehee</groupId>
<artifactId>jsonrpc-spring-boot-starter</artifactId>
<version>0.1.0</version>
<version>${jsonrpc.version}</version>
</dependency>
```

Gradle (Kotlin DSL):

```kotlin
implementation("io.github.limehee:jsonrpc-spring-boot-starter:0.1.0")
val jsonrpcVersion = "latest-version"

dependencies {
implementation("io.github.limehee:jsonrpc-spring-boot-starter:$jsonrpcVersion")
}
```

Gradle (Groovy DSL):

```groovy
implementation 'io.github.limehee:jsonrpc-spring-boot-starter:0.1.0'
def jsonrpcVersion = "latest-version"

dependencies {
implementation "io.github.limehee:jsonrpc-spring-boot-starter:${jsonrpcVersion}"
}
```

Gradle Version Catalog (`libs.versions.toml`):

```toml
[versions]
jsonrpc = "latest-version"

[libraries]
jsonrpc-spring-boot-starter = { module = "io.github.limehee:jsonrpc-spring-boot-starter", version.ref = "jsonrpc" }
```

```kotlin
dependencies {
implementation(libs.jsonrpc.spring.boot.starter)
}
```

## 2. Endpoint Exposure
Expand Down