You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-5Lines changed: 14 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ The `@cap-js/asyncapi` package is a [CDS plugin](https://cap.cloud.sap/docs/node
14
14
15
15
## Setup
16
16
17
-
To use `cds compile to asyncapi` functionality, simply add this self-configuring plugin package to your project:
17
+
To use `cds compile --to asyncapi` functionality, simply add this self-configuring plugin package to your project:
18
18
19
19
```sh
20
20
npm add @cap-js/asyncapi
@@ -26,16 +26,25 @@ In this guide, we use the [Incidents Management reference sample app](https://gi
26
26
27
27
### 1. Usage of programatic API
28
28
29
-
await `cds.compile(<file path>).to.asyncapi()` to invoke `cds compile to asyncapi` programatically.
29
+
To invoke `cds compile --to asyncapi` programatically
30
+
31
+
```sh
32
+
await cds.compile(<filename>).to.asyncapi()
33
+
```
30
34
31
35
For more information, visit [CAPire](https://cap.cloud.sap/docs/node.js/cds-compile#to-asyncapi)
32
36
33
37
34
38
### 2. Usage from CLI
35
39
36
-
Run `cds compile <file path> -2 asyncapi` in the CLI to generate the AsyncAPI document.
40
+
Run the following command in the CLI to generate the AsyncAPI document.
41
+
42
+
```sh
43
+
cds compile <filename> --to asyncapi
44
+
```
45
+
37
46
38
-
For more information, visit [CAPire](https://cap.cloud.sap/docs/advanced/asyncapi#cli)
47
+
For more information, visit [CAPire](https://cap.cloud.sap/docs/advanced/publishing-apis/asyncapi#cli)
39
48
40
49
## Contributing
41
50
@@ -47,4 +56,4 @@ We as members, contributors, and leaders pledge to make participation in our com
47
56
48
57
## Licensing
49
58
50
-
Copyright 2024 SAP SE or an SAP affiliate company and contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool]().
59
+
Copyright 2024 SAP SE or an SAP affiliate company and contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/cap-js/asyncapi).
0 commit comments