@eventcatalog/core 4.10.12 → 4.10.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/dist/analytics/analytics.cjs +1 -1
  2. package/dist/analytics/analytics.js +2 -2
  3. package/dist/analytics/log-build.cjs +1 -1
  4. package/dist/analytics/log-build.js +3 -3
  5. package/dist/{chunk-7URQ754Q.js → chunk-HERAHLM2.js} +1 -1
  6. package/dist/{chunk-Y5XU3YLT.js → chunk-LITOQH56.js} +1 -1
  7. package/dist/{chunk-S4LLGOO4.js → chunk-LUW6RDA7.js} +1 -1
  8. package/dist/{chunk-VFSEVDCQ.js → chunk-ONDFEA5R.js} +1 -1
  9. package/dist/{chunk-A53VCEEA.js → chunk-V2SKOQYF.js} +1 -1
  10. package/dist/constants.cjs +1 -1
  11. package/dist/constants.js +1 -1
  12. package/dist/docs/api/02-config.md +55 -1
  13. package/dist/docs/development/authentication/providers/03-setting-up-github.md +29 -0
  14. package/dist/docs/development/bring-your-own-documentation/custom-pages/02-adding-custom-docs.md +2 -2
  15. package/dist/docs/development/bring-your-own-documentation/custom-pages/03-components.md +17 -0
  16. package/dist/docs/development/components/07-resource-references.md +7 -1
  17. package/dist/docs/development/components/components/05-architecture-graph.md +65 -0
  18. package/dist/docs/development/components/components/{05-attachments.md → 06-attachments.md} +1 -1
  19. package/dist/docs/development/components/components/{06-channel-information.md → 07-channel-information.md} +1 -1
  20. package/dist/docs/development/components/components/{07-custom-properties.md → 08-custom-properties.md} +1 -1
  21. package/dist/docs/development/components/components/{08-design.md → 09-design.md} +1 -1
  22. package/dist/docs/development/components/components/{09-entitymap.md → 10-entitymap.md} +1 -1
  23. package/dist/docs/development/components/components/{10-flow.md → 11-flow.md} +1 -1
  24. package/dist/docs/development/components/components/{11-link.md → 12-link.md} +1 -1
  25. package/dist/docs/development/components/components/{12-mermaid-file-loader.md → 13-mermaid-file-loader.md} +1 -1
  26. package/dist/docs/development/components/components/{13-message-table.md → 14-message-table.md} +1 -1
  27. package/dist/docs/development/components/components/{14-nodegraph.md → 15-nodegraph.md} +1 -1
  28. package/dist/docs/development/components/components/{15-openapi.md → 16-openapi.md} +1 -1
  29. package/dist/docs/development/components/components/{16-prompt.md → 17-prompt.md} +1 -1
  30. package/dist/docs/development/components/components/{17-remote-schema.md → 18-remote-schema.md} +1 -1
  31. package/dist/docs/development/components/components/{18-resource-group-table.md → 19-resource-group-table.md} +1 -1
  32. package/dist/docs/development/components/components/{19-resource-link.md → 20-resource-link.md} +1 -1
  33. package/dist/docs/development/components/components/{20-schema.md → 21-schema.md} +1 -1
  34. package/dist/docs/development/components/components/{21-schema-viewer.md → 22-schema-viewer.md} +1 -1
  35. package/dist/docs/development/components/components/{22-steps.md → 23-steps.md} +1 -1
  36. package/dist/docs/development/components/components/{23-tabs.md → 24-tabs.md} +1 -1
  37. package/dist/docs/development/components/components/{24-tiles.md → 25-tiles.md} +1 -1
  38. package/dist/docs/development/components/components/{25-visibility.md → 26-visibility.md} +1 -1
  39. package/dist/docs/development/customization/04-documentation-sidebar.md +3 -3
  40. package/dist/docs/development/customization/05-resource-sidebar.md +235 -0
  41. package/dist/docs/development/customization/09-embed-eventcatalog.md +179 -0
  42. package/dist/docs/development/customization/_category_.json +1 -1
  43. package/dist/docs/development/deployment/build-and-deploy.md +4 -0
  44. package/dist/docs/development/deployment/hosting-options.md +1 -1
  45. package/dist/docs/development/deployment/link-validation.md +105 -0
  46. package/dist/docs/development/developer-tools/eventcatalog-linter/00-overview.md +76 -0
  47. package/dist/docs/development/developer-tools/eventcatalog-linter/01-setup.md +144 -0
  48. package/dist/docs/development/developer-tools/eventcatalog-linter/_category_.json +10 -0
  49. package/dist/docs/development/developer-tools/eventcatalog-linter/how-to/01-configure-rules.md +130 -0
  50. package/dist/docs/development/developer-tools/eventcatalog-linter/how-to/02-run-in-ci.md +93 -0
  51. package/dist/docs/development/developer-tools/eventcatalog-linter/how-to/03-use-custom-frontmatter.md +81 -0
  52. package/dist/docs/development/developer-tools/eventcatalog-linter/how-to/04-reference-external-catalogs.md +51 -0
  53. package/dist/docs/development/developer-tools/eventcatalog-linter/how-to/05-fix-common-problems.md +120 -0
  54. package/dist/docs/development/developer-tools/eventcatalog-linter/how-to/_category_.json +12 -0
  55. package/dist/docs/development/developer-tools/eventcatalog-linter/reference/01-cli.md +109 -0
  56. package/dist/docs/development/developer-tools/eventcatalog-linter/reference/02-configuration.md +120 -0
  57. package/dist/docs/development/developer-tools/eventcatalog-linter/reference/03-rules.md +287 -0
  58. package/dist/docs/development/developer-tools/eventcatalog-linter/reference/04-versions.md +77 -0
  59. package/dist/docs/development/developer-tools/eventcatalog-linter/reference/05-supported-resources.md +75 -0
  60. package/dist/docs/development/developer-tools/eventcatalog-linter/reference/_category_.json +12 -0
  61. package/dist/docs/development/guides/97-architecture-graph.md +78 -0
  62. package/dist/docs/development/guides/domains/02-create-domain.md +1 -1
  63. package/dist/docs/development/guides/domains/03-ownership-and-language/02-adding-ubiquitous-language.md +29 -0
  64. package/dist/docs/development/guides/domains/09-reference.md +10 -0
  65. package/dist/docs/development/guides/resources/messages/04-message-channels/02-adding-channels.md +2 -2
  66. package/dist/docs/development/guides/resources/messages/04-message-channels/04-adding-messages-to-services.md +8 -0
  67. package/dist/docs/development/guides/resources/schemas/03-add-specifications-to-services/01-add-openapi-specifications.md +2 -2
  68. package/dist/docs/development/guides/resources/schemas/03-add-specifications-to-services/02-add-asyncapi-specifications.md +3 -3
  69. package/dist/docs/development/guides/systems/05-system-context-maps.md +2 -0
  70. package/dist/docs/development/license-keys/license-validation.md +7 -3
  71. package/dist/docs/development/license-keys/overview.md +7 -3
  72. package/dist/docs/development/upgrading/upgrading.md +3 -3
  73. package/dist/docs/development/upgrading/v2.md +3 -3
  74. package/dist/docs/federation/00-overview.md +158 -0
  75. package/dist/docs/federation/01-first-federation.md +199 -0
  76. package/dist/docs/federation/_category_.json +12 -0
  77. package/dist/docs/federation/explanation/_category_.json +12 -0
  78. package/dist/docs/federation/explanation/how-it-works.md +129 -0
  79. package/dist/docs/federation/explanation/lockfile-and-cache.md +134 -0
  80. package/dist/docs/federation/explanation/mvp-status-and-feedback.md +86 -0
  81. package/dist/docs/federation/explanation/ownership-and-references.md +134 -0
  82. package/dist/docs/federation/how-to/_category_.json +12 -0
  83. package/dist/docs/federation/how-to/configure-github-sources.md +156 -0
  84. package/dist/docs/federation/how-to/configure-validation-rules.md +127 -0
  85. package/dist/docs/federation/how-to/run-in-ci.md +138 -0
  86. package/dist/docs/federation/how-to/share-assets-and-components.md +125 -0
  87. package/dist/docs/federation/how-to/use-local-sources.md +138 -0
  88. package/dist/docs/{plugins/eventcatalog-federation → federation/legacy-federation}/00-introduction.md +11 -2
  89. package/dist/docs/{plugins/eventcatalog-federation → federation/legacy-federation}/01-installation.md +11 -3
  90. package/dist/docs/{plugins/eventcatalog-federation → federation/legacy-federation}/02-plugin-configuration.md +11 -2
  91. package/dist/docs/{plugins/eventcatalog-federation → federation/legacy-federation}/03-examples.md +11 -1
  92. package/dist/docs/{plugins/eventcatalog-federation → federation/legacy-federation}/04-configuration.md +11 -1
  93. package/dist/docs/{plugins/eventcatalog-federation → federation/legacy-federation}/05-setup-team-catalog.md +11 -2
  94. package/dist/docs/federation/legacy-federation/_category_.json +12 -0
  95. package/dist/docs/federation/reference/_category_.json +12 -0
  96. package/dist/docs/federation/reference/cli.md +122 -0
  97. package/dist/docs/federation/reference/configuration.md +192 -0
  98. package/dist/docs/federation/reference/diagnostic-rules.md +173 -0
  99. package/dist/docs/federation/reference/generated-output.md +118 -0
  100. package/dist/docs/federation/reference/supported-content.md +86 -0
  101. package/dist/docs/federation/reference/troubleshooting.md +208 -0
  102. package/dist/docs/plugins/01-intro.md +3 -3
  103. package/dist/docs/plugins/03-all-plugins.md +2 -2
  104. package/dist/docs/plugins/asyncapi/00-intro.md +4 -4
  105. package/dist/docs/plugins/asyncapi/02-plugin-configuration.md +4 -4
  106. package/dist/docs/plugins/backstage/00-overview.md +53 -0
  107. package/dist/docs/plugins/backstage/01-get-started.md +95 -0
  108. package/dist/docs/plugins/backstage/02-embed-entity-tabs.md +109 -0
  109. package/dist/docs/plugins/backstage/03-add-overview-cards.md +79 -0
  110. package/dist/docs/plugins/backstage/04-control-theme-and-size.md +54 -0
  111. package/dist/docs/plugins/backstage/05-migrate-to-annotations.md +49 -0
  112. package/dist/docs/plugins/backstage/06-configuration.md +85 -0
  113. package/dist/docs/plugins/backstage/07-components.md +129 -0
  114. package/dist/docs/plugins/backstage/08-how-embeds-work.md +52 -0
  115. package/dist/docs/plugins/backstage/_category_.json +4 -3
  116. package/dist/docs/plugins/eventbridge/00-intro.md +5 -5
  117. package/dist/docs/plugins/eventbridge/03-api.md +3 -3
  118. package/dist/docs/plugins/graphql/00-intro.md +2 -2
  119. package/dist/docs/plugins/graphql/02-plugin-configuration.md +2 -2
  120. package/dist/docs/plugins/hookdeck/01-intro.md +1 -1
  121. package/dist/docs/plugins/openapi/00-intro.md +1 -1
  122. package/dist/eventcatalog.cjs +1 -1
  123. package/dist/eventcatalog.js +5 -5
  124. package/dist/generate.cjs +1 -1
  125. package/dist/generate.js +3 -3
  126. package/dist/utils/cli-logger.cjs +1 -1
  127. package/dist/utils/cli-logger.js +2 -2
  128. package/eventcatalog/src/components/ChatPanel/ChatPanel.tsx +208 -119
  129. package/eventcatalog/src/components/ChatPanel/ChatPanelButton.tsx +28 -8
  130. package/eventcatalog/src/components/ChatPanel/OfflineReply.tsx +45 -0
  131. package/eventcatalog/src/components/Header.astro +11 -6
  132. package/eventcatalog/src/components/MDX/Design/Design.astro +2 -2
  133. package/eventcatalog/src/components/MDX/EntityMap/EntityMap.astro +2 -2
  134. package/eventcatalog/src/components/MDX/Flow/Flow.astro +2 -2
  135. package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.astro +2 -2
  136. package/eventcatalog/src/components/SchemaExplorer/AvroSchemaViewer.tsx +21 -19
  137. package/eventcatalog/src/components/SchemaExplorer/JSONSchemaViewer.tsx +79 -77
  138. package/eventcatalog/src/components/SchemaExplorer/ProtobufSchemaViewer.test.tsx +91 -0
  139. package/eventcatalog/src/components/SchemaExplorer/ProtobufSchemaViewer.tsx +115 -33
  140. package/eventcatalog/src/components/SchemaExplorer/SchemaViewerHover.test.tsx +33 -0
  141. package/eventcatalog/src/components/SchemaExplorer/protobuf-validation.test.ts +84 -0
  142. package/eventcatalog/src/components/SchemaExplorer/protobuf-validation.ts +149 -0
  143. package/eventcatalog/src/components/Search/Search.astro +11 -4
  144. package/eventcatalog/src/components/Settings/AssistantSettingsForm.tsx +29 -24
  145. package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/index.astro +3 -3
  146. package/eventcatalog/src/pages/diagrams/[id]/[version]/index.astro +2 -2
  147. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/index.astro +5 -3
  148. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/index.astro +10 -4
  149. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/asyncapi/[filename].astro +2 -2
  150. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +3 -3
  151. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/spec/[filename].astro +2 -2
  152. package/eventcatalog/src/pages/visualiser/designs/[id]/index.astro +2 -2
  153. package/eventcatalog/src/utils/feature.ts +1 -0
  154. package/eventcatalog/src/utils/protobuf-schema.ts +211 -16
  155. package/package.json +3 -3
  156. package/dist/docs/cli/channels.md +0 -180
  157. package/dist/docs/cli/commands.md +0 -183
  158. package/dist/docs/cli/custom-docs.md +0 -78
  159. package/dist/docs/cli/data-products.md +0 -177
  160. package/dist/docs/cli/data-stores.md +0 -166
  161. package/dist/docs/cli/diagrams.md +0 -147
  162. package/dist/docs/cli/domains.md +0 -280
  163. package/dist/docs/cli/entities.md +0 -138
  164. package/dist/docs/cli/events.md +0 -186
  165. package/dist/docs/cli/export.md +0 -27
  166. package/dist/docs/cli/governance.md +0 -24
  167. package/dist/docs/cli/messages.md +0 -69
  168. package/dist/docs/cli/queries.md +0 -183
  169. package/dist/docs/cli/services.md +0 -266
  170. package/dist/docs/cli/snapshots.md +0 -44
  171. package/dist/docs/cli/teams.md +0 -75
  172. package/dist/docs/cli/users.md +0 -75
  173. package/dist/docs/cli/utilities.md +0 -43
  174. package/dist/docs/development/developer-tools/eventcatalog-linter.md +0 -732
  175. package/dist/docs/plugins/backstage/00-intro.md +0 -67
  176. package/dist/docs/plugins/backstage/01-installation.md +0 -242
  177. package/dist/docs/plugins/backstage/02-api.md +0 -51
  178. package/dist/docs/plugins/backstage/03-examples.md +0 -12
  179. package/dist/docs/plugins/eventcatalog-federation/_category_.json +0 -11
@@ -0,0 +1,109 @@
1
+ ---
2
+ sidebar_position: 1
3
+ sidebar_label: CLI
4
+ title: Linter CLI reference
5
+ description: Command, options, exit codes, output format and environment behaviour of eventcatalog-linter.
6
+ ---
7
+
8
+ ## Usage
9
+
10
+ ```
11
+ eventcatalog-linter [options] [directory]
12
+ ```
13
+
14
+ | Argument | Description | Default |
15
+ |----------|-------------|---------|
16
+ | `directory` | The catalog to lint — the folder containing `eventcatalog.config.js` | `.` |
17
+
18
+ Run it with `npx @eventcatalog/linter`, or install `@eventcatalog/linter` and use the `eventcatalog-linter` binary.
19
+
20
+ ## Options
21
+
22
+ | Option | Description |
23
+ |--------|-------------|
24
+ | `-v, --verbose` | Show verbose output |
25
+ | `-q, --quiet` | Report errors only. Warnings are dropped from the output and from the counts |
26
+ | `--fail-on-warning` | Exit with code 1 when any warning is reported. Equivalent to `--max-warnings 0` |
27
+ | `--max-warnings <number>` | Exit with code 1 when more than `<number>` warnings are reported. Must be a non-negative integer |
28
+ | `--no-color` | Disable coloured output |
29
+ | `--init` | Write a commented `.eventcatalogrc.js` to the catalog directory and exit without linting. See [configuration](./configuration#scaffold-a-configuration-file) |
30
+ | `--force` | With `--init`, overwrite an existing `.eventcatalogrc.js` |
31
+ | `-V, --version` | Print the linter version |
32
+ | `-h, --help` | Print help |
33
+
34
+ ## Exit codes
35
+
36
+ | Code | Meaning |
37
+ |------|---------|
38
+ | `0` | No errors. Warnings may have been reported, provided they don't exceed `--max-warnings` |
39
+ | `1` | At least one error was reported, warnings exceeded `--max-warnings` / `--fail-on-warning` was set, an option was invalid, or the linter itself failed |
40
+
41
+ `--init` exits `0` after writing the file and `1` if the file already exists (without `--force`).
42
+
43
+ ## Output
44
+
45
+ Findings are grouped by file and sorted by position:
46
+
47
+ ```
48
+ services/order-service/index.mdx
49
+ 6:1 ✖ error Unknown property "owner". Did you mean "owners"? [owner] (schema/unknown-field)
50
+ 9:5 ✖ error Referenced event/command/query "OrderCreatd" does not exist. Did you mean "OrderCreated"? [sends[0]] (refs/resource-exists)
51
+ 14:1 ⚠ warning Resource should have a markdown description (body content) beyond just frontmatter [description] (best-practices/description-required)
52
+
53
+ ✖ 3 problems
54
+
55
+ ✖ 3 problems (2 errors, 1 warning) in 1 file
56
+ 178 files checked, 3 files ignored
57
+ ```
58
+
59
+ | Part | Meaning |
60
+ |------|---------|
61
+ | `6:1` | 1-based line and column of the finding. Keys are reported at the key; references at the value; missing fields at the nearest parent (line 2 for a missing top-level field); body-content findings at the first line after the frontmatter; YAML parse errors at the failing token |
62
+ | `✖ error` / `⚠ warning` | Severity after applying your configuration |
63
+ | `[owner]` | The frontmatter field path, including array indexes (`sends[0].to[1]`) |
64
+ | `(schema/unknown-field)` | The rule name. Parse failures use `(@eventcatalog/parse-error)` |
65
+ | `in 1 file` | Number of files with at least one finding |
66
+ | `178 files checked` | Number of files scanned and validated, after `ignorePatterns` |
67
+ | `3 files ignored` | Number of recognised files skipped by `ignorePatterns` (omitted when zero) |
68
+
69
+ When nothing is found:
70
+
71
+ ```
72
+ ✔ No problems found!
73
+ 178 files checked
74
+ ```
75
+
76
+ When the directory contains no recognisable catalog files, the linter prints `⚠ No EventCatalog files found` and exits `0`.
77
+
78
+ ## Progress output and terminals
79
+
80
+ A progress spinner is written to **stderr** while the linter runs. It is shown only when stderr is an interactive terminal, the `CI` environment variable is not set, and `TERM` is not `dumb`. In pipelines and when piping output, nothing is written to stderr, so logs contain only findings.
81
+
82
+ Colour follows [chalk](https://github.com/chalk/chalk) conventions: `--no-color`, `NO_COLOR=1` or `FORCE_COLOR=0` disable it; `FORCE_COLOR=1` enables it in non-TTY output.
83
+
84
+ ## Files the linter reads
85
+
86
+ | File | Purpose |
87
+ |------|---------|
88
+ | `.eventcatalogrc.js` | Rule configuration. Optional; see [configuration](./configuration) |
89
+ | `eventcatalog.config.js` | Read for `dependencies` so references to external resources resolve. Optional |
90
+ | Resource `index.md` / `index.mdx` files | See [supported resources](./supported-resources) |
91
+ | Files referenced from frontmatter | `schemaPath`, `schemas[]`, `specifications`, contracts and `public/` icons are checked for existence by [`refs/file-exists`](./rules#refsfile-exists) |
92
+
93
+ The linter never modifies your catalog.
94
+
95
+ ## Programmatic use
96
+
97
+ The package exports the pieces the CLI is built from — `scanCatalogFiles`, `parseAllFiles`, `validateCatalog`, `validateUnrecognisedFiles`, `attachLocations`, `loadConfig`, `applyRuleSeverity`, `reportErrors`, the rule registry (`RULES`) and version helpers — for use from your own scripts:
98
+
99
+ ```ts
100
+ import { scanCatalogFiles, parseAllFiles, validateCatalog, loadConfig } from '@eventcatalog/linter';
101
+
102
+ const rootDir = process.cwd();
103
+ const config = loadConfig(rootDir);
104
+ const files = await scanCatalogFiles(rootDir);
105
+ const { parsed } = await parseAllFiles(files);
106
+ const findings = validateCatalog(parsed, undefined, config);
107
+ ```
108
+
109
+ The public API is not yet frozen; expect it to be consolidated into a single `lint()` entry point in a future release.
@@ -0,0 +1,120 @@
1
+ ---
2
+ sidebar_position: 2
3
+ sidebar_label: Configuration
4
+ title: Linter configuration reference
5
+ description: The shape of .eventcatalogrc.js — rules, options, ignore patterns, overrides — and how it merges with the defaults.
6
+ ---
7
+
8
+ The linter looks for `.eventcatalogrc.js` in the directory it lints. The file is optional; without it every rule runs at its default severity.
9
+
10
+ ## Scaffold a configuration file
11
+
12
+ ```bash
13
+ npx @eventcatalog/linter --init # writes .eventcatalogrc.js
14
+ npx @eventcatalog/linter --init --force # overwrites an existing one
15
+ ```
16
+
17
+ The generated file lists every rule grouped by category, with a description, its default severity and an example of its options. It uses `export default` when the catalog's `package.json` has `"type": "module"` and `module.exports` otherwise.
18
+
19
+ ## Shape
20
+
21
+ ```js title=".eventcatalogrc.js"
22
+ module.exports = {
23
+ rules: {
24
+ '<rule-name>': '<severity>',
25
+ '<rule-name>': ['<severity>', { /* options */ }],
26
+ },
27
+ ignorePatterns: ['<glob>', '<glob>'],
28
+ overrides: [
29
+ {
30
+ files: ['<glob>', '<glob>'],
31
+ rules: {
32
+ '<rule-name>': '<severity>',
33
+ '<rule-name>': ['<severity>', { /* options */ }],
34
+ },
35
+ },
36
+ ],
37
+ };
38
+ ```
39
+
40
+ Every top-level key is optional.
41
+
42
+ ### `rules`
43
+
44
+ An object keyed by rule name. Rule names are listed in the [rules reference](./rules).
45
+
46
+ | Value | Effect |
47
+ |-------|--------|
48
+ | `'error'` | Report and fail the run |
49
+ | `'warn'` | Report; fail only with `--fail-on-warning` / `--max-warnings` |
50
+ | `'off'` | Don't check |
51
+ | `[severity, options]` | As above, with rule-specific options. See each rule for its options |
52
+
53
+ Unknown rule names are ignored silently.
54
+
55
+ ### `ignorePatterns`
56
+
57
+ Glob patterns, matched against each file's path relative to the catalog root (forward slashes). Matching files are not validated, not counted, and not reported by `structure/unrecognised-file`.
58
+
59
+ `dependencies/**` is always ignored in addition to what you list.
60
+
61
+ Supported syntax is deliberately simple: `*` matches within a path segment and `**` matches across segments. A pattern beginning with `**/` needs at least one leading folder to match, so prefer `drafts/**` to `**/drafts/**` for a top-level folder.
62
+
63
+ ### `overrides`
64
+
65
+ An ordered list. Each entry has `files` (glob patterns, same syntax as `ignorePatterns`) and `rules` (same shape as the top-level `rules`). For a given file, the top-level rules are applied first, then every override whose `files` matches, in order — later entries win.
66
+
67
+ ## Merging with the defaults
68
+
69
+ At load time the linter merges your file over the built-in defaults:
70
+
71
+ - `rules` — your entries override the default severity for that rule; rules you don't mention keep their default.
72
+ - `ignorePatterns` — your patterns are appended to the default `['dependencies/**']`.
73
+ - `overrides` — used as given (the default is an empty list).
74
+
75
+ If the file exists but can't be loaded (syntax error, wrong module format), the linter prints a warning and continues with the defaults.
76
+
77
+ ## Module format
78
+
79
+ `.eventcatalogrc.js` is loaded with Node's `require`. Use `module.exports` in a CommonJS project. In a project with `"type": "module"`, use `export default`; this is supported on Node.js 20.19 / 22.12 and later, where `require` can load ES modules. `--init` picks the right form automatically.
80
+
81
+ ## `eventcatalog.config.js`
82
+
83
+ The linter also reads your catalog's `eventcatalog.config.js`, but only for `dependencies`, so that references to resources documented in other catalogs resolve. See [Reference external catalogs](../how-to/reference-external-catalogs). Nothing else in that file affects linting.
84
+
85
+ ## Full example
86
+
87
+ ```js title=".eventcatalogrc.js"
88
+ module.exports = {
89
+ rules: {
90
+ // Findings that mean EventCatalog will fail or silently drop something
91
+ 'schema/unknown-field': ['error', { allow: ['legacy*'] }],
92
+ 'refs/resource-exists': 'error',
93
+ 'refs/file-exists': ['error', { publicDir: 'static' }],
94
+ 'structure/unrecognised-file': 'error',
95
+
96
+ // Documentation quality
97
+ 'best-practices/description-required': 'warn',
98
+ 'best-practices/schema-required': 'warn',
99
+ 'refs/orphan-messages': 'warn',
100
+ },
101
+
102
+ ignorePatterns: ['drafts/**'],
103
+
104
+ overrides: [
105
+ {
106
+ files: ['domains/Legacy/**'],
107
+ rules: {
108
+ 'best-practices/owner-required': 'warn',
109
+ 'best-practices/summary-required': 'off',
110
+ },
111
+ },
112
+ {
113
+ files: ['**/containers/**'],
114
+ rules: {
115
+ 'best-practices/description-required': 'off',
116
+ },
117
+ },
118
+ ],
119
+ };
120
+ ```
@@ -0,0 +1,287 @@
1
+ ---
2
+ sidebar_position: 3
3
+ sidebar_label: Rules
4
+ title: Linter rules reference
5
+ description: Every rule the EventCatalog Linter can report — what it checks, its default severity, its options, an example message and how to fix it.
6
+ ---
7
+
8
+ import AddedIn from '@site/src/components/MDX/AddedIn';
9
+
10
+ Rules are grouped into five categories. Each rule can be set to `'error'`, `'warn'` or `'off'` in [`.eventcatalogrc.js`](./configuration); rules marked **options** also accept `[severity, { ... }]`.
11
+
12
+ | Rule | Default | Options |
13
+ |------|---------|---------|
14
+ | [`schema/required-fields`](#schemarequired-fields) | error | |
15
+ | [`schema/valid-type`](#schemavalid-type) | error | |
16
+ | [`schema/valid-semver`](#schemavalid-semver) | error | |
17
+ | [`schema/valid-email`](#schemavalid-email) | error | |
18
+ | [`schema/validation-error`](#schemavalidation-error) | error | |
19
+ | [`schema/unknown-field`](#schemaunknown-field) | error | `allow`, `suggestions` |
20
+ | [`schema/unknown-nested-field`](#schemaunknown-nested-field) | warn | `allow`, `suggestions` |
21
+ | [`refs/owner-exists`](#refsowner-exists) | error | |
22
+ | [`refs/resource-exists`](#refsresource-exists) | error | |
23
+ | [`refs/valid-version-range`](#refsvalid-version-range) | error | |
24
+ | [`refs/channel-exists`](#refschannel-exists) | error | |
25
+ | [`refs/container-exists`](#refscontainer-exists) | error | |
26
+ | [`refs/file-exists`](#refsfile-exists) | error | `icons`, `publicDir` |
27
+ | [`refs/orphan-messages`](#refsorphan-messages) | warn | |
28
+ | [`best-practices/summary-required`](#best-practicessummary-required) | error | |
29
+ | [`best-practices/owner-required`](#best-practicesowner-required) | error | |
30
+ | [`best-practices/description-required`](#best-practicesdescription-required) | warn | |
31
+ | [`best-practices/schema-required`](#best-practicesschema-required) | warn | |
32
+ | [`versions/no-deprecated-references`](#versionsno-deprecated-references) | warn | |
33
+ | [`structure/duplicate-resource-ids`](#structureduplicate-resource-ids) | error | |
34
+ | [`structure/unrecognised-file`](#structureunrecognised-file) | warn | |
35
+
36
+ YAML that cannot be parsed at all is reported as `(@eventcatalog/parse-error)`. It is always an error and cannot be configured.
37
+
38
+ ## Schema validation
39
+
40
+ These rules validate frontmatter against the same schemas EventCatalog uses.
41
+
42
+ ### `schema/required-fields`
43
+
44
+ A required field is missing from the frontmatter. Which fields are required depends on the resource type; `id`, `name` and `version` are required almost everywhere.
45
+
46
+ ```
47
+ 2:1 ✖ error name: Required [name] (schema/required-fields)
48
+ ```
49
+
50
+ **Fix:** add the field.
51
+
52
+ ### `schema/valid-type`
53
+
54
+ A field has the wrong type — a string where a list is expected, a missing required field reported as `undefined`, and so on.
55
+
56
+ ```
57
+ 2:1 ✖ error version: Expected string, but received undefined [version] (schema/valid-type)
58
+ 7:9 ✖ error owners: Expected array, but received string [owners] (schema/valid-type)
59
+ ```
60
+
61
+ **Fix:** correct the value's shape. Lists in YAML are written with `- ` items or `[a, b]`.
62
+
63
+ ### `schema/valid-semver`
64
+
65
+ A `version` (or a version inside a reference) isn't a format EventCatalog understands.
66
+
67
+ ```
68
+ 4:10 ✖ error version: Invalid semantic version format [version] (schema/valid-semver)
69
+ ```
70
+
71
+ **Fix:** use semver (`1.2.3`, `1.0.0-beta`), a number-like version (`1`, `1.2`, `v1`, `V2`), `latest`, or a range (`^1.0.0`, `1.x`). See the [versions reference](./versions).
72
+
73
+ ### `schema/valid-email`
74
+
75
+ An `email` field on a user or team isn't a valid email address.
76
+
77
+ **Fix:** correct the address.
78
+
79
+ ### `schema/validation-error`
80
+
81
+ A schema problem that doesn't fit the categories above. The message carries the underlying detail.
82
+
83
+ ### `schema/unknown-field`
84
+
85
+ <AddedIn version="1.1.17" pkg="@eventcatalog/linter" url="https://github.com/event-catalog/eventcatalog" />
86
+
87
+ A top-level frontmatter key isn't part of the resource's schema. EventCatalog rejects unknown top-level keys at build time unless they start with `x-`, so this rule catches typos and stray custom fields before the build does. The message suggests the closest known key, or tells you when the key belongs to a different resource type.
88
+
89
+ ```
90
+ 6:1 ✖ error Unknown property "owner". Did you mean "owners"? [owner] (schema/unknown-field)
91
+ 8:1 ✖ error Unknown property "costCenter". Custom properties must start with "x-". [costCenter] (schema/unknown-field)
92
+ 5:1 ✖ error Unknown property "sends". "sends" is valid on service, agent, domain resources, but not on event resources. [sends] (schema/unknown-field)
93
+ ```
94
+
95
+ **Options**
96
+
97
+ | Option | Type | Default | Description |
98
+ |--------|------|---------|-------------|
99
+ | `allow` | `string[]` | `[]` | Keys, or `prefix*` patterns, to accept. Matched against the key name and the full path |
100
+ | `suggestions` | `boolean` | `true` | Include "Did you mean" and other-resource-type hints |
101
+
102
+ ```js
103
+ 'schema/unknown-field': ['error', { allow: ['costCenter', 'legacy*'], suggestions: true }]
104
+ ```
105
+
106
+ Keys starting with `x-` are always allowed, as are the `catalog`, `versions` and `latestVersion` fields the SDK writes into generated content.
107
+
108
+ **Fix:** rename the key, or prefix it with `x-`. See [Allow custom frontmatter](../how-to/use-custom-frontmatter).
109
+
110
+ ### `schema/unknown-nested-field`
111
+
112
+ <AddedIn version="1.1.17" pkg="@eventcatalog/linter" url="https://github.com/event-catalog/eventcatalog" />
113
+
114
+ The same check for keys inside nested objects and arrays (`sends[0].too`, `detailsPanel.ownerz`). EventCatalog silently ignores these rather than failing, which is why the default is `warn` — but a typo here usually means a relationship or setting is being dropped. Options are the same as `schema/unknown-field`, and an `allow` list set on either rule applies to both.
115
+
116
+ ```
117
+ 12:9 ⚠ warning Unknown property "sends[0].too". Did you mean "to"? [sends[0].too] (schema/unknown-nested-field)
118
+ ```
119
+
120
+ Arbitrary keys are permitted where the schema allows them — flow step `custom.properties`, channel `parameters`, and any `producers`/`consumers` object.
121
+
122
+ ## Reference validation
123
+
124
+ These rules check that everything your frontmatter points at actually exists. References can be plain ids (`- order-service`) or objects (`- id: order-service`, optionally with `version`). Version matching follows the [versions reference](./versions).
125
+
126
+ ### `refs/owner-exists`
127
+
128
+ An entry in `owners` (or an ADR's `decisionMakers`) doesn't match any user or team.
129
+
130
+ ```
131
+ 6:5 ✖ error Referenced user/team "platfrom-team" does not exist. Did you mean "platform-team"? [owners[0]] (refs/owner-exists)
132
+ ```
133
+
134
+ **Fix:** correct the id, or add the user (`users/<id>.mdx`) or team (`teams/<id>.mdx`).
135
+
136
+ ### `refs/resource-exists`
137
+
138
+ A referenced resource id doesn't exist among the resource types the field accepts — `sends`/`receives` (events, commands, queries), `services`, `domains`, `entities`, `flows`, flow steps, ADR `appliesTo`, data product `inputs`/`outputs`, and so on. The message adds a "did you mean" suggestion for near-miss ids, or points out when the id exists as a different resource type.
139
+
140
+ ```
141
+ 9:5 ✖ error Referenced event/command/query "OrderCreatd" does not exist. Did you mean "OrderCreated"? [sends[0]] (refs/resource-exists)
142
+ 9:5 ✖ error Referenced flow "PlaceOrder" does not exist. "PlaceOrder" exists as a command, not a flow. [appliesTo[0]] (refs/resource-exists)
143
+ ```
144
+
145
+ This rule fires whether or not the reference has a version — if the id itself is unknown, the version is irrelevant.
146
+
147
+ **Fix:** correct the id, create the resource, or declare it as an external [dependency](../how-to/reference-external-catalogs).
148
+
149
+ ### `refs/valid-version-range`
150
+
151
+ The referenced resource exists, but no version of it satisfies the reference. The message lists the versions that do exist, newest first. It also fires when the version reference isn't a version, range or `latest` at all.
152
+
153
+ ```
154
+ 9:14 ✖ error Referenced event "OrderCreated" does not have a version matching "3.0.0". Available versions: 2.0.0, 1.0.0 [sends[0]] (refs/valid-version-range)
155
+ 9:14 ✖ error Referenced event "OrderCreated" has an invalid version reference "two". Use a version (1.0.0, v1), a range (^1.0.0, 1.x) or "latest". Available versions: 1.0.0 [sends[0]] (refs/valid-version-range)
156
+ ```
157
+
158
+ **Fix:** reference an existing version or a range that matches one, or add the version under `versioned/`.
159
+
160
+ ### `refs/channel-exists`
161
+
162
+ A channel referenced from `sends[].to`, `receives[].from`, a message's `channels`, or a channel's `routes`/`channels` doesn't exist (or doesn't exist at that version).
163
+
164
+ ```
165
+ 11:9 ✖ error Referenced channel "orders-topic" does not exist. Did you mean "orders"? [sends[0].to[0]] (refs/channel-exists)
166
+ ```
167
+
168
+ ### `refs/container-exists`
169
+
170
+ A container referenced from `writesTo`, `readsFrom`, a system's `containers`, or a container-typed flow step doesn't exist. `dataStore` is accepted as a legacy alias for `container`.
171
+
172
+ ```
173
+ 13:5 ✖ error Referenced container "orders-db" does not have a version matching "9.0.0". Available versions: 1.0.0 [writesTo[0]] (refs/container-exists)
174
+ ```
175
+
176
+ ### `refs/file-exists`
177
+
178
+ <AddedIn version="1.1.17" pkg="@eventcatalog/linter" url="https://github.com/event-catalog/eventcatalog" />
179
+
180
+ A file referenced from frontmatter doesn't exist. The linter resolves each path the way EventCatalog does:
181
+
182
+ | Field | Resolved against |
183
+ |-------|------------------|
184
+ | `schemaPath` | the resource's own folder |
185
+ | `schemas[].file`, `schemas[].path` | the resource's own folder |
186
+ | `schemas[].ref` | `file://<relative>` against the resource folder; `file:///<absolute>` as given. Other refs (schema registries) are skipped |
187
+ | `specifications.openapiPath` / `asyncapiPath` / `graphqlPath`, `specifications[].path` | the resource's own folder; `http(s)://` values are skipped |
188
+ | data product `outputs[].contract.path` | the resource's own folder |
189
+ | `styles.icon` starting with `/` | the catalog's `public/` folder; icon names and URLs are skipped |
190
+
191
+ Because paths resolve against the resource's own folder, a versioned copy under `versioned/1.0.0/` must have its own schema file next to it.
192
+
193
+ ```
194
+ 7:13 ✖ error Referenced schema file "schema.json" does not exist (looked for "events/OrderCreated/schema.json") [schemaPath] (refs/file-exists)
195
+ 15:9 ✖ error Referenced icon "/icons/go.svg" does not exist (looked for "public/icons/go.svg") [styles.icon] (refs/file-exists)
196
+ ```
197
+
198
+ **Options**
199
+
200
+ | Option | Type | Default | Description |
201
+ |--------|------|---------|-------------|
202
+ | `icons` | `boolean` | `true` | Check `styles.icon` paths |
203
+ | `publicDir` | `string` | `'public'` | Folder, relative to the catalog root, that `/`-prefixed icon paths are served from |
204
+
205
+ ```js
206
+ 'refs/file-exists': ['error', { icons: false, publicDir: 'static' }]
207
+ ```
208
+
209
+ ### `refs/orphan-messages`
210
+
211
+ An event, command or query that nothing produces or consumes: no service, agent or domain lists it in `sends`/`receives`, and the message itself has no `producers`/`consumers`. Messages declared as external dependencies are never orphans.
212
+
213
+ ```
214
+ 2:5 ⚠ warning event "OrderCreated" has no producer and no consumer [id] (refs/orphan-messages)
215
+ ```
216
+
217
+ **Fix:** connect the message to a service, or turn the rule off for intentionally standalone messages.
218
+
219
+ ## Best practices
220
+
221
+ Documentation-quality checks. They don't affect whether EventCatalog builds, so tune them to your team's standards.
222
+
223
+ ### `best-practices/summary-required`
224
+
225
+ The resource has no `summary`, or it's blank. Users are exempt (the user schema has no summary field).
226
+
227
+ ```
228
+ 2:1 ✖ error Summary is required for better documentation [summary] (best-practices/summary-required)
229
+ ```
230
+
231
+ ### `best-practices/owner-required`
232
+
233
+ The resource has no `owners`, or the list is empty. Users and teams are exempt.
234
+
235
+ ```
236
+ 2:1 ✖ error At least one owner is required [owners] (best-practices/owner-required)
237
+ ```
238
+
239
+ ### `best-practices/description-required`
240
+
241
+ The file has no markdown body after the frontmatter.
242
+
243
+ ```
244
+ 14:1 ⚠ warning Resource should have a markdown description (body content) beyond just frontmatter [description] (best-practices/description-required)
245
+ ```
246
+
247
+ ### `best-practices/schema-required`
248
+
249
+ An event, command or query has no `schemaPath`.
250
+
251
+ ```
252
+ 2:1 ⚠ warning event should have a schemaPath defined for consumers to understand the contract [schemaPath] (best-practices/schema-required)
253
+ ```
254
+
255
+ ## Versioning
256
+
257
+ ### `versions/no-deprecated-references`
258
+
259
+ A reference points at a resource marked `deprecated`. A reference without a version (or `latest`) is flagged if any version of the target is deprecated; a versioned reference is flagged only if that version is. Owner and team-member references are not checked.
260
+
261
+ ```
262
+ 9:5 ⚠ warning Referenced event "OrderCreated" (version: 1.0.0) is deprecated [sends[0]] (versions/no-deprecated-references)
263
+ ```
264
+
265
+ ## Catalog structure
266
+
267
+ ### `structure/duplicate-resource-ids`
268
+
269
+ Two files declare the same resource type, `id` and `version`.
270
+
271
+ ```
272
+ 2:5 ✖ error Duplicate event "OrderCreated" (version: 1.0.0) — also defined in domains/Orders/events/OrderCreated/index.mdx [id] (structure/duplicate-resource-ids)
273
+ ```
274
+
275
+ ### `structure/unrecognised-file`
276
+
277
+ <AddedIn version="1.1.17" pkg="@eventcatalog/linter" url="https://github.com/event-catalog/eventcatalog" />
278
+
279
+ A `.md`/`.mdx` file lives under a resource folder but matches none of the locations EventCatalog loads resources from, so it will be silently ignored. The message suggests where the file probably belongs. Markdown that EventCatalog loads through other means — `docs/` folders, `pages/`, `changelog.md`, `ubiquitous-language.md` — and build artifacts are not reported. Files matched by `ignorePatterns` are skipped.
280
+
281
+ ```
282
+ 1:1 ⚠ warning File "events/OrderCreated.mdx" is not recognised as an EventCatalog resource and will be ignored. Did you mean "events/OrderCreated/index.mdx"? (structure/unrecognised-file)
283
+ 1:1 ⚠ warning File "event/OrderCreated/index.mdx" is not recognised … Did you mean "events/OrderCreated/index.mdx"? (structure/unrecognised-file)
284
+ 1:1 ⚠ warning File "users/john/index.mdx" is not recognised … users are flat files. Did you mean "users/john.mdx"? (structure/unrecognised-file)
285
+ ```
286
+
287
+ Recognised locations are listed in [Supported resources](./supported-resources). Because a misplaced file means the catalog is missing content, consider promoting this rule to `'error'`.
@@ -0,0 +1,77 @@
1
+ ---
2
+ sidebar_position: 4
3
+ sidebar_label: Versions
4
+ title: Version formats and matching
5
+ description: The version formats the linter accepts on resources and in references, and how a reference is matched against the versions that exist.
6
+ ---
7
+
8
+ The linter accepts exactly the version formats EventCatalog accepts, and matches references the same way EventCatalog does when it builds pages and visualisations.
9
+
10
+ ## Resource versions
11
+
12
+ The `version` field on a resource (`version: 1.0.0`) may be:
13
+
14
+ | Format | Examples | Notes |
15
+ |--------|----------|-------|
16
+ | Semantic version | `1.0.0`, `2.1.3-beta`, `1.0.0+build.5` | Compared as semver |
17
+ | Number-like | `1`, `1.2`, `v1`, `V2.1` | Coerced to semver for comparison (`v1` ≡ `1.0.0`, `1.2` ≡ `1.2.0`) |
18
+ | `latest` | `latest` | Accepted, but a resource without a comparable version can't satisfy range references |
19
+
20
+ Values that are none of these — `one`, `1.0.0.0`, `version-1` — are reported by [`schema/valid-semver`](./rules#schemavalid-semver).
21
+
22
+ :::note
23
+ YAML parses `version: 1` as a number, and EventCatalog's schema requires a string. Quote number-like versions: `version: "1"`.
24
+ :::
25
+
26
+ ## Version references
27
+
28
+ Wherever frontmatter points at another resource, a `version` may be given:
29
+
30
+ ```yaml
31
+ sends:
32
+ - id: OrderCreated # no version → latest
33
+ - id: OrderCreated
34
+ version: latest # explicit latest
35
+ - id: OrderCreated
36
+ version: 2.1.0 # exact
37
+ - id: OrderCreated
38
+ version: v2 # number-like, same as 2.0.0
39
+ - id: OrderCreated
40
+ version: ^2.0.0 # semver range
41
+ - id: OrderCreated
42
+ version: 2.x # x-range
43
+ ```
44
+
45
+ | Reference | Matches |
46
+ |-----------|---------|
47
+ | _(omitted)_ or `latest` | Any version of the resource — the newest is used |
48
+ | Exact (`2.1.0`, `V2`) | A version that is the same after coercion (`V2` matches `2`, `v2.0`, `2.0.0`) |
49
+ | Semver range (`^2.0.0`, `~2.1.0`, `>=1.5`, `1.0.0 - 2.0.0`) | Any version satisfying the range. `V` is normalised to `v` first |
50
+ | X-range (`2.x`, `0.0.x`) | Any version with that prefix |
51
+
52
+ A reference value that is none of these is reported by [`refs/valid-version-range`](./rules#refsvalid-version-range) as invalid.
53
+
54
+ ## How matching is decided
55
+
56
+ For a reference with an id and version:
57
+
58
+ 1. Is there any resource of an accepted type with that id? If not → [`refs/resource-exists`](./rules#refsresource-exists), regardless of the version.
59
+ 2. Is the version omitted or `latest`? → match.
60
+ 3. Does any existing version equal the reference exactly, or after coercion? → match.
61
+ 4. Does any existing version satisfy the reference as a semver range or x-range? → match.
62
+ 5. Otherwise → [`refs/valid-version-range`](./rules#refsvalid-version-range), listing the existing versions newest first.
63
+
64
+ A resource with no `version` in its frontmatter is indexed as `latest`. It matches references without a version, but not range references (`^1.0.0`), because `latest` has no numeric value to compare.
65
+
66
+ ## External dependencies
67
+
68
+ Resources declared in `eventcatalog.config.js` `dependencies` take part in matching too. A dependency without a `version` matches any reference to its id; with a `version`, the rules above apply.
69
+
70
+ ## Ordering
71
+
72
+ When the linter lists "available versions" it sorts newest first using semver comparison, so `V3` sorts above `2` above `v1`. If any version can't be compared numerically, the list falls back to reverse alphabetical order — the same rule EventCatalog uses to pick the latest version of a resource.
73
+
74
+ ## Related
75
+
76
+ - [Versioning resources](/docs/development/guides/versioning-resources)
77
+ - [Reference external catalogs](../how-to/reference-external-catalogs)
@@ -0,0 +1,75 @@
1
+ ---
2
+ sidebar_position: 5
3
+ sidebar_label: Supported resources
4
+ title: Supported resources and file locations
5
+ description: The resource types the linter validates and the folders and file names it scans to find them.
6
+ ---
7
+
8
+ The linter validates every resource type EventCatalog supports. It finds resources by scanning the same file locations EventCatalog loads from; anything else under a resource folder is reported by [`structure/unrecognised-file`](./rules#structureunrecognised-file).
9
+
10
+ ## Resource types and locations
11
+
12
+ Paths are relative to the catalog root. `<id>` is the resource's folder name and `<version>` a folder under `versioned/`. Both `index.md` and `index.mdx` are accepted.
13
+
14
+ | Resource type | Locations |
15
+ |---------------|-----------|
16
+ | Domain | `domains/<id>/index.mdx`, `domains/<id>/subdomains/<id>/index.mdx`, plus `versioned/<version>/index.mdx` under each |
17
+ | System | `systems/**/index.mdx` at any depth, including inside domains. Nested resource folders (`services/`, `containers/`, …) are loaded as their own types |
18
+ | Service | `services/<id>/index.mdx`, and inside a domain, subdomain or system: `domains/<d>/services/<id>/`, `domains/<d>/subdomains/<s>/services/<id>/`, `**/systems/**/services/<id>/` |
19
+ | Event | `**/events/<id>/index.mdx` |
20
+ | Command | `**/commands/<id>/index.mdx` |
21
+ | Query | `**/queries/<id>/index.mdx` |
22
+ | Channel | `**/channels/**/index.mdx` (channels may be nested, e.g. `channels/public/orders/`) |
23
+ | Flow | `**/flows/**/index.mdx` |
24
+ | Entity | `**/entities/<id>/index.mdx` |
25
+ | Agent | `**/agents/<id>/index.mdx` |
26
+ | Container | `**/containers/**/index.mdx` |
27
+ | Data product | `**/data-products/<id>/index.mdx` |
28
+ | Diagram | `**/diagrams/**/index.mdx` |
29
+ | ADR | `**/adrs/<id>/index.mdx` |
30
+ | User | `users/<id>.mdx` — a flat file, not a folder |
31
+ | Team | `teams/<id>.mdx` — a flat file, not a folder |
32
+
33
+ Every folder-based type also accepts `versioned/<version>/index.mdx` beneath the resource folder for historic versions.
34
+
35
+ ## Federated content
36
+
37
+ Resources materialised by [Federation](/docs/federation/overview) under `federated/<catalog>/…` are scanned with the same patterns, so owners, services and messages from other catalogs resolve.
38
+
39
+ ## Resource ids
40
+
41
+ The `id` in the frontmatter is what references resolve against. The folder or file name is used only as a fallback when `id` is missing, so `services/UserService/index.mdx` with `id: user-service` is referenced as `user-service`.
42
+
43
+ ## Files that are not resources
44
+
45
+ These markdown files are loaded by EventCatalog through other collections and are deliberately not treated as resources or reported as unrecognised:
46
+
47
+ | Location | What it is |
48
+ |----------|------------|
49
+ | `**/docs/**/*.md(x)` | Resource documentation pages |
50
+ | `docs/**/*.md(x)` | Catalog-level documentation |
51
+ | `**/pages/*.md(x)` | Custom pages |
52
+ | `**/changelog.md(x)` | Resource changelogs |
53
+ | `domains/**/ubiquitous-language.md(x)` | Ubiquitous language dictionaries |
54
+
55
+ Build artifacts (`dist/`, `node_modules/`, `.astro/`) and the `dependencies/` folder EventCatalog generates are skipped.
56
+
57
+ ## What is validated per resource
58
+
59
+ All resources are checked for frontmatter schema conformance, unknown keys, owners, summary, body content, duplicate ids and file references. Type-specific reference checks:
60
+
61
+ | Resource | References checked |
62
+ |----------|--------------------|
63
+ | Domain | `services`, `agents`, `domains` (subdomains), `systems`, `entities`, `data-products`/`dataProducts`, `flows`, `sends`, `receives` (incl. channels in `to`/`from`) |
64
+ | System | `services`, `flows`, `entities`, `containers`, `relationships` |
65
+ | Service, Agent | `sends`, `receives` (incl. channels), `writesTo`, `readsFrom`, `flows`, `entities` (services only) |
66
+ | Event, Command, Query | `producers`, `consumers`, `channels`, `messageChannels`; orphan detection; `schemaPath` / `schemas[]` files |
67
+ | Channel | `channels`, `routes`, `messages` |
68
+ | Flow | each step's `message`, `service`, `agent`, `flow`, `container`, `dataProduct` |
69
+ | Entity | `properties[].references`, `services`, `domains` |
70
+ | Container | `services`, `servicesThatWriteToContainer`, `servicesThatReadFromContainer`, `dataProductsThatWriteToContainer`, `dataProductsThatReadFromContainer` |
71
+ | Data product | `inputs`, `outputs` (any linkable type), `outputs[].contract.path` file |
72
+ | ADR | `decisionMakers`, typed `appliesTo`, `supersedes`, `supersededBy`, `amends`, `amendedBy`, `related` |
73
+ | User | `associatedTeams`, `owned*` lists |
74
+ | Team | `members`, `owned*` lists |
75
+ | All | `owners`, `diagrams`, `resourceGroups[].items` |