[DEV-1751] Add package imports to Java getting-started and appending-events examples#393
Merged
Merged
Conversation
Review Summary by QodoAdd package imports to Java documentation examples
WalkthroughsDescription• 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 Diagramflowchart 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"]
File Changes1. docs/api/getting-started.md
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds the
importstatements to the Java doc examples on first use of each class:getting-started.md—io.kurrent.dbclient.{KurrentDBClient, KurrentDBClientSettings, KurrentDBConnectionString}on the "Creating a client" snippet, andio.kurrent.dbclient.EventData+com.fasterxml.jackson.databind.json.JsonMapperon the "Creating an event" snippet.appending-events.md—io.kurrent.dbclient.{AppendToStreamOptions, EventData, StreamState}andjava.util.UUIDon 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 isio.kurrent:kurrentdb-client, but the package isio.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, andUUIDappear 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.