@eventcatalog/core 4.3.2 → 4.3.3
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.
- package/dist/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +1 -1
- package/dist/analytics/log-build.js +3 -3
- package/dist/{chunk-T6UEDS2J.js → chunk-2IGBU3PN.js} +1 -1
- package/dist/{chunk-YBNWZEFQ.js → chunk-HR6KK56F.js} +1 -1
- package/dist/{chunk-25RQCO2H.js → chunk-OWE74ZHY.js} +3 -3
- package/dist/{chunk-W4UBACYZ.js → chunk-PXBG5QKU.js} +1 -1
- package/dist/{chunk-BYH34SOZ.js → chunk-UW52WRSH.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/docs/api/02-config.md +24 -0
- package/dist/docs/cli/governance.md +1 -1
- package/dist/docs/cli/snapshots.md +1 -1
- package/dist/docs/development/ask-your-architecture/03-mcp-server/getting-started.md +56 -7
- package/dist/docs/development/ask-your-architecture/03-mcp-server/introduction.md +8 -3
- package/dist/docs/development/deployment/build-ssr-mode.md +1 -9
- package/dist/docs/development/developer-tools/api-catalog.md +1 -1
- package/dist/docs/development/guides/98-versioning-resources.md +15 -0
- package/dist/docs/development/guides/resources/entities/03-model-entity-relationships.md +26 -6
- package/dist/docs/development/guides/resources/entities/05-entity-maps.md +2 -0
- package/dist/docs/development/guides/resources/entities/06-reference.md +25 -2
- package/dist/docs/development/guides/resources/services/07-versioning-and-lifecycle/01-version-services.md +2 -0
- package/dist/docs/plugins/asyncapi/02-plugin-configuration.md +30 -2
- package/dist/docs/plugins/asyncapi/03-features.md +39 -26
- package/dist/docs/plugins/asyncapi/03a-workflows.md +61 -2
- package/dist/docs/plugins/openapi/02-plugin-configuration.md +1 -2
- package/dist/docs/plugins/openapi/03-features.md +8 -6
- package/dist/docs/plugins/openapi/03a-workflows.md +79 -18
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.js +9 -9
- package/dist/generate.cjs +1 -1
- package/dist/generate.js +3 -3
- package/dist/utils/cli-logger.cjs +1 -1
- package/dist/utils/cli-logger.js +2 -2
- package/eventcatalog/src/components/LatestVersionRedirect.astro +26 -0
- package/eventcatalog/src/pages/docs/services/[id]/[docType]/[docId]/index.astro +25 -0
- package/eventcatalog/src/pages/docs/services/[id]/asyncapi/[filename].astro +25 -0
- package/eventcatalog/src/pages/docs/services/[id]/changelog/index.astro +25 -0
- package/eventcatalog/src/pages/docs/services/[id]/graphql/[filename].astro +25 -0
- package/eventcatalog/src/pages/docs/services/[id]/spec/[filename].astro +25 -0
- package/eventcatalog/src/pages/docs/services/_latest-version-route.ts +42 -0
- package/eventcatalog/src/stores/sidebar-store/builders/service.ts +9 -12
- package/eventcatalog/src/stores/sidebar-store/builders/shared.ts +4 -2
- package/package.json +3 -3
- package/dist/docs/cli/import.md +0 -26
|
@@ -140,7 +140,7 @@ var verifyRequiredFieldsAreInCatalogConfigFile = async (projectDirectory) => {
|
|
|
140
140
|
var import_os = __toESM(require("os"), 1);
|
|
141
141
|
|
|
142
142
|
// package.json
|
|
143
|
-
var version = "4.3.
|
|
143
|
+
var version = "4.3.3";
|
|
144
144
|
|
|
145
145
|
// src/constants.ts
|
|
146
146
|
var VERSION = version;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-OWE74ZHY.js";
|
|
4
|
+
import "../chunk-UW52WRSH.js";
|
|
4
5
|
import "../chunk-K2XIENVT.js";
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-W4UBACYZ.js";
|
|
6
|
+
import "../chunk-PXBG5QKU.js";
|
|
7
7
|
import "../chunk-6QENHZZP.js";
|
|
8
8
|
export {
|
|
9
9
|
log_build_default as default
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
raiseEvent
|
|
3
|
+
} from "./chunk-UW52WRSH.js";
|
|
1
4
|
import {
|
|
2
5
|
countResources,
|
|
3
6
|
serializeCounts
|
|
4
7
|
} from "./chunk-K2XIENVT.js";
|
|
5
|
-
import {
|
|
6
|
-
raiseEvent
|
|
7
|
-
} from "./chunk-BYH34SOZ.js";
|
|
8
8
|
import {
|
|
9
9
|
getEventCatalogConfigFile,
|
|
10
10
|
verifyRequiredFieldsAreInCatalogConfigFile
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
|
@@ -550,6 +550,30 @@ module.exports = {
|
|
|
550
550
|
| ------ | ---- | ------- | ----------- |
|
|
551
551
|
| `chat.enabled` | `boolean` | `true` | Enables or disables the AI chat feature. Set to `false` to hide the chat UI and prevent chat requests even when all other prerequisites are met. |
|
|
552
552
|
|
|
553
|
+
### `mcp` {#mcp}
|
|
554
|
+
|
|
555
|
+
Configuration for the built-in EventCatalog MCP server.
|
|
556
|
+
|
|
557
|
+
The MCP server requires a Scale plan and `output: 'server'`. When those prerequisites are met, it is enabled by default. Set
|
|
558
|
+
`mcp.enabled` to `false` to prevent the MCP routes from being registered and hide the MCP connection actions on domain and
|
|
559
|
+
system pages.
|
|
560
|
+
|
|
561
|
+
```js title="eventcatalog.config.js"
|
|
562
|
+
module.exports = {
|
|
563
|
+
output: 'server',
|
|
564
|
+
mcp: {
|
|
565
|
+
enabled: false,
|
|
566
|
+
},
|
|
567
|
+
};
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
| Property | Type | Default | Description |
|
|
571
|
+
|---|---|---|---|
|
|
572
|
+
| `mcp.enabled` | `boolean` | `true` | Enables or disables the built-in MCP server when its SSR and Scale prerequisites are met. |
|
|
573
|
+
|
|
574
|
+
See the [MCP server guide](/docs/development/ask-your-architecture/mcp-server/getting-started) for scoped domain and system
|
|
575
|
+
endpoints, client setup, and OAuth configuration.
|
|
576
|
+
|
|
553
577
|
### `search` {#search}
|
|
554
578
|
|
|
555
579
|
<AddedIn version="3.36.0" />
|
|
@@ -19,7 +19,7 @@ import PlanBanner from '@site/src/components/MDX/PlanBanner';
|
|
|
19
19
|
|
|
20
20
|
### Quick start
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
The MCP server for your whole catalog is available at:
|
|
23
23
|
|
|
24
24
|
```
|
|
25
25
|
https://your-eventcatalog.com/docs/mcp/
|
|
@@ -31,8 +31,41 @@ For local development:
|
|
|
31
31
|
http://localhost:3000/docs/mcp/
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
### Connect to a domain or system
|
|
35
|
+
|
|
36
|
+
Domain and system pages include a **Connect to MCP server** action when the built-in MCP server is available. Select it to see
|
|
37
|
+
and copy the scoped server URL for that resource.
|
|
38
|
+
|
|
39
|
+
Scoped MCP servers expose the selected domain or system and resources reachable from it through supported catalog
|
|
40
|
+
relationships. EventCatalog follows those relationships recursively, giving the MCP client the full reachable graph without
|
|
41
|
+
including unrelated catalog resources. Scoped MCP URLs do not take a depth parameter.
|
|
42
|
+
|
|
43
|
+
| Scope | Latest version | Specific version |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| Domain | `/docs/mcp/domains/{domain-id}` | `/docs/mcp/domains/{domain-id}/{version}` |
|
|
46
|
+
| System | `/docs/mcp/systems/{system-id}` | `/docs/mcp/systems/{system-id}/{version}` |
|
|
47
|
+
|
|
48
|
+
For example:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
https://your-eventcatalog.com/docs/mcp/domains/payments
|
|
52
|
+
https://your-eventcatalog.com/docs/mcp/systems/payment-processing/1.2.0
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The unversioned URL follows the latest version of the domain or system. When you view a historical version in EventCatalog, the
|
|
56
|
+
connection action uses the versioned URL instead.
|
|
57
|
+
|
|
58
|
+
You can use a scoped URL anywhere the client examples below use the whole-catalog `/docs/mcp/` URL.
|
|
59
|
+
|
|
60
|
+
:::note Scoped tool availability
|
|
61
|
+
Scoped servers omit C4, team and user directory, custom documentation, and user-defined extended tools. System-scoped servers
|
|
62
|
+
also omit the domain-specific ubiquitous-language tool.
|
|
63
|
+
:::
|
|
64
|
+
|
|
65
|
+
### Disable the MCP server
|
|
66
|
+
|
|
67
|
+
The built-in MCP server is enabled by default when EventCatalog is running in server mode with a Scale license. To disable the
|
|
68
|
+
whole-catalog endpoint, scoped endpoints, and MCP connection actions, set `mcp.enabled` to `false`:
|
|
36
69
|
|
|
37
70
|
```js title="eventcatalog.config.js"
|
|
38
71
|
module.exports = {
|
|
@@ -50,13 +83,17 @@ Visit the endpoint in your browser to verify. It returns available tools and res
|
|
|
50
83
|
```json
|
|
51
84
|
{
|
|
52
85
|
"name": "EventCatalog MCP Server",
|
|
53
|
-
"version": "1.
|
|
86
|
+
"version": "1.2.0",
|
|
54
87
|
"status": "running",
|
|
55
88
|
"tools": ["getResources", "getResource", ...],
|
|
56
89
|
"resources": ["eventcatalog://all", "eventcatalog://events", ...]
|
|
57
90
|
}
|
|
58
91
|
```
|
|
59
92
|
|
|
93
|
+
The MCP server uses stateless Streamable HTTP. MCP protocol requests use `POST`; an ordinary browser `GET` returns the health
|
|
94
|
+
response above. A client requesting a server-sent events stream with `GET` receives `405 Method Not Allowed` because this
|
|
95
|
+
stateless server does not provide the optional SSE channel.
|
|
96
|
+
|
|
60
97
|
### Protect with OAuth
|
|
61
98
|
|
|
62
99
|
<AddedIn version="3.40.0" />
|
|
@@ -65,6 +102,10 @@ The built-in MCP server can be protected with OAuth Bearer tokens, following the
|
|
|
65
102
|
|
|
66
103
|
EventCatalog acts as the OAuth protected resource server for `/docs/mcp`. Your identity provider or authorization server remains responsible for user login, consent, client registration, `/authorize`, `/oauth/token`, and token refresh.
|
|
67
104
|
|
|
105
|
+
The same authorization configuration protects the whole-catalog endpoint and every scoped domain and system endpoint. Configure
|
|
106
|
+
`resource` and `audience` for the catalog MCP resource at `/docs/mcp`; you do not need separate OAuth configuration for each
|
|
107
|
+
scope.
|
|
108
|
+
|
|
68
109
|
Configure MCP authorization in `eventcatalog.config.js`:
|
|
69
110
|
|
|
70
111
|
```js title="eventcatalog.config.js"
|
|
@@ -187,7 +228,7 @@ claude mcp add --transport http <name> <url>
|
|
|
187
228
|
|
|
188
229
|
## Available tools
|
|
189
230
|
|
|
190
|
-
###
|
|
231
|
+
### 19 built-in tools
|
|
191
232
|
|
|
192
233
|
- `getResources` - Get events, services, commands, queries, flows, domains
|
|
193
234
|
- `getResource` - Get a specific resource by id and version
|
|
@@ -196,25 +237,34 @@ claude mcp add --transport http <name> <url>
|
|
|
196
237
|
- `findResourcesByOwner` - Resources owned by a team or user
|
|
197
238
|
- `getProducersOfMessage` - Services that produce a message
|
|
198
239
|
- `getConsumersOfMessage` - Services that consume a message
|
|
240
|
+
- `getC4Diagram` - Get the source for a C4 diagram
|
|
199
241
|
- `analyzeChangeImpact` - Impact of changing a message
|
|
200
242
|
- `explainBusinessFlow` - Detailed flow information
|
|
201
243
|
- `getTeams` / `getTeam` - Query teams
|
|
202
244
|
- `getUsers` / `getUser` - Query users
|
|
203
245
|
- `findMessageBySchemaId` - Find messages by schema identifiers
|
|
204
246
|
- `explainUbiquitousLanguageTerms` - DDD ubiquitous language from domains
|
|
247
|
+
- `getCustomDocs` - List and search custom documentation pages
|
|
248
|
+
- `searchCustomDocs` - Full-text search custom documentation
|
|
249
|
+
- `getCustomDoc` - Get a custom documentation page or section
|
|
205
250
|
|
|
206
251
|
[See full API documentation →](/docs/development/ask-your-architecture/mcp-server/getting-started)
|
|
207
252
|
|
|
208
|
-
###
|
|
253
|
+
### 17 resources
|
|
209
254
|
|
|
210
255
|
- `eventcatalog://all` - All resources
|
|
211
256
|
- `eventcatalog://events` - All events
|
|
212
257
|
- `eventcatalog://commands` - All commands
|
|
213
258
|
- `eventcatalog://queries` - All queries
|
|
259
|
+
- `eventcatalog://agents` - All agents
|
|
260
|
+
- `eventcatalog://adrs` - All architecture decision records
|
|
214
261
|
- `eventcatalog://services` - All services
|
|
262
|
+
- `eventcatalog://systems` - All systems
|
|
215
263
|
- `eventcatalog://channels` - All channels
|
|
264
|
+
- `eventcatalog://entities` - All entities
|
|
216
265
|
- `eventcatalog://diagrams` - All diagrams
|
|
217
266
|
- `eventcatalog://containers` - All containers
|
|
267
|
+
- `eventcatalog://data-products` - All data products
|
|
218
268
|
- `eventcatalog://domains` - All domains
|
|
219
269
|
- `eventcatalog://flows` - All flows
|
|
220
270
|
- `eventcatalog://teams` - All teams
|
|
@@ -296,4 +346,3 @@ See [instructions on the GitHub repository](https://github.com/event-catalog/mcp
|
|
|
296
346
|
|
|
297
347
|
|
|
298
348
|
|
|
299
|
-
|
|
@@ -13,11 +13,16 @@ import PlanBanner from '@site/src/components/MDX/PlanBanner';
|
|
|
13
13
|
|
|
14
14
|
<PlanBanner plan="Scale" />
|
|
15
15
|
|
|
16
|
-
EventCatalog exposes
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
EventCatalog exposes a built-in MCP server that lets AI agents and other MCP clients query your architecture catalog. Its
|
|
17
|
+
built-in tools can find resources, inspect schemas and ownership, follow message producers and consumers, and analyze change
|
|
18
|
+
impact.
|
|
19
19
|
|
|
20
|
+
You can connect a client to the whole catalog, or limit it to the graph of a particular domain or system. Scoped connections
|
|
21
|
+
give an agent the selected resource and resources recursively reachable through its supported relationships, without exposing
|
|
22
|
+
unrelated parts of the catalog.
|
|
20
23
|
|
|
24
|
+
On a domain or system page, select **Connect to MCP server** to copy the appropriate scoped server URL. EventCatalog uses the
|
|
25
|
+
unversioned URL for the latest resource version and includes the version when you are viewing historical documentation.
|
|
21
26
|
|
|
22
27
|
|
|
23
28
|
|
|
@@ -47,12 +47,4 @@ This will output one directory
|
|
|
47
47
|
|
|
48
48
|
You will need to deploy your EventCatalog to a server that can run Node.js.
|
|
49
49
|
|
|
50
|
-
The easiest way to do this is to use [a docker container](/docs/development/deployment/hosting-options#hosting-static-website-with-docker).
|
|
51
|
-
|
|
52
|
-
## Loading indicator
|
|
53
|
-
|
|
54
|
-
<AddedIn version="4.2.5" />
|
|
55
|
-
|
|
56
|
-
Server-side rendering means a page's render time depends on your server, so navigations can occasionally take longer than a static build.
|
|
57
|
-
|
|
58
|
-
EventCatalog shows a thin progress bar at the top of the page during navigations that take longer than 200ms, so the catalog never looks unresponsive. It works automatically and needs no configuration.
|
|
50
|
+
The easiest way to do this is to use [a docker container](/docs/development/deployment/hosting-options#hosting-static-website-with-docker).
|
|
@@ -105,7 +105,7 @@ Content-Type: application/yaml
|
|
|
105
105
|
|
|
106
106
|
### MCP server entry
|
|
107
107
|
|
|
108
|
-
When the EventCatalog MCP server is enabled, an additional entry pointing at `/docs/mcp` is appended to the linkset. This lets MCP-aware agents discover the catalog's machine interface alongside its API specifications.
|
|
108
|
+
When the EventCatalog MCP server is enabled, an additional entry pointing at `/docs/mcp` is appended to the linkset. This lets MCP-aware agents discover the catalog's machine interface alongside its API specifications. The entry is omitted when `mcp.enabled` is set to `false`.
|
|
109
109
|
|
|
110
110
|
### What is included
|
|
111
111
|
|
|
@@ -10,6 +10,7 @@ description: Learn how versioning works for EventCatalog resources.
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
import ProjectTree from '@site/src/components/MDX/ProjectTree';
|
|
13
|
+
import AddedIn from '@site/src/components/MDX/AddedIn';
|
|
13
14
|
|
|
14
15
|
EventCatalog resources can be versioned when you want to preserve how a resource looked at a point in time.
|
|
15
16
|
|
|
@@ -110,6 +111,20 @@ For example:
|
|
|
110
111
|
|
|
111
112
|
This lets users compare the current resource with previous versions when they need historical context.
|
|
112
113
|
|
|
114
|
+
### Stable URLs for the latest version
|
|
115
|
+
|
|
116
|
+
<AddedIn version="4.3.3" />
|
|
117
|
+
|
|
118
|
+
For services, the URLs for the latest version and its sub-pages (changelog, specifications, and attached documentation) stay versionless and never change as the service is versioned up.
|
|
119
|
+
|
|
120
|
+
| Page | URL |
|
|
121
|
+
|------|-----|
|
|
122
|
+
| Overview | `/docs/services/Orders` |
|
|
123
|
+
| Changelog | `/docs/services/Orders/changelog` |
|
|
124
|
+
| OpenAPI spec | `/docs/services/Orders/spec/openapi` |
|
|
125
|
+
|
|
126
|
+
Share these links freely. When `Orders` moves from `1.0.0` to `2.0.0`, the versionless URLs keep resolving to whatever is latest, so the link never rots. Historical versions keep their versioned URLs, for example `/docs/services/Orders/1.0.0/changelog`.
|
|
127
|
+
|
|
113
128
|
## Referencing versions
|
|
114
129
|
|
|
115
130
|
When one resource references another resource, you can include a `version` field when you want to point to a specific version.
|
|
@@ -88,27 +88,28 @@ This tells EventCatalog that `order.customerId` references the `customer.custome
|
|
|
88
88
|
|
|
89
89
|
## Reference a whole entity
|
|
90
90
|
|
|
91
|
-
Use `referenceTarget: entity` when
|
|
91
|
+
Use `referenceTarget: entity` when a property relates to the referenced entity as a whole rather than one of its properties.
|
|
92
92
|
|
|
93
|
-
```yaml
|
|
93
|
+
```yaml title="/entities/order/index.mdx"
|
|
94
94
|
properties:
|
|
95
95
|
- name: customer
|
|
96
|
-
type:
|
|
96
|
+
type: Customer
|
|
97
97
|
references: customer
|
|
98
98
|
referenceTarget: entity
|
|
99
99
|
relationType: placedBy
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
This renders the relationship against the `Customer` entity header. Existing relationships that omit `referenceTarget` continue to use property-level targeting.
|
|
102
|
+
This renders the relationship against the `Customer` entity header in entity maps. Existing relationships that omit `referenceTarget` continue to use property-level targeting.
|
|
103
103
|
|
|
104
104
|
## Model embedded objects
|
|
105
105
|
|
|
106
|
-
Use nested `properties` for a value object that only
|
|
106
|
+
Use nested `properties` for a value object that exists only as part of its parent entity. Property definitions are recursive, so embedded objects can contain other embedded objects.
|
|
107
107
|
|
|
108
|
-
```yaml
|
|
108
|
+
```yaml title="/entities/order/index.mdx"
|
|
109
109
|
properties:
|
|
110
110
|
- name: deliveryAddress
|
|
111
111
|
type: object
|
|
112
|
+
required: true
|
|
112
113
|
properties:
|
|
113
114
|
- name: line1
|
|
114
115
|
type: string
|
|
@@ -116,8 +117,26 @@ properties:
|
|
|
116
117
|
- name: city
|
|
117
118
|
type: string
|
|
118
119
|
required: true
|
|
120
|
+
- name: coordinates
|
|
121
|
+
type: object
|
|
122
|
+
properties:
|
|
123
|
+
- name: latitude
|
|
124
|
+
type: number
|
|
125
|
+
- name: longitude
|
|
126
|
+
type: number
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Embedded objects are owned by their parent entity. They have no entity id and cannot be referenced independently elsewhere in the catalog.
|
|
130
|
+
|
|
131
|
+
### Model arrays of embedded objects
|
|
132
|
+
|
|
133
|
+
Define nested `properties` inside `items` when an array contains embedded objects.
|
|
134
|
+
|
|
135
|
+
```yaml title="/entities/order/index.mdx"
|
|
136
|
+
properties:
|
|
119
137
|
- name: adjustments
|
|
120
138
|
type: array
|
|
139
|
+
description: Discounts and credits applied to the order.
|
|
121
140
|
items:
|
|
122
141
|
type: object
|
|
123
142
|
properties:
|
|
@@ -125,6 +144,7 @@ properties:
|
|
|
125
144
|
type: string
|
|
126
145
|
- name: amount
|
|
127
146
|
type: decimal
|
|
147
|
+
required: true
|
|
128
148
|
```
|
|
129
149
|
|
|
130
150
|
Embedded properties appear inside their parent entity rather than as separate nodes in entity maps.
|
|
@@ -17,6 +17,8 @@ When entities are assigned to a domain or service, EventCatalog can create an en
|
|
|
17
17
|
- Entities referenced from outside the current resource.
|
|
18
18
|
- Which entities are owned by the current domain or service context.
|
|
19
19
|
|
|
20
|
+
Entity properties that contain embedded objects can be expanded directly in the map. Relationships configured with `referenceTarget: entity` connect to the entity header, while existing property-level relationships continue to connect to the referenced identifier or property.
|
|
21
|
+
|
|
20
22
|

|
|
21
23
|
|
|
22
24
|
## Open an entity map in the visualizer
|
|
@@ -96,6 +96,27 @@ properties:
|
|
|
96
96
|
- pending
|
|
97
97
|
- confirmed
|
|
98
98
|
- cancelled
|
|
99
|
+
# Delivery address captured as part of the order.
|
|
100
|
+
- name: deliveryAddress
|
|
101
|
+
type: object
|
|
102
|
+
required: true
|
|
103
|
+
properties:
|
|
104
|
+
- name: line1
|
|
105
|
+
type: string
|
|
106
|
+
required: true
|
|
107
|
+
- name: city
|
|
108
|
+
type: string
|
|
109
|
+
required: true
|
|
110
|
+
# Discounts and credits embedded in the order.
|
|
111
|
+
- name: adjustments
|
|
112
|
+
type: array
|
|
113
|
+
items:
|
|
114
|
+
type: object
|
|
115
|
+
properties:
|
|
116
|
+
- name: description
|
|
117
|
+
type: string
|
|
118
|
+
- name: amount
|
|
119
|
+
type: decimal
|
|
99
120
|
---
|
|
100
121
|
```
|
|
101
122
|
|
|
@@ -264,7 +285,9 @@ attachments:
|
|
|
264
285
|
| `properties` | `array` | Nested properties for an embedded object. |
|
|
265
286
|
| `items` | `object` | Item type and optional nested properties for array properties. |
|
|
266
287
|
|
|
267
|
-
Property definitions are recursive
|
|
288
|
+
Property definitions are recursive. Embedded objects and arrays of embedded objects can contain their own `properties`. Embedded objects belong to their parent entity and are not independently referenceable catalog resources.
|
|
289
|
+
|
|
290
|
+
Use `referenceTarget: entity` with `references` when a relationship should connect to the referenced entity as a whole. If `referenceTarget` is omitted, EventCatalog targets `referencesIdentifier`, the referenced entity's `identifier`, or its first property.
|
|
268
291
|
|
|
269
292
|
## EntityPropertiesTable component
|
|
270
293
|
|
|
@@ -274,7 +297,7 @@ Use `<EntityPropertiesTable />` in the entity Markdown body to render the entity
|
|
|
274
297
|
<EntityPropertiesTable />
|
|
275
298
|
```
|
|
276
299
|
|
|
277
|
-
This is useful when you want the documentation page to show the same properties defined in frontmatter.
|
|
300
|
+
This is useful when you want the documentation page to show the same properties defined in frontmatter. Embedded properties are displayed beneath their parent property, and references identify whether they target a whole entity or one of its properties.
|
|
278
301
|
|
|
279
302
|
## Custom properties
|
|
280
303
|
|
|
@@ -8,6 +8,8 @@ title: Version services
|
|
|
8
8
|
description: Learn how to version services
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
+
import AddedIn from '@site/src/components/MDX/AddedIn';
|
|
12
|
+
|
|
11
13
|
All content in EventCatalog can be versioned. This allows you to keep historic versions of content which can give context to users why things are changing.
|
|
12
14
|
|
|
13
15
|
## How to version a service
|
|
@@ -57,6 +57,7 @@ Each service in the `services` array requires the following properties:
|
|
|
57
57
|
| `messages.id.separator` | string | `-` | The separator to use between the prefix and the message id. _(Added in v4.5.1)_ [(Read more)](/docs/plugins/asyncapi/plugin-configuration#adding-prefix-to-all-messages) |
|
|
58
58
|
| `messages.id.prefixWithServiceId` | boolean | | If true, the service id will be added to the id of the messages that are generated. For example a message with the id `orderPlaced` and the service id `orders-service` will be `orders-service-orderPlaced`. _(Added in v4.5.1)_ [(Read more)](/docs/plugins/asyncapi/plugin-configuration#adding-prefix-to-all-messages) |
|
|
59
59
|
| `messages.id.lowerCase` | boolean | false | If true, the message id will be stored in lowercase and the folder will also be lowercased. (e.g `/events/orderplaced/index.mdx) _(Added in v5.0.0)_ |
|
|
60
|
+
| `preserveExistingMessages` | boolean | `true` | Preserve existing message Markdown when the generator runs again. Set to `false` to replace existing Markdown with content generated from the AsyncAPI specification and `messages.generateMarkdown` template. Referenced and external messages are never overwritten. |
|
|
60
61
|
| `saveParsedSpecFile` | boolean | `false` | Parse and save expanded AsyncAPI spec (helpful for files with $refs) |
|
|
61
62
|
| `parseSchemas` | boolean | `true` | If you choose to parse your specification file using the [saveParsedSpecFile](#saveparsedspecfile-saveparsedspecfile) field, you can also opt in or out to have your ,message schemas parsed using the `parseSchemas` field. By default message schemas are parsed, if you want to keep your original schemas you have to set `parseSchemas` to false. | | `parseChannels` | boolean | `false` | Parse and save channels. If you set to true the AsyncAPI channels will also be documented in the catalog. |
|
|
62
63
|
| `parseChannels` | boolean | `false` | When setting the value to true the generator will parse and write channels to your EventCatalog. |
|
|
@@ -66,6 +67,35 @@ Each service in the `services` array requires the following properties:
|
|
|
66
67
|
| `parseExamples` | boolean | `true` | Parse message examples from AsyncAPI files and write each payload as a `.json` file to the message's `examples` folder. Named examples use `{name}.json`; unnamed examples fall back to `example-{index}.json`. Set to `false` to disable. _(Added in v6.1.0)_ [(Read more)](/docs/plugins/asyncapi/features#parse-message-examples) |
|
|
67
68
|
| `debug` | boolean | `false` | Enable debug mode |
|
|
68
69
|
|
|
70
|
+
## Regenerating existing message Markdown
|
|
71
|
+
|
|
72
|
+
<AddedIn version="7.0.1" pkg="@eventcatalog/generator-asyncapi" url="https://github.com/event-catalog/generators/releases/tag/v"/>
|
|
73
|
+
|
|
74
|
+
By default, the generator preserves the Markdown already stored for an existing message. This allows you to manually enrich generated message pages without losing those changes the next time the generator runs.
|
|
75
|
+
|
|
76
|
+
Set `preserveExistingMessages` to `false` when your AsyncAPI specification or `messages.generateMarkdown` template should be the source of truth:
|
|
77
|
+
|
|
78
|
+
```js title="eventcatalog.config.js"
|
|
79
|
+
export default {
|
|
80
|
+
generators: [
|
|
81
|
+
[
|
|
82
|
+
'@eventcatalog/generator-asyncapi',
|
|
83
|
+
{
|
|
84
|
+
preserveExistingMessages: false,
|
|
85
|
+
services: [
|
|
86
|
+
{
|
|
87
|
+
path: './asyncapi.yml',
|
|
88
|
+
id: 'orders-service',
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
],
|
|
94
|
+
};
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
This option only controls message Markdown. Message metadata and schemas can still be updated, while existing badges and attachments are preserved. A service that only references or receives an existing message cannot overwrite the message, even when `preserveExistingMessages` is `false`.
|
|
98
|
+
|
|
69
99
|
## Example Configuration
|
|
70
100
|
|
|
71
101
|
```js title="eventcatalog.config.js"
|
|
@@ -308,5 +338,3 @@ or refer to the [AsyncAPI examples on GitHub](https://github.com/event-catalog/g
|
|
|
308
338
|
|
|
309
339
|
|
|
310
340
|
|
|
311
|
-
|
|
312
|
-
|