Tagging Files

To enable Cartographer to generate documentation from your codebase, you’ll need to tag the files you want it to process. Tagging is a simple, lightweight way to indicate which files or sections of code should be included in your documentation. Tags are added as a comment at the top of your code and consist of comma-separated values. Note: All attributes must stay on one line.

Required attributes
// @cartographer id: [ID], name: [NAME]
Optional attributes
// @cartographer id: [ID], name: [NAME], diagramType: [DIAGRAM], context: [CONTEXT], folderId: [FOLDER], spaceId: [SPACE]
Example:
// @cartographer id: HF4563S1, name: "API Docs", diagramType: component

Using Multiple Files for a Single Document

In most projects, code is distributed across multiple files to maintain structure and readability. Cartographer supports this by allowing you to link several related files together and generate a single, cohesive document. This ensures your documentation accurately reflects how your code is organized and functions across modules.

In the primary (or parent) file, add the standard tag as described above. To include additional related files, tag them using the following format:

// @cartographer parentId: [PARENT ID]

If your parent file has an id of 123456, you would use that value as the parentId in any additional files you want to associate with the same document. You do not need to add any additional attributes to child tags.