Document optional Version root element in spec files#100
Merged
Conversation
…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 Mar 4, 2026
Version root element in spec files
Mehtrick
approved these changes
Mar 4, 2026
Contributor
There was a problem hiding this comment.
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.zgrspec shown in docs. - Documented how
Versionis rendered in generated Java (@versionJavadoc 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
Versionis rendered whenever the optional field is present, but current implementation differs between outputs: Java adds@versiononly whenversionis non-blank, while the AsciiDoc template renders theVersion:line wheneverversionis non-null (soVersion: ""would show an emptyVersion:line in docs but no@versionin 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
@versiononly for non-blank values, but the AsciiDoc template printsVersion:wheneverversionis non-null. Consider clarifying thatVersionshould be non-empty, or aligning the AsciiDoc condition to avoid inconsistent output forVersion: "".
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.
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.
The
Versionoptional root element in.zgrspec files was implemented but undocumented in both the README and copilot instructions.Changes
README.md
Version: "1.0.0"to the example.zgrspecVersionfield behavior alongside the existingReferencedocumentation@versionJavadoc tag outputVersion:line in output.github/copilot-instructions.mdVersion: "1.0.0"to the BDD spec format exampleVersionfield behaviorBehavior summary
@version <value>Javadoc tag on the abstract classVersion: <value>line below the feature titleExample
.zgr:Resulting Javadoc:
💡 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.