Skip to content

Use version placeholders in README/docs to reduce manual version maintenance #12

@limehee

Description

@limehee

Problem statement

Dependency snippets in README and docs currently hardcode library versions (for example 0.1.0) in multiple places.
This creates repetitive maintenance work and increases the risk of stale or inconsistent examples after releases.

Proposed solution

Refactor dependency examples to use version variables/placeholders consistently across documentation.

  • Maven examples:

    • Define a property once:
      • <jsonrpc.version>...</jsonrpc.version>
    • Reference it in dependencies:
      • <version>${jsonrpc.version}</version>
  • Gradle Kotlin DSL examples:

    • Define once:
      • val jsonrpcVersion = "..."
    • Reuse in dependencies:
      • implementation("io.github.limehee:jsonrpc-spring-boot-starter:$jsonrpcVersion")
  • Gradle Groovy DSL examples:

    • Define once:
      • def jsonrpcVersion = "..." or ext.jsonrpcVersion = "..."
    • Reuse in dependencies:
      • implementation "io.github.limehee:jsonrpc-spring-boot-starter:${jsonrpcVersion}"
  • Version Catalog examples (where relevant):

    • Show libs.versions.toml entry and usage to support catalog-based projects.

Scope of updates:

  • README.md
  • docs/getting-started.md
  • docs/spring-boot-guide.md
  • docs/pure-java-guide.md
  • Any other docs containing hardcoded dependency versions

Documentation quality rules:

  1. Always show variable declaration and usage together (copy-paste safe).
  2. Keep variable naming consistent (jsonrpc.version / jsonrpcVersion).
  3. Ensure Maven, Gradle Kotlin DSL, and Gradle Groovy DSL examples stay functionally equivalent.

Alternatives considered

  • Keep hardcoded versions and update manually each release.
  • Remove versions from examples and rely only on external release links.

JSON-RPC behavior impact

No protocol-level impact.
This is a documentation maintenance and usability improvement.

Additional context

Goal: make docs easier to maintain and reduce drift between release version and example snippets.

Metadata

Metadata

Assignees

Labels

type: documentationDocumentation additions, updates, and corrections.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions