Skip to content

fix(markdown): render map and scalar declarations and correct stereotypes - #322

Open
chaitijain593-prog wants to merge 1 commit into
accordproject:mainfrom
chaitijain593-prog:fix/markdown-declarations
Open

chaitijain593-prog wants to merge 1 commit into
accordproject:mainfrom
chaitijain593-prog:fix/markdown-declarations

Conversation

@chaitijain593-prog

Copy link
Copy Markdown

Closes #321

Fixes missing map and scalar declaration rendering in generated Markdown documentation, ensures accurate stereotypes for assets, participants, transactions, and events, and corrects a typo in table headers.

Changes

  • Implemented visitMapDeclaration to render map name, description, key type, and value type table.
  • Implemented visitScalarDeclaration to render scalar name, description, type, default value, and validation constraints.
  • Overrode visitAssetDeclaration, visitParticipantDeclaration, visitTransactionDeclaration, and visitEventDeclaration so that entity headings accurately reflect their kind instead of defaulting to (Concept).
  • Corrected table header typo | Contraints | to | Constraints |.
  • Added a full unit test suite with 19 tests under test/codegen/fromcto/markdown/markdownvisitor.js.
  • Updated codegen test snapshots for markdown output.

Flags

  • None. All existing verification and linting tests pass cleanly.

Related Issues

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests
  • Commits messages follow AP format
  • Extend the documentation, if necessary
  • Merging to main from fork:branchname

…ypes (accordproject#321)

Signed-off-by: chaitijain593 <chaitijain593@gmail.com>
@mira-accord-project

Copy link
Copy Markdown

Thank you for this contribution, and welcome to Accord Project.

The markdown visitor now renders map and scalar declarations, which were previously left out. It also uses the right stereotype for assets, participants, transactions and events, and fixes the Constraints header typo. Unit tests and snapshot updates are included.

The change is large, so a maintainer may ask for it to be split into smaller pull requests. We have requested reviews from the codegen maintainers. The CI runs are waiting for a maintainer to approve them before they start, which is normal for a first contribution.

Drafted by an Accord Project agent, reviewed by a maintainer.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/kind:bugfix bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(markdown): MarkdownVisitor omits map and scalar declarations and mislabels declaration types

1 participant