Skip to content

[DEV-1751] Add package imports to Java getting-started and appending-events examples#393

Merged
w1am merged 1 commit into
trunkfrom
docs/add-imports-to-java-examples
Jun 1, 2026
Merged

[DEV-1751] Add package imports to Java getting-started and appending-events examples#393
w1am merged 1 commit into
trunkfrom
docs/add-imports-to-java-examples

Conversation

@w1am
Copy link
Copy Markdown
Contributor

@w1am w1am commented Jun 1, 2026

What

Adds the import statements to the Java doc examples on first use of each class:

  • getting-started.mdio.kurrent.dbclient.{KurrentDBClient, KurrentDBClientSettings, KurrentDBConnectionString} on the "Creating a client" snippet, and io.kurrent.dbclient.EventData + com.fasterxml.jackson.databind.json.JsonMapper on the "Creating an event" snippet.
  • appending-events.mdio.kurrent.dbclient.{AppendToStreamOptions, EventData, StreamState} and java.util.UUID on the first "Append your first event" example. The code-fence highlight range is shifted ({32-43} to {38-49}) to keep pointing at the append logic.

Why

The connection and append snippets used KurrentDBClient, EventData, AppendToStreamOptions, etc. without showing where they come from. The build coordinate is io.kurrent:kurrentdb-client, but the package is io.kurrent.dbclient, so a reader (or a tool generating code from these docs) who reconstructs the import from the artifact name lands on the wrong package (io.kurrent.client) and the snippet won't compile.

AppendToStreamOptions, StreamState, and UUID appear only on the appending page, so their imports have to live there.

Convention preserved

Imports are added only on first use of each class. Later snippets on the same page (e.g. the idempotency example in appending-events.md) are left unchanged, so the docs aren't cluttered with repeated imports.

@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Add package imports to Java documentation examples

📝 Documentation

Grey Divider

Walkthroughs

Description
• Add import statements to Java code examples in getting-started guide
• Add import statements to Java code examples in appending-events guide
• Adjust code-fence highlight range in appending-events to account for new imports
• Ensure imports appear only on first use of each class per page
Diagram
flowchart LR
  A["getting-started.md"] -->|"Add imports for KurrentDBClient,<br/>KurrentDBClientSettings,<br/>KurrentDBConnectionString,<br/>EventData, JsonMapper"| B["Updated with imports"]
  C["appending-events.md"] -->|"Add imports for AppendToStreamOptions,<br/>EventData, StreamState, UUID<br/>and adjust highlight range"| D["Updated with imports"]

Loading

Grey Divider

File Changes

1. docs/api/getting-started.md 📝 Documentation +7/-0

Add imports to getting-started Java examples

• Added import statements for KurrentDBClient, KurrentDBClientSettings, and
 KurrentDBConnectionString to the "Creating a client" code snippet
• Added import statements for EventData and com.fasterxml.jackson.databind.json.JsonMapper to
 the "Creating an event" code snippet
• Imports are placed at the beginning of each code block on first use

docs/api/getting-started.md


2. docs/api/appending-events.md 📝 Documentation +7/-1

Add imports and adjust highlight range

• Added import statements for AppendToStreamOptions, EventData, StreamState, and
 java.util.UUID to the first append example
• Updated code-fence highlight range from {32-43} to {38-49} to account for the new import lines
• Imports are placed at the beginning of the code block on first use

docs/api/appending-events.md


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review Bot commented Jun 1, 2026

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Qodo Logo

@w1am w1am merged commit 3b3d141 into trunk Jun 1, 2026
1 check passed
@w1am w1am deleted the docs/add-imports-to-java-examples branch June 1, 2026 11:54
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@w1am 👉 Created pull request targeting release/v1.2: #394

@w1am w1am changed the title Add package imports to Java getting-started and appending-events examples [DEV-1751] Add package imports to Java getting-started and appending-events examples Jun 2, 2026
@linear-code
Copy link
Copy Markdown

linear-code Bot commented Jun 2, 2026

DEV-1751

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant