Skip to content

Document optional Version root element in spec files#100

Merged
Mehtrick merged 2 commits into
masterfrom
copilot/add-root-element-version-docs
Mar 4, 2026
Merged

Document optional Version root element in spec files#100
Mehtrick merged 2 commits into
masterfrom
copilot/add-root-element-version-docs

Conversation

Copilot AI commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

The Version optional root element in .zgr spec files was implemented but undocumented in both the README and copilot instructions.

Changes

  • README.md

    • Added Version: "1.0.0" to the example .zgr spec
    • Added description of Version field behavior alongside the existing Reference documentation
    • Updated generated Java code example to reflect @version Javadoc tag output
    • Updated AsciiDoc doc generation example to show Version: line in output
  • .github/copilot-instructions.md

    • Added Version: "1.0.0" to the BDD spec format example
    • Added description of Version field behavior

Behavior summary

Context Output
Generated Java @version <value> Javadoc tag on the abstract class
Generated AsciiDoc Version: <value> line below the feature title

Example .zgr:

Feature: My Feature
Version: "1.0.0"
Reference: "[TICKET-123](https://example.com/TICKET-123)"

Resulting Javadoc:

/**
 * My Feature
 * @version 1.0.0
 * @see <a href="https://example.com/TICKET-123">TICKET-123</a>
 */
public abstract class AbstractMyFeature ...

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…uctions

Co-authored-by: Mehtrick <4493019+Mehtrick@users.noreply.github.com>
Copilot AI changed the title [WIP] Add documentation for optional root element version Document optional Version root element in spec files Mar 4, 2026
@Mehtrick Mehtrick marked this pull request as ready for review March 4, 2026 21:02
Copilot AI review requested due to automatic review settings March 4, 2026 21:02
@Mehtrick Mehtrick merged commit 7d2a9a7 into master Mar 4, 2026
6 checks passed
@Mehtrick Mehtrick deleted the copilot/add-root-element-version-docs branch March 4, 2026 21:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Documents the already-implemented optional Version root element in .zgr spec files so users understand how it appears in generated Java and AsciiDoc outputs.

Changes:

  • Added Version: "1.0.0" to the sample .zgr spec shown in docs.
  • Documented how Version is rendered in generated Java (@version Javadoc tag) and generated AsciiDoc (Version: <value> line).
  • Updated generated output examples (Javadoc + AsciiDoc) accordingly.

Reviewed changes

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

File Description
README.md Documents Version in the spec example and shows its output in generated Java/AsciiDoc examples.
.github/copilot-instructions.md Updates Copilot instructions to include Version in the spec format example and describes its output behavior.
Comments suppressed due to low confidence (2)

README.md:99

  • The docs imply Version is rendered whenever the optional field is present, but current implementation differs between outputs: Java adds @version only when version is non-blank, while the AsciiDoc template renders the Version: line whenever version is non-null (so Version: "" would show an empty Version: line in docs but no @version in Java). Consider clarifying here that the value must be non-empty, or align the AsciiDoc generator/template behavior in a follow-up change.
The optional `Version` field specifies the version of the spec:
- In generated Java: rendered as a `@version` Javadoc tag on the abstract class.
- In generated docs: rendered as `Version: <value>` below the feature title.

.github/copilot-instructions.md:90

  • Note that the current generators handle empty version values differently: Java emits @version only for non-blank values, but the AsciiDoc template prints Version: whenever version is non-null. Consider clarifying that Version should be non-empty, or aligning the AsciiDoc condition to avoid inconsistent output for Version: "".
The optional `Version` field specifies the version of the spec. In generated Java it becomes a `@version` Javadoc tag; in generated AsciiDoc it is rendered as `Version: <value>` below the feature title.

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.

3 participants