Skip to content

fix: make catapult-docs-cli serialization generator work for NEM schemas#1168

Merged
segfaultxavi merged 3 commits into
symbol:mainfrom
zero4862:fix-nem-serialization-generation
May 27, 2026
Merged

fix: make catapult-docs-cli serialization generator work for NEM schemas#1168
segfaultxavi merged 3 commits into
symbol:mainfrom
zero4862:fix-nem-serialization-generation

Conversation

@zero4862

Copy link
Copy Markdown
Contributor


Three issues prevented serialization from producing usable output for the NEM catbuffer schemas:

  1. condition_value can be an int in NEM schemas. The previous string concatenation (v['condition'] + ' ' + ...) raised TypeError: can only concatenate str (not "int") to str. Switched to .format() so any printable value works.
  2. The generated schema link hardcoded schemas/symbol. Changed it to be flexible to accept either symbol or nem.
  3. Wrap the type description in a <dl markdown><dt><code>ser:Name</code></dt><dd>...</dd></dl> block so the type name is shown as a title above the description and so each type becomes a ser: glossary.

@zero4862

Copy link
Copy Markdown
Contributor Author

cc/ @segfaultxavi

segfaultxavi
segfaultxavi previously approved these changes May 27, 2026

@segfaultxavi segfaultxavi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍

@zero4862 zero4862 requested a review from segfaultxavi May 27, 2026 09:40

@segfaultxavi segfaultxavi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Excellent!

@segfaultxavi segfaultxavi merged commit ec694fa into symbol:main May 27, 2026
3 checks passed
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.

2 participants