Skip to content

docs: Clean up .json extension in RST anchor names generated by jsonschema2rst #6

Description

@coderabbitai

Summary

The RST documentation generated by jsonschema2rst includes .json as part of anchor names (e.g., 05_settings_yaml_syntax.json#/properties/simulation). These anchor names are visible to end-users in the rendered documentation (e.g., in cross-references like :ref:05_settings_yaml_syntax.json#/properties/simulation``), which looks awkward.

Root Cause

jsonschema2rst derives anchor names directly from input filenames (including extensions). It offers no configuration option to customize anchor generation.

Proposed Fix

Extend the sed post-processing already present in scripts/generate_syntax_documentation.py to strip .json from anchor names and cross-references in the generated .rst files. This would transform anchors like 05_settings_yaml_syntax.json#/ into 05_settings_yaml_syntax#/. Any :ref: usages in the docs (e.g., in docs/manual/source/chapters/04_procedures.rst) would also need to be updated to match.

References

/cc @infinitymdm

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions