@asyncapi/cli 1.2.9 → 1.2.12

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 (34) hide show
  1. package/assets/create-glee-app/templates/default/asyncapi.yaml +14 -12
  2. package/assets/create-glee-app/templates/default/package-lock.json +57 -57
  3. package/assets/create-glee-app/templates/default/package.json +1 -1
  4. package/assets/examples/adeo-kafka-request-reply-asyncapi.yml +288 -0
  5. package/assets/examples/anyof-asyncapi.yml +36 -0
  6. package/assets/examples/{application-headers.yml → application-headers-asyncapi.yml} +29 -26
  7. package/assets/examples/{correlation-id.yml → correlation-id-asyncapi.yml} +80 -44
  8. package/assets/examples/examples.json +28 -16
  9. package/assets/examples/gitter-streaming-asyncapi.yml +178 -0
  10. package/assets/examples/kraken-websocket-request-reply-message-filter-in-reply-asyncapi.yml +388 -0
  11. package/assets/examples/kraken-websocket-request-reply-multiple-channels-asyncapi.yml +394 -0
  12. package/assets/examples/mercure-asyncapi.yml +58 -0
  13. package/assets/examples/not-asyncapi.yml +29 -0
  14. package/assets/examples/oneof-asyncapi.yml +57 -0
  15. package/assets/examples/{operation-security.yml → operation-security-asyncapi.yml} +32 -21
  16. package/assets/examples/{rpc-client.yml → rpc-client-asyncapi.yml} +41 -38
  17. package/assets/examples/{rpc-server.yml → rpc-server-asyncapi.yml} +38 -35
  18. package/assets/examples/{simple.yml → simple-asyncapi.yml} +13 -5
  19. package/assets/examples/{slack-rtm.yml → slack-rtm-asyncapi.yml} +207 -109
  20. package/assets/examples/streetlights-kafka-asyncapi.yml +199 -0
  21. package/assets/examples/streetlights-mqtt-asyncapi.yml +253 -0
  22. package/assets/examples/streetlights-operation-security-asyncapi.yml +240 -0
  23. package/assets/examples/websocket-gemini-asyncapi.yml +301 -0
  24. package/oclif.manifest.json +3 -3
  25. package/package.json +5 -5
  26. package/assets/examples/anyof.yml +0 -31
  27. package/assets/examples/gitter-streaming.yml +0 -168
  28. package/assets/examples/mercure.yml +0 -49
  29. package/assets/examples/not.yml +0 -24
  30. package/assets/examples/oneof.yml +0 -46
  31. package/assets/examples/streetlights-kafka.yml +0 -188
  32. package/assets/examples/streetlights-mqtt.yml +0 -216
  33. package/assets/examples/streetlights-operation-security.yml +0 -212
  34. package/assets/examples/websocket-gemini.yml +0 -209
@@ -1,23 +1,25 @@
1
- asyncapi: 2.6.0
1
+ asyncapi: 3.0.0
2
2
  info:
3
- title: Hello, Glee!
3
+ title: 'Hello, Glee!'
4
4
  version: 0.1.0
5
-
6
5
  servers:
7
6
  websockets:
8
- url: ws://0.0.0.0:3000
7
+ host: '0.0.0.0:3000'
9
8
  protocol: ws
10
-
11
9
  channels:
12
10
  hello:
13
- publish:
14
- operationId: onHello
15
- message:
11
+ address: hello
12
+ messages:
13
+ hello:
16
14
  $ref: '#/components/messages/hello'
17
- subscribe:
18
- message:
19
- $ref: '#/components/messages/hello'
20
-
15
+ operations:
16
+ onHello:
17
+ action: receive
18
+ channel:
19
+ $ref: '#/channels/hello'
20
+ reply:
21
+ channel:
22
+ $ref: '#/channels/hello'
21
23
  components:
22
24
  messages:
23
25
  hello:
@@ -9,7 +9,7 @@
9
9
  "version": "0.1.0",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
- "@asyncapi/glee": "^0.32.5"
12
+ "@asyncapi/glee": "^0.32.8"
13
13
  },
14
14
  "devDependencies": {
15
15
  "@types/node": "^20.5.9"
@@ -153,12 +153,12 @@
153
153
  }
154
154
  },
155
155
  "node_modules/@asyncapi/generator": {
156
- "version": "1.15.3",
157
- "resolved": "https://registry.npmjs.org/@asyncapi/generator/-/generator-1.15.3.tgz",
158
- "integrity": "sha512-TqCVs27oxqEM6TLTBqnUqYCto3jefCWsO9PsHNVZ7UcXjQeT77scZhGZnAaTrbT28FHO3nOYufUBeaZBwiMf4w==",
156
+ "version": "1.15.5",
157
+ "resolved": "https://registry.npmjs.org/@asyncapi/generator/-/generator-1.15.5.tgz",
158
+ "integrity": "sha512-Z3HfgtcbnPvLimj4i+b8jcTNTMViYC4W2PWQQ/+2QoUBQV5r/yowLpoVUT2ZeEUee9Ol/fwDTg9DE8jkd7tIyg==",
159
159
  "dependencies": {
160
- "@asyncapi/generator-react-sdk": "^1.0.3",
161
- "@asyncapi/parser": "^3.0.0",
160
+ "@asyncapi/generator-react-sdk": "^1.0.4",
161
+ "@asyncapi/parser": "^3.0.1",
162
162
  "@npmcli/arborist": "^2.2.4",
163
163
  "@smoya/multi-parser": "^5.0.0",
164
164
  "ajv": "^8.12.0",
@@ -192,11 +192,11 @@
192
192
  }
193
193
  },
194
194
  "node_modules/@asyncapi/generator-react-sdk": {
195
- "version": "1.0.3",
196
- "resolved": "https://registry.npmjs.org/@asyncapi/generator-react-sdk/-/generator-react-sdk-1.0.3.tgz",
197
- "integrity": "sha512-JqOz7CkyrBpk/6+e5NtvmH4cVVg6DAUaiRBI1UZkzECdWjKNrqrd1DLY0WLlwNw3M0MPtwJ8L/JMzVz9bsaLSQ==",
195
+ "version": "1.0.4",
196
+ "resolved": "https://registry.npmjs.org/@asyncapi/generator-react-sdk/-/generator-react-sdk-1.0.4.tgz",
197
+ "integrity": "sha512-QiXCBFQL6GXoIyzekNbhGQ0WfeERWSklYR0WS/wycip2SjjP+17+7nIHgROGkx4dVARYURAQsIi/BNFbziIBtQ==",
198
198
  "dependencies": {
199
- "@asyncapi/parser": "^3.0.0",
199
+ "@asyncapi/parser": "^3.0.1",
200
200
  "@babel/core": "7.12.9",
201
201
  "@babel/preset-env": "^7.12.7",
202
202
  "@babel/preset-react": "^7.12.7",
@@ -280,11 +280,11 @@
280
280
  "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
281
281
  },
282
282
  "node_modules/@asyncapi/glee": {
283
- "version": "0.32.5",
284
- "resolved": "https://registry.npmjs.org/@asyncapi/glee/-/glee-0.32.5.tgz",
285
- "integrity": "sha512-QI4aipBq/pZFVHOaJtJ+FqKaM5VeHWq7z4npXxwDoMPjiQpkf95ysU1LtFR4ERPbPoXeBreK3sWRjJn4eXpKvw==",
283
+ "version": "0.32.8",
284
+ "resolved": "https://registry.npmjs.org/@asyncapi/glee/-/glee-0.32.8.tgz",
285
+ "integrity": "sha512-a4el3pmf9pmoh8neBLEmMPVzdi2e7T8kQzQuNDJVQKiSS9tR99UH+kmTkdlw7NRAF1Vq3JEgu+kJB3xwXKcAFQ==",
286
286
  "dependencies": {
287
- "@asyncapi/generator": "^1.15.3",
287
+ "@asyncapi/generator": "^1.15.5",
288
288
  "@asyncapi/html-template": "^2.0.0",
289
289
  "@asyncapi/markdown-template": "^1.5.0",
290
290
  "@asyncapi/parser": "^3.0.0",
@@ -474,11 +474,11 @@
474
474
  }
475
475
  },
476
476
  "node_modules/@asyncapi/parser": {
477
- "version": "3.0.0",
478
- "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.0.tgz",
479
- "integrity": "sha512-DvPAt4pk7V4D5rTGTrMKOfqRQ1qTzf5CuGecFW+mxAIuKd8XyTT5kPPKTbDnAdFAVk1l7YjPIySE7t9xLaEjKw==",
477
+ "version": "3.0.1",
478
+ "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.1.tgz",
479
+ "integrity": "sha512-LtRVjbswpqW7TlSqnGVdFm1da3DV1sqQz07ZG6xqzpR2A2pkn16+5Fk+OhuAggZ0atXNLSYfYSuKp8t3iKvrKA==",
480
480
  "dependencies": {
481
- "@asyncapi/specs": "^6.0.0",
481
+ "@asyncapi/specs": "^6.1.0",
482
482
  "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0",
483
483
  "@stoplight/json": "^3.20.2",
484
484
  "@stoplight/json-ref-readers": "^1.2.2",
@@ -700,11 +700,11 @@
700
700
  }
701
701
  },
702
702
  "node_modules/@asyncapi/raml-dt-schema-parser": {
703
- "version": "4.0.7",
704
- "resolved": "https://registry.npmjs.org/@asyncapi/raml-dt-schema-parser/-/raml-dt-schema-parser-4.0.7.tgz",
705
- "integrity": "sha512-4x68RHTLw8REHqIBP51fSkQ6H2D4zFboG0pHWFKkAF3G0OfuXhfNDEAsjGGWZLQVqJbMmxC7sha6qam1IkwB2A==",
703
+ "version": "4.0.8",
704
+ "resolved": "https://registry.npmjs.org/@asyncapi/raml-dt-schema-parser/-/raml-dt-schema-parser-4.0.8.tgz",
705
+ "integrity": "sha512-+CNL0pfvd7QpaHyiBNoql1VN6Mzxym+63DgypHmTaheD+Yh7BFoLSdb4ZAqVjCU91ofOsNZF9oyGeOhwMa5Vlg==",
706
706
  "dependencies": {
707
- "@asyncapi/parser": "^3.0.0",
707
+ "@asyncapi/parser": "^3.0.1",
708
708
  "js-yaml": "^4.1.0",
709
709
  "ramldt2jsonschema": "^1.2.3",
710
710
  "webapi-parser": "^0.5.0"
@@ -742,9 +742,9 @@
742
742
  }
743
743
  },
744
744
  "node_modules/@asyncapi/specs": {
745
- "version": "6.0.0",
746
- "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-6.0.0.tgz",
747
- "integrity": "sha512-/HikjNcrTR/OgZmXWHYkdLdoJQUm80zcM5dnr1dx2R92WRmMQ0wweEJyFXCZwwyzoRkPHMD3RU4h3ppM8pYHRQ==",
745
+ "version": "6.1.0",
746
+ "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-6.1.0.tgz",
747
+ "integrity": "sha512-RXWktqwnErkZmPppT7FWQ8njoULKrB6ERUZUWT0+PdrQ1ti+VvyiCS3RvhdgE2r612VPP9NIh05tJgBCv6LgoQ==",
748
748
  "dependencies": {
749
749
  "@types/json-schema": "^7.0.11"
750
750
  }
@@ -9304,11 +9304,11 @@
9304
9304
  },
9305
9305
  "node_modules/parserapiv3": {
9306
9306
  "name": "@asyncapi/parser",
9307
- "version": "3.0.0",
9308
- "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.0.tgz",
9309
- "integrity": "sha512-DvPAt4pk7V4D5rTGTrMKOfqRQ1qTzf5CuGecFW+mxAIuKd8XyTT5kPPKTbDnAdFAVk1l7YjPIySE7t9xLaEjKw==",
9307
+ "version": "3.0.1",
9308
+ "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.1.tgz",
9309
+ "integrity": "sha512-LtRVjbswpqW7TlSqnGVdFm1da3DV1sqQz07ZG6xqzpR2A2pkn16+5Fk+OhuAggZ0atXNLSYfYSuKp8t3iKvrKA==",
9310
9310
  "dependencies": {
9311
- "@asyncapi/specs": "^6.0.0",
9311
+ "@asyncapi/specs": "^6.1.0",
9312
9312
  "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0",
9313
9313
  "@stoplight/json": "^3.20.2",
9314
9314
  "@stoplight/json-ref-readers": "^1.2.2",
@@ -12383,12 +12383,12 @@
12383
12383
  }
12384
12384
  },
12385
12385
  "@asyncapi/generator": {
12386
- "version": "1.15.3",
12387
- "resolved": "https://registry.npmjs.org/@asyncapi/generator/-/generator-1.15.3.tgz",
12388
- "integrity": "sha512-TqCVs27oxqEM6TLTBqnUqYCto3jefCWsO9PsHNVZ7UcXjQeT77scZhGZnAaTrbT28FHO3nOYufUBeaZBwiMf4w==",
12386
+ "version": "1.15.5",
12387
+ "resolved": "https://registry.npmjs.org/@asyncapi/generator/-/generator-1.15.5.tgz",
12388
+ "integrity": "sha512-Z3HfgtcbnPvLimj4i+b8jcTNTMViYC4W2PWQQ/+2QoUBQV5r/yowLpoVUT2ZeEUee9Ol/fwDTg9DE8jkd7tIyg==",
12389
12389
  "requires": {
12390
- "@asyncapi/generator-react-sdk": "^1.0.3",
12391
- "@asyncapi/parser": "^3.0.0",
12390
+ "@asyncapi/generator-react-sdk": "^1.0.4",
12391
+ "@asyncapi/parser": "^3.0.1",
12392
12392
  "@npmcli/arborist": "^2.2.4",
12393
12393
  "@smoya/multi-parser": "^5.0.0",
12394
12394
  "ajv": "^8.12.0",
@@ -12432,11 +12432,11 @@
12432
12432
  }
12433
12433
  },
12434
12434
  "@asyncapi/generator-react-sdk": {
12435
- "version": "1.0.3",
12436
- "resolved": "https://registry.npmjs.org/@asyncapi/generator-react-sdk/-/generator-react-sdk-1.0.3.tgz",
12437
- "integrity": "sha512-JqOz7CkyrBpk/6+e5NtvmH4cVVg6DAUaiRBI1UZkzECdWjKNrqrd1DLY0WLlwNw3M0MPtwJ8L/JMzVz9bsaLSQ==",
12435
+ "version": "1.0.4",
12436
+ "resolved": "https://registry.npmjs.org/@asyncapi/generator-react-sdk/-/generator-react-sdk-1.0.4.tgz",
12437
+ "integrity": "sha512-QiXCBFQL6GXoIyzekNbhGQ0WfeERWSklYR0WS/wycip2SjjP+17+7nIHgROGkx4dVARYURAQsIi/BNFbziIBtQ==",
12438
12438
  "requires": {
12439
- "@asyncapi/parser": "^3.0.0",
12439
+ "@asyncapi/parser": "^3.0.1",
12440
12440
  "@babel/core": "7.12.9",
12441
12441
  "@babel/preset-env": "^7.12.7",
12442
12442
  "@babel/preset-react": "^7.12.7",
@@ -12489,11 +12489,11 @@
12489
12489
  }
12490
12490
  },
12491
12491
  "@asyncapi/glee": {
12492
- "version": "0.32.5",
12493
- "resolved": "https://registry.npmjs.org/@asyncapi/glee/-/glee-0.32.5.tgz",
12494
- "integrity": "sha512-QI4aipBq/pZFVHOaJtJ+FqKaM5VeHWq7z4npXxwDoMPjiQpkf95ysU1LtFR4ERPbPoXeBreK3sWRjJn4eXpKvw==",
12492
+ "version": "0.32.8",
12493
+ "resolved": "https://registry.npmjs.org/@asyncapi/glee/-/glee-0.32.8.tgz",
12494
+ "integrity": "sha512-a4el3pmf9pmoh8neBLEmMPVzdi2e7T8kQzQuNDJVQKiSS9tR99UH+kmTkdlw7NRAF1Vq3JEgu+kJB3xwXKcAFQ==",
12495
12495
  "requires": {
12496
- "@asyncapi/generator": "^1.15.3",
12496
+ "@asyncapi/generator": "^1.15.5",
12497
12497
  "@asyncapi/html-template": "^2.0.0",
12498
12498
  "@asyncapi/markdown-template": "^1.5.0",
12499
12499
  "@asyncapi/parser": "^3.0.0",
@@ -12659,11 +12659,11 @@
12659
12659
  }
12660
12660
  },
12661
12661
  "@asyncapi/parser": {
12662
- "version": "3.0.0",
12663
- "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.0.tgz",
12664
- "integrity": "sha512-DvPAt4pk7V4D5rTGTrMKOfqRQ1qTzf5CuGecFW+mxAIuKd8XyTT5kPPKTbDnAdFAVk1l7YjPIySE7t9xLaEjKw==",
12662
+ "version": "3.0.1",
12663
+ "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.1.tgz",
12664
+ "integrity": "sha512-LtRVjbswpqW7TlSqnGVdFm1da3DV1sqQz07ZG6xqzpR2A2pkn16+5Fk+OhuAggZ0atXNLSYfYSuKp8t3iKvrKA==",
12665
12665
  "requires": {
12666
- "@asyncapi/specs": "^6.0.0",
12666
+ "@asyncapi/specs": "^6.1.0",
12667
12667
  "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0",
12668
12668
  "@stoplight/json": "^3.20.2",
12669
12669
  "@stoplight/json-ref-readers": "^1.2.2",
@@ -12849,11 +12849,11 @@
12849
12849
  }
12850
12850
  },
12851
12851
  "@asyncapi/raml-dt-schema-parser": {
12852
- "version": "4.0.7",
12853
- "resolved": "https://registry.npmjs.org/@asyncapi/raml-dt-schema-parser/-/raml-dt-schema-parser-4.0.7.tgz",
12854
- "integrity": "sha512-4x68RHTLw8REHqIBP51fSkQ6H2D4zFboG0pHWFKkAF3G0OfuXhfNDEAsjGGWZLQVqJbMmxC7sha6qam1IkwB2A==",
12852
+ "version": "4.0.8",
12853
+ "resolved": "https://registry.npmjs.org/@asyncapi/raml-dt-schema-parser/-/raml-dt-schema-parser-4.0.8.tgz",
12854
+ "integrity": "sha512-+CNL0pfvd7QpaHyiBNoql1VN6Mzxym+63DgypHmTaheD+Yh7BFoLSdb4ZAqVjCU91ofOsNZF9oyGeOhwMa5Vlg==",
12855
12855
  "requires": {
12856
- "@asyncapi/parser": "^3.0.0",
12856
+ "@asyncapi/parser": "^3.0.1",
12857
12857
  "js-yaml": "^4.1.0",
12858
12858
  "ramldt2jsonschema": "^1.2.3",
12859
12859
  "webapi-parser": "^0.5.0"
@@ -12886,9 +12886,9 @@
12886
12886
  }
12887
12887
  },
12888
12888
  "@asyncapi/specs": {
12889
- "version": "6.0.0",
12890
- "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-6.0.0.tgz",
12891
- "integrity": "sha512-/HikjNcrTR/OgZmXWHYkdLdoJQUm80zcM5dnr1dx2R92WRmMQ0wweEJyFXCZwwyzoRkPHMD3RU4h3ppM8pYHRQ==",
12889
+ "version": "6.1.0",
12890
+ "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-6.1.0.tgz",
12891
+ "integrity": "sha512-RXWktqwnErkZmPppT7FWQ8njoULKrB6ERUZUWT0+PdrQ1ti+VvyiCS3RvhdgE2r612VPP9NIh05tJgBCv6LgoQ==",
12892
12892
  "requires": {
12893
12893
  "@types/json-schema": "^7.0.11"
12894
12894
  }
@@ -19203,11 +19203,11 @@
19203
19203
  }
19204
19204
  },
19205
19205
  "parserapiv3": {
19206
- "version": "npm:@asyncapi/parser@3.0.0",
19207
- "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.0.tgz",
19208
- "integrity": "sha512-DvPAt4pk7V4D5rTGTrMKOfqRQ1qTzf5CuGecFW+mxAIuKd8XyTT5kPPKTbDnAdFAVk1l7YjPIySE7t9xLaEjKw==",
19206
+ "version": "npm:@asyncapi/parser@3.0.1",
19207
+ "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.1.tgz",
19208
+ "integrity": "sha512-LtRVjbswpqW7TlSqnGVdFm1da3DV1sqQz07ZG6xqzpR2A2pkn16+5Fk+OhuAggZ0atXNLSYfYSuKp8t3iKvrKA==",
19209
19209
  "requires": {
19210
- "@asyncapi/specs": "^6.0.0",
19210
+ "@asyncapi/specs": "^6.1.0",
19211
19211
  "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0",
19212
19212
  "@stoplight/json": "^3.20.2",
19213
19213
  "@stoplight/json-ref-readers": "^1.2.2",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "homepage": "https://github.com/asyncapi/glee-hello-world#readme",
26
26
  "dependencies": {
27
- "@asyncapi/glee": "^0.32.5"
27
+ "@asyncapi/glee": "^0.32.8"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/node": "^20.5.9"
@@ -0,0 +1,288 @@
1
+ asyncapi: 3.0.0
2
+ info:
3
+ title: Adeo AsyncAPI Case Study
4
+ version: '%REPLACED_BY_MAVEN%'
5
+ description: >
6
+ This Adeo specification illustrates how ADEO uses AsyncAPI to document some
7
+ of their exchanges.
8
+ contact:
9
+ name: AsyncAPI Community
10
+ email: case-study@asyncapi.com
11
+ tags:
12
+ - name: costing
13
+ description: Costing channels, used by Costing clients.
14
+ servers:
15
+ production:
16
+ host: prod.url:9092
17
+ protocol: kafka
18
+ description: Kafka PRODUCTION cluster
19
+ security:
20
+ - $ref: '#/components/securitySchemes/sasl-ssl'
21
+ bindings:
22
+ kafka:
23
+ schemaRegistryUrl: https://schema-registry.prod.url/
24
+ staging:
25
+ host: staging.url:9092
26
+ protocol: kafka
27
+ description: Kafka STAGING cluster for `uat` and `preprod` environments
28
+ security:
29
+ - $ref: '#/components/securitySchemes/sasl-ssl'
30
+ bindings:
31
+ kafka:
32
+ schemaRegistryUrl: https://schema-registry.prod.url/
33
+ dev:
34
+ host: dev.url:9092
35
+ protocol: kafka
36
+ description: Kafka DEV cluster for `dev` and `sit` environments
37
+ security:
38
+ - $ref: '#/components/securitySchemes/sasl-ssl'
39
+ bindings:
40
+ kafka:
41
+ schemaRegistryUrl: https://schema-registry.prod.url/
42
+ channels:
43
+ costingRequestChannel:
44
+ address: adeo-{env}-case-study-COSTING-REQUEST-{version}
45
+ description: >
46
+ Use this topic to do a Costing Request to Costing product. We use the
47
+ [**RecordNameStrategy**](https://docs.confluent.io/platform/current/schema-registry/serdes-develop/index.html#subject-name-strategy)
48
+ to infer the messages schema. You have to define
49
+ `value.subject.name.strategy` to
50
+ `io.confluent.kafka.serializers.subject.RecordNameStrategy` in your
51
+ producer to use the schema we manage. The schema below illustrates how
52
+ Costing Request messages are handled.
53
+ ![](https://user-images.githubusercontent.com/5501911/188920831-689cec5f-8dc3-460b-8794-0b54ec8b0ac8.png)
54
+ parameters:
55
+ env:
56
+ $ref: '#/components/parameters/Env'
57
+ version:
58
+ $ref: '#/components/parameters/Version'
59
+ bindings:
60
+ kafka:
61
+ replicas: 3
62
+ partitions: 3
63
+ topicConfiguration:
64
+ cleanup.policy:
65
+ - delete
66
+ retention.ms: 60000000
67
+ messages:
68
+ CostingRequest:
69
+ $ref: '#/components/messages/costingRequestV1'
70
+ costingResponseChannel:
71
+ address: null
72
+ description: >
73
+ This topic is used to REPLY Costing Requests and is targeted by the
74
+ `REPLY_TOPIC` header. **You must grant PUBLISH access to our `svc-ccr-app`
75
+ service account.**. We use the
76
+ [**RecordNameStrategy**](https://docs.confluent.io/platform/current/schema-registry/serdes-develop/index.html#subject-name-strategy)
77
+ to infer the messages schema.
78
+
79
+ Topic should follow pattern "adeo-{env}-case-study-COSTING-RESPONSE-{version}"
80
+
81
+ You have to define
82
+ `key.subject.name.strategy` and `value.subject.name.strategy` to
83
+ `io.confluent.kafka.serializers.subject.RecordNameStrategy` in your
84
+ consumer. The schema below illustrates how Costing Response messages are
85
+ handled.
86
+ ![](https://user-images.githubusercontent.com/5501911/188920831-689cec5f-8dc3-460b-8794-0b54ec8b0ac8.png)
87
+
88
+ bindings:
89
+ kafka:
90
+ x-key.subject.name.strategy:
91
+ type: string
92
+ description: >
93
+ We use the RecordNameStrategy to infer the messages schema. Use
94
+ `key.subject.name.strategy=io.confluent.kafka.serializers.subject.RecordNameStrategy`
95
+ in your consumer configuration.
96
+ x-value.subject.name.strategy:
97
+ type: string
98
+ description: >
99
+ We use the RecordNameStrategy to infer the messages schema. Use
100
+ `value.subject.name.strategy=io.confluent.kafka.serializers.subject.RecordNameStrategy`
101
+ in your consumer configuration.
102
+ tags:
103
+ - name: costing
104
+ messages:
105
+ costingResponse:
106
+ $ref: '#/components/messages/costingResponse'
107
+ operations:
108
+ receiveACostingRequest:
109
+ action: receive
110
+ channel:
111
+ $ref: '#/channels/costingRequestChannel'
112
+ reply:
113
+ channel:
114
+ $ref: '#/channels/costingResponseChannel'
115
+ address:
116
+ location: $message.header#/REPLY_TOPIC
117
+ summary: |
118
+ [COSTING] Request one or more Costing calculation for any product
119
+ description: >
120
+ You can try a costing request using our [Conduktor producer
121
+ template](https://conduktor.url/)
122
+ tags:
123
+ - name: costing
124
+ bindings:
125
+ kafka:
126
+ groupId:
127
+ type: string
128
+ description: >
129
+ The groupId must be prefixed by your `svc` account, deliver by the
130
+ Adeo Kafka team. This `svc` must have the write access to the topic.
131
+ x-value.subject.name.strategy:
132
+ type: string
133
+ description: >
134
+ We use the RecordNameStrategy to infer the messages schema. Use
135
+ `value.subject.name.strategy=io.confluent.kafka.serializers.subject.RecordNameStrategy`
136
+ in your producer configuration.
137
+
138
+ components:
139
+ correlationIds:
140
+ costingCorrelationId:
141
+ description: >
142
+ This correlation ID is used for message tracing and messages
143
+ correlation. This correlation ID is generated at runtime based on the
144
+ `REQUEST_ID` and sent to the RESPONSE message.
145
+ location: $message.header#/REQUEST_ID
146
+ messages:
147
+ costingRequestV1:
148
+ name: CostingRequestV1
149
+ title: Costing Request V1
150
+ summary: Costing Request V1 inputs.
151
+ tags:
152
+ - name: costing
153
+ correlationId:
154
+ $ref: '#/components/correlationIds/costingCorrelationId'
155
+ headers:
156
+ type: object
157
+ required:
158
+ - REQUESTER_ID
159
+ - REQUESTER_CODE
160
+ - REQUEST_ID
161
+ - REPLY_TOPIC
162
+ properties:
163
+ REQUEST_ID:
164
+ $ref: '#/components/schemas/RequestId'
165
+ REPLY_TOPIC:
166
+ $ref: '#/components/schemas/ReplyTopic'
167
+ REQUESTER_ID:
168
+ $ref: '#/components/schemas/RequesterId'
169
+ REQUESTER_CODE:
170
+ $ref: '#/components/schemas/RequesterCode'
171
+ payload:
172
+ schemaFormat: application/vnd.apache.avro;version=1.9.0
173
+ schema:
174
+ $ref: https://www.asyncapi.com/resources/casestudies/adeo/CostingRequestPayload.avsc
175
+ costingResponse:
176
+ name: CostingResponse
177
+ title: Costing Response
178
+ summary: Costing Response ouputs.
179
+ tags:
180
+ - name: costing
181
+ description: >
182
+ Please refer to the `CostingResponseKey.avsc` schema, available on [our
183
+ github project](https://github.url/).
184
+ correlationId:
185
+ $ref: '#/components/correlationIds/costingCorrelationId'
186
+ headers:
187
+ type: object
188
+ properties:
189
+ CALCULATION_ID:
190
+ $ref: '#/components/schemas/MessageId'
191
+ CORRELATION_ID:
192
+ $ref: '#/components/schemas/CorrelationId'
193
+ REQUEST_TIMESTAMP:
194
+ type: string
195
+ format: date-time
196
+ description: Timestamp of the costing request
197
+ CALCULATION_TIMESTAMP:
198
+ type: string
199
+ format: date-time
200
+ description: Technical timestamp for the costing calculation
201
+ payload:
202
+ schemaFormat: application/vnd.apache.avro;version=1.9.0
203
+ schema:
204
+ $ref: https://www.asyncapi.com/resources/casestudies/adeo/CostingResponsePayload.avsc
205
+ schemas:
206
+ RequesterId:
207
+ type: string
208
+ description: The Costing requester service account used to produce costing request.
209
+ example: svc-ecollect-app
210
+ RequesterCode:
211
+ type: string
212
+ description: >-
213
+ The Costing requester code (generally the BU Code). The requester code
214
+ is useful to get the dedicated context (tenant).
215
+ example: 1
216
+ MessageId:
217
+ type: string
218
+ format: uuid
219
+ description: A unique Message ID.
220
+ example: 1fa6ef40-8f47-40a8-8cf6-f8607d0066ef
221
+ RequestId:
222
+ type: string
223
+ format: uuid
224
+ description: >-
225
+ A unique Request ID needed to define a `CORRELATION_ID` for exchanges,
226
+ which will be sent back in the Costing Responses.
227
+ example: 1fa6ef40-8f47-40a8-8cf6-f8607d0066ef
228
+ CorrelationId:
229
+ type: string
230
+ format: uuid
231
+ description: >-
232
+ A unique Correlation ID defined from the `REQUEST_ID` or the
233
+ `MESSAGE_ID` provided in the Costing Request.
234
+ example: 1fa6ef40-8f47-40a8-8cf6-f8607d0066ef
235
+ BuCode:
236
+ type: string
237
+ description: The Business Unit code for which data are applicable.
238
+ example: 1
239
+ ReplyTopic:
240
+ type: string
241
+ description: >
242
+ The Kafka topic where to send the Costing Response. This is required for
243
+ the [Return Address EIP
244
+ pattern](https://www.enterpriseintegrationpatterns.com/patterns/messaging/ReturnAddress.html).
245
+ **You must grant WRITE access to our `svc-ccr-app` service account.**
246
+ example: adeo-case-study-COSTING-RESPONSE-V1
247
+ ErrorStep:
248
+ type: string
249
+ description: |
250
+ The woker that has thrown the error.
251
+ example: EXPOSE_RESULT
252
+ ErrorMessage:
253
+ type: string
254
+ description: |
255
+ The error message describing the error.
256
+ example: Error message
257
+ ErrorCode:
258
+ type: string
259
+ description: |
260
+ The error code.
261
+ example: CURRENCY_NOT_FOUND
262
+ parameters:
263
+ Env:
264
+ description: Adeo Kafka Environement for messages publications.
265
+ enum:
266
+ - dev
267
+ - sit
268
+ - uat1
269
+ - preprod
270
+ - prod
271
+ Version:
272
+ description: the topic version you want to use
273
+ examples:
274
+ - V1
275
+ default: V1
276
+ securitySchemes:
277
+ sasl-ssl:
278
+ type: plain
279
+ x-sasl.jaas.config: >-
280
+ org.apache.kafka.common.security.plain.PlainLoginModule required
281
+ username="<CLUSTER_API_KEY>" password="<CLUSTER_API_SECRET>";
282
+ x-security.protocol: SASL_SSL
283
+ x-ssl.endpoint.identification.algorithm: https
284
+ x-sasl.mechanism: PLAIN
285
+ description: >
286
+ Use [SASL authentication with SSL
287
+ encryption](https://docs.confluent.io/platform/current/security/security_tutorial.html#configure-clients)
288
+ to connect to the ADEO Broker.
@@ -0,0 +1,36 @@
1
+ asyncapi: 3.0.0
2
+ info:
3
+ title: AnyOf example
4
+ version: 1.0.0
5
+ channels:
6
+ test:
7
+ address: test
8
+ messages:
9
+ testMessages:
10
+ $ref: '#/components/messages/testMessages'
11
+ operations:
12
+ test:
13
+ action: receive
14
+ channel:
15
+ $ref: '#/channels/test'
16
+ messages:
17
+ - $ref: '#/channels/test/messages/testMessages'
18
+ components:
19
+ messages:
20
+ testMessages:
21
+ payload:
22
+ anyOf:
23
+ - $ref: '#/components/schemas/objectWithKey'
24
+ - $ref: '#/components/schemas/objectWithKey2'
25
+ schemas:
26
+ objectWithKey:
27
+ type: object
28
+ properties:
29
+ key:
30
+ type: string
31
+ additionalProperties: false
32
+ objectWithKey2:
33
+ type: object
34
+ properties:
35
+ key2:
36
+ type: string