diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 214917d..6a377c9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -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. or -SNAPSHOT validations: required: true - type: textarea diff --git a/README.md b/README.md index 19b44ec..b961da6 100644 --- a/README.md +++ b/README.md @@ -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 + + latest-version + + io.github.limehee jsonrpc-spring-boot-starter - 0.1.0 + ${jsonrpc.version} ``` 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 + + latest-version + + io.github.limehee jsonrpc-core - 0.1.0 + ${jsonrpc.version} ``` 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) diff --git a/docs/getting-started.md b/docs/getting-started.md index dcd0d18..ad5fd12 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -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 + + latest-version + + io.github.limehee jsonrpc-spring-boot-starter - 0.1.0 + ${jsonrpc.version} ``` 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 + + latest-version + + io.github.limehee jsonrpc-core - 0.1.0 + ${jsonrpc.version} ``` 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 diff --git a/docs/pure-java-guide.md b/docs/pure-java-guide.md index 43c5cde..0ce68af 100644 --- a/docs/pure-java-guide.md +++ b/docs/pure-java-guide.md @@ -4,26 +4,56 @@ ## 1. Dependency +Replace `latest-version` with the release you want to use. + Maven: ```xml + + latest-version + + io.github.limehee jsonrpc-core - 0.1.0 + ${jsonrpc.version} ``` 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 @@ -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")) ); ``` diff --git a/docs/spring-boot-guide.md b/docs/spring-boot-guide.md index b9a25eb..44e3334 100644 --- a/docs/spring-boot-guide.md +++ b/docs/spring-boot-guide.md @@ -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 + + latest-version + + io.github.limehee jsonrpc-spring-boot-starter - 0.1.0 + ${jsonrpc.version} ``` 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