Skip to content

Add text to "Getting started" documentation section#267

Merged
alexander-yevsyukov merged 48 commits intomasterfrom
docs-set-4
Feb 25, 2026
Merged

Add text to "Getting started" documentation section#267
alexander-yevsyukov merged 48 commits intomasterfrom
docs-set-4

Conversation

@alexander-yevsyukov
Copy link
Collaborator

@alexander-yevsyukov alexander-yevsyukov commented Feb 24, 2026

This PR adds text to the "Getting started" section of the documentation. Also, the PR adds already added pages to the side navigation block.

Changes in details

  • Added front matter to the documentation files.
  • Updated navigation in "What's next" sections by pages.
  • Updated module documentation in "Developer's guide".
  • Split pages of "Getting started" section to more focused and detailed pages.
  • The "Generated code" section now has tabbed code samples for Kotlin and Java.
  • Added Kotlin DSL implementation comments in the code samples.
  • Placed images next to the content in the "Developer's guide" section.
  • Added existing pages to the side navigation bar.

Copilot AI review requested due to automatic review settings February 24, 2026 17:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR restructures and enhances the Spine Validation documentation, removing Hugo build directives that prevented page rendering and adding navigation structure to the "Getting started" section.

Changes:

  • Split the "Getting started" flow into distinct pages with clear navigation between them
  • Added "What's next" navigation sections throughout intro and developer's guide pages
  • Removed render: never frontmatter to make documentation pages visible
  • Updated image reference to correct file extension and added documentation plan

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.

Show a summary per file
File Description
version.gradle.kts Incremented snapshot version from 396 to 397
docs/content/docs/validation/_index.md Added main landing page content with navigation structure
docs/content/docs/validation/developers-guide/_index.md Removed duplicate directory (without 09- prefix)
docs/content/docs/validation/09-developers-guide/_index.md Added developer's guide landing page
docs/content/docs/validation/09-developers-guide/architecture.md Changed to H1 heading and added navigation links
docs/content/docs/validation/09-developers-guide/key-modules.md Changed to H1 heading and added navigation links
docs/content/docs/validation/08-custom-validation/_index.md Updated heading, fixed image file extension, added navigation
docs/content/docs/validation/01-getting-started/_index.md Updated navigation structure and simplified quick path
docs/content/docs/validation/01-getting-started/adding-to-build.md Updated next step link text
docs/content/docs/validation/01-getting-started/first-model.md Split into focused page on declaring constraints with revised navigation
docs/content/docs/validation/01-getting-started/build-project.md New page covering the build step
docs/content/docs/validation/01-getting-started/generated-code.md New page covering API usage (extracted from first-model.md)
docs/content/docs/validation/00-intro/_index.md Fixed directory link syntax
docs/content/docs/validation/00-intro/target-audience.md Added navigation links
docs/content/docs/validation/00-intro/philosophy.md Added navigation links
docs/content/ToC.md Removed legacy table of contents file
.agents/tasks/validation-documentation-plan.md Added documentation planning file with absolute paths
Comments suppressed due to low confidence (2)

docs/content/docs/validation/08-custom-validation/_index.md:18

  • The image path uses ../.github/readme/ while the similar image reference in 09-developers-guide/architecture.md uses .github/readme/ (without the ../ prefix). Both files are at the same directory level, so they should use consistent path patterns. The inconsistency suggests one of these paths may not work correctly. Verify which pattern is correct for your Hugo configuration and make both files consistent.
    .agents/tasks/validation-documentation-plan.md:68
  • This file contains absolute local file system paths that appear to be specific to a developer's machine (e.g., /Users/sanders/Projects/Spine/validation/). These paths should be converted to relative paths or removed from the committed documentation plan, as they won't work for other developers and could expose internal directory structures.
- Docs content (Hugo): `/Users/sanders/Projects/Spine/validation/docs/content/docs/validation/`
- Protobuf options reference (for built-ins):
  - `/Users/sanders/Projects/Spine/validation/docs/_options/options.proto`
  - `/Users/sanders/Projects/Spine/validation/docs/_options/time_options.proto`
- Example projects for embedded snippets: `/Users/sanders/Projects/Spine/validation/docs/_examples/`
- Docs build notes: `/Users/sanders/Projects/Spine/validation/docs/GRADLE.md`

## Definition of done (for a “first complete docs cut”)

- Navigation is consistent (no dead links between pages).
- Embedded code snippets are up-to-date (`checkSamples` passes).
- Preview site builds locally (`buildSite` succeeds).
- “Getting started” can be followed end-to-end without guessing.

## Minimal task list (in order)

1) Information architecture (IA): make Hugo navigation coherent
- Status: DONE (2026-02-23).
- Added/updated section landing pages:
  - `/Users/sanders/Projects/Spine/validation/docs/content/docs/validation/_index.md`
  - `/Users/sanders/Projects/Spine/validation/docs/content/docs/validation/09-developers-guide/_index.md`
- Replaced broken `.../index.md` links with directory links where appropriate:
  - `/Users/sanders/Projects/Spine/validation/docs/content/docs/validation/00-intro/_index.md`
  - `/Users/sanders/Projects/Spine/validation/docs/content/docs/validation/01-getting-started/_index.md`
- Added “What’s next” navigation to keep a clear reading path:
  - `/Users/sanders/Projects/Spine/validation/docs/content/docs/validation/00-intro/target-audience.md`
  - `/Users/sanders/Projects/Spine/validation/docs/content/docs/validation/00-intro/philosophy.md`
  - `/Users/sanders/Projects/Spine/validation/docs/content/docs/validation/09-developers-guide/architecture.md`
  - `/Users/sanders/Projects/Spine/validation/docs/content/docs/validation/09-developers-guide/key-modules.md`
  - `/Users/sanders/Projects/Spine/validation/docs/content/docs/validation/01-getting-started/first-model.md`
- Fixed an obvious broken image reference:
  `/Users/sanders/Projects/Spine/validation/docs/content/docs/validation/08-custom-validation/_index.md`

2) Complete “Getting started” flow
- Validate that “Adding to build” + “First model” cover:
  importing options, build-time validation, `build()` vs `buildPartial()`, and `validate()`.

3) Concepts: explain how Validation works (one layer deeper than “getting started”)
- Add a Concepts landing page and an “options overview” page that explains:
  where options come from, how they’re applied, and what code gets generated.
- Keep this conceptual (no option-by-option details yet).

4) Built-in options: publish a minimal reference set
- From `/Users/sanders/Projects/Spine/validation/docs/_options/options.proto` and
  `/Users/sanders/Projects/Spine/validation/docs/_options/time_options.proto`,
  enumerate the built-in options and group them (fields, strings, numbers, collections, message-level, time).
- For each documented option: purpose, supported field types, common pitfalls, and a short `.proto` example.
- Start with the options already used in docs/examples: `(required)`, `(pattern)`, `(min)/(max)`,
  `(distinct)`, `(validate)`, `(when)`.

5) Runtime API usage (Java + Kotlin)
- Document the two primary usage patterns:
  - fail-fast on `build()` (throws `ValidationException`);
  - non-throwing `validate()` (returns `Optional<ValidationError>`).
- Link to the runtime entry points used by generated code:
  `/Users/sanders/Projects/Spine/validation/jvm-runtime/src/main/java/io/spine/validation/ValidatableMessage.java`,
  `/Users/sanders/Projects/Spine/validation/jvm-runtime/src/main/java/io/spine/validation/ValidatingBuilder.java`,
  `/Users/sanders/Projects/Spine/validation/jvm-runtime/src/main/java/io/spine/validation/Validate.java`,
  `/Users/sanders/Projects/Spine/validation/jvm-runtime/src/main/java/io/spine/validation/ValidationException.java`,
  `/Users/sanders/Projects/Spine/validation/jvm-runtime/src/main/kotlin/io/spine/validation/MessageExtensions.kt`.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 24, 2026 18:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 18 out of 19 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

docs/content/docs/validation/08-custom-validation/_index.md:18

  • The image path ../.github/readme/typical_custom_option.jpg is incorrect. From the location docs/content/docs/validation/08-custom-validation/_index.md, this path would resolve to docs/content/docs/validation/.github/readme/typical_custom_option.jpg, but the actual file is at the repository root .github/readme/typical_custom_option.jpg. In Hugo documentation sites, you'll need to either copy the image to the appropriate content directory or use an absolute path from the site root (e.g., /.github/readme/typical_custom_option.jpg). Additionally, verify that the image format change from .png to .jpg is intentional and that the .jpg file exists.
    .agents/tasks/validation-documentation-plan.md:68
  • This file contains absolute filesystem paths specific to a particular developer's machine (e.g., /Users/sanders/Projects/Spine/validation/). These paths should either be made relative or removed, as they will not work for other developers and could expose sensitive information about the development environment. Consider using relative paths from the repository root or removing absolute paths entirely from committed documentation.
- Docs content (Hugo): `/Users/sanders/Projects/Spine/validation/docs/content/docs/validation/`
- Protobuf options reference (for built-ins):
  - `/Users/sanders/Projects/Spine/validation/docs/_options/options.proto`
  - `/Users/sanders/Projects/Spine/validation/docs/_options/time_options.proto`
- Example projects for embedded snippets: `/Users/sanders/Projects/Spine/validation/docs/_examples/`
- Docs build notes: `/Users/sanders/Projects/Spine/validation/docs/GRADLE.md`

## Definition of done (for a “first complete docs cut”)

- Navigation is consistent (no dead links between pages).
- Embedded code snippets are up-to-date (`checkSamples` passes).
- Preview site builds locally (`buildSite` succeeds).
- “Getting started” can be followed end-to-end without guessing.

## Minimal task list (in order)

1) Information architecture (IA): make Hugo navigation coherent
- Status: DONE (2026-02-23).
- Added/updated section landing pages:
  - `/Users/sanders/Projects/Spine/validation/docs/content/docs/validation/_index.md`
  - `/Users/sanders/Projects/Spine/validation/docs/content/docs/validation/09-developers-guide/_index.md`
- Replaced broken `.../index.md` links with directory links where appropriate:
  - `/Users/sanders/Projects/Spine/validation/docs/content/docs/validation/00-intro/_index.md`
  - `/Users/sanders/Projects/Spine/validation/docs/content/docs/validation/01-getting-started/_index.md`
- Added “What’s next” navigation to keep a clear reading path:
  - `/Users/sanders/Projects/Spine/validation/docs/content/docs/validation/00-intro/target-audience.md`
  - `/Users/sanders/Projects/Spine/validation/docs/content/docs/validation/00-intro/philosophy.md`
  - `/Users/sanders/Projects/Spine/validation/docs/content/docs/validation/09-developers-guide/architecture.md`
  - `/Users/sanders/Projects/Spine/validation/docs/content/docs/validation/09-developers-guide/key-modules.md`
  - `/Users/sanders/Projects/Spine/validation/docs/content/docs/validation/01-getting-started/first-model.md`
- Fixed an obvious broken image reference:
  `/Users/sanders/Projects/Spine/validation/docs/content/docs/validation/08-custom-validation/_index.md`

2) Complete “Getting started” flow
- Validate that “Adding to build” + “First model” cover:
  importing options, build-time validation, `build()` vs `buildPartial()`, and `validate()`.

3) Concepts: explain how Validation works (one layer deeper than “getting started”)
- Add a Concepts landing page and an “options overview” page that explains:
  where options come from, how they’re applied, and what code gets generated.
- Keep this conceptual (no option-by-option details yet).

4) Built-in options: publish a minimal reference set
- From `/Users/sanders/Projects/Spine/validation/docs/_options/options.proto` and
  `/Users/sanders/Projects/Spine/validation/docs/_options/time_options.proto`,
  enumerate the built-in options and group them (fields, strings, numbers, collections, message-level, time).
- For each documented option: purpose, supported field types, common pitfalls, and a short `.proto` example.
- Start with the options already used in docs/examples: `(required)`, `(pattern)`, `(min)/(max)`,
  `(distinct)`, `(validate)`, `(when)`.

5) Runtime API usage (Java + Kotlin)
- Document the two primary usage patterns:
  - fail-fast on `build()` (throws `ValidationException`);
  - non-throwing `validate()` (returns `Optional<ValidationError>`).
- Link to the runtime entry points used by generated code:
  `/Users/sanders/Projects/Spine/validation/jvm-runtime/src/main/java/io/spine/validation/ValidatableMessage.java`,
  `/Users/sanders/Projects/Spine/validation/jvm-runtime/src/main/java/io/spine/validation/ValidatingBuilder.java`,
  `/Users/sanders/Projects/Spine/validation/jvm-runtime/src/main/java/io/spine/validation/Validate.java`,
  `/Users/sanders/Projects/Spine/validation/jvm-runtime/src/main/java/io/spine/validation/ValidationException.java`,
  `/Users/sanders/Projects/Spine/validation/jvm-runtime/src/main/kotlin/io/spine/validation/MessageExtensions.kt`.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 24, 2026 19:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 21 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (3)

docs/content/docs/validation/00-intro/_index.md:124

  • Links within Hugo content are mixed between directory-style URLs and direct .md references. Given you’re switching other links to directory form (e.g., ../01-getting-started/), the .md links here are likely to render as broken URLs in the generated site. Prefer Hugo ref/relref (or directory-style links like target-audience/ and philosophy/) for consistency and to avoid 404s.
- [Target audience](target-audience.md)
- [Philosophy](philosophy.md)
- [Getting started](../01-getting-started/)

docs/content/docs/validation/01-getting-started/_index.md:15

  • These links mix directory-style (../00-intro/) with .md targets (target-audience.md, philosophy.md). If the site is intended to use pretty URLs (as implied by other edits), linking to .md will likely generate broken links on the rendered site. Use Hugo ref/relref (or ../00-intro/target-audience/ and ../00-intro/philosophy/) to keep URLs correct.
- Introduction → [Overview](../00-intro/)
- Who this is for → [Target audience](../00-intro/target-audience.md)
- Design principles → [Philosophy](../00-intro/philosophy.md)

.agents/tasks/validation-documentation-plan.md:14

  • This new repo-local plan hard-codes absolute local paths (/Users/sanders/...), which makes it non-portable for other contributors and CI environments. Replace these with repository-relative paths (e.g., docs/content/docs/validation/, docs/_options/..., docs/_examples/) so the plan remains accurate for all developers.
- Docs content (Hugo): `/Users/sanders/Projects/Spine/validation/docs/content/docs/validation/`
- Protobuf options reference (for built-ins):
  - `/Users/sanders/Projects/Spine/validation/docs/_options/options.proto`
  - `/Users/sanders/Projects/Spine/validation/docs/_options/time_options.proto`
- Example projects for embedded snippets: `/Users/sanders/Projects/Spine/validation/docs/_examples/`
- Docs build notes: `/Users/sanders/Projects/Spine/validation/docs/GRADLE.md`

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 25, 2026 16:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 22 out of 23 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 25, 2026 16:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 23 out of 24 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 25, 2026 18:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 24 out of 28 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@armiol armiol left a comment

Choose a reason for hiding this comment

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

@alexander-yevsyukov LGTM except for a few comments.

Copy link
Collaborator

Choose a reason for hiding this comment

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

In this picture, in its top-right corner I would go with "JVM Validation plugin". Not "Java Validation Plugin".

@alexander-yevsyukov alexander-yevsyukov merged commit fce5b89 into master Feb 25, 2026
8 checks passed
@alexander-yevsyukov alexander-yevsyukov deleted the docs-set-4 branch February 25, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants