You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(markdown): MarkdownVisitor omits map and scalar declarations and mislabels declaration types #321
When generating Markdown documentation using MarkdownVisitor:
Map Declarations should be rendered with their name, key type, value type, and any description decorators.
Scalar Declarations should be rendered with their name, underlying primitive type, default value, validation constraints (e.g., regex, length bounds, range bounds), and description decorators.
Declaration Stereotypes in section headings should accurately reflect the declaration kind: (Asset), (Participant), (Transaction), (Event), and (Concept).
Table column headers should be spelled correctly (Constraints instead of Contraints).
Actual Behavior
Maps and scalars are completely omitted: In lib/codegen/fromcto/markdown/markdownvisitor.js, visitModelFile writes ## Overview reporting map and scalar counts (- 6 maps, - 2 scalars), but the visitor never implements visitMapDeclaration or visitScalarDeclaration. The fallback no-op methods from BaseVisitor run, resulting in zero documentation generated for maps or scalars.
All non-enum classes are labeled (Concept):visitClassDeclaration hardcodes ### ${classDeclaration.getName()} (Concept). Because visitAssetDeclaration, visitParticipantDeclaration, visitTransactionDeclaration, and visitEventDeclaration are not overridden, all assets, participants, transactions, and events are documented as concepts (e.g., ### Equipment (Concept) instead of ### Equipment (Asset)).
Column header typo: Line 143 writes | Contraints | instead of | Constraints |.
No dedicated unit tests:test/codegen/fromcto/markdown/ currently does not exist.
Steps to Reproduce
Load a model file containing maps, scalars, assets, transactions, and events (such as test/codegen/fromcto/data/model/hr_base.cto + hr.cto).
Run MarkdownVisitor on the ModelManager.
Inspect models.md:
## Overview reports counts for maps and scalars, but neither appears in the document.
Assets and participants (like Equipment and Person) appear under ### Equipment (Concept) and ### Person (Concept).
Thank you for the clear report, including the reproduction steps and the pointers to the code.
This issue is linked to pull request #322, which implements the fix: rendering map and scalar declarations, the Asset, Participant, Transaction and Event stereotypes, and the Constraints header. A maintainer will review #322 against this issue. Nothing more is needed from you here for now.
We searched merged pull requests for an existing fix and found none, so #322 is the one to review.
Drafted by an Accord Project agent, reviewed by a maintainer.
Thank you for the detailed report. Pull request #322 covers the points raised here: it adds the missing map and scalar sections, uses the correct stereotype for each declaration kind, corrects the Constraints header, and adds unit tests.
We have requested reviews from the codegen maintainers.
Drafted by an Accord Project agent, reviewed by a maintainer.
Activity
mira-accord-project commentedon Nov 13, 2026
Thank you for the clear report, including the reproduction steps and the pointers to the code.
This issue is linked to pull request #322, which implements the fix: rendering map and scalar declarations, the Asset, Participant, Transaction and Event stereotypes, and the
Constraintsheader. A maintainer will review #322 against this issue. Nothing more is needed from you here for now.We searched merged pull requests for an existing fix and found none, so #322 is the one to review.
Drafted by an Accord Project agent, reviewed by a maintainer.
mira-accord-project commentedon Nov 13, 2026
Thank you for the detailed report. Pull request #322 covers the points raised here: it adds the missing map and scalar sections, uses the correct stereotype for each declaration kind, corrects the Constraints header, and adds unit tests.
We have requested reviews from the codegen maintainers.
Drafted by an Accord Project agent, reviewed by a maintainer.