@achinet/nestjs-async 0.0.1 → 0.1.1

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 (248) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/decorators/asyncapi-operation-for-meta-key.decorator.js +1 -2
  3. package/dist/decorators/asyncapi-operation-for-meta-key.decorator.js.map +1 -1
  4. package/dist/decorators/asyncapi-operation.decorator.js +1 -2
  5. package/dist/decorators/asyncapi-operation.decorator.js.map +1 -1
  6. package/dist/decorators/asyncapi-pub.decorator.js +1 -2
  7. package/dist/decorators/asyncapi-pub.decorator.js.map +1 -1
  8. package/dist/decorators/asyncapi-service.decorator.js +1 -2
  9. package/dist/decorators/asyncapi-service.decorator.js.map +1 -1
  10. package/dist/decorators/asyncapi-sub.decorator.js +1 -2
  11. package/dist/decorators/asyncapi-sub.decorator.js.map +1 -1
  12. package/dist/explorers/asyncapi-operation.explorer.d.ts +8 -8
  13. package/dist/sample/app.module.d.ts +2 -0
  14. package/dist/sample/app.module.js +20 -0
  15. package/dist/sample/app.module.js.map +1 -0
  16. package/dist/sample/common.d.ts +3 -0
  17. package/dist/sample/common.js +40 -0
  18. package/dist/sample/common.js.map +1 -0
  19. package/dist/sample/constants.d.ts +12 -0
  20. package/dist/sample/constants.js +16 -0
  21. package/dist/sample/constants.js.map +1 -0
  22. package/dist/sample/felines/class/cat.class.d.ts +4 -0
  23. package/dist/sample/felines/class/cat.class.js +24 -0
  24. package/dist/sample/felines/class/cat.class.js.map +1 -0
  25. package/dist/sample/felines/class/feline.class.d.ts +19 -0
  26. package/dist/sample/felines/class/feline.class.js +20 -0
  27. package/dist/sample/felines/class/feline.class.js.map +1 -0
  28. package/dist/sample/felines/class/index.d.ts +5 -0
  29. package/dist/sample/felines/class/index.js +22 -0
  30. package/dist/sample/felines/class/index.js.map +1 -0
  31. package/dist/sample/felines/class/lion.class.d.ts +4 -0
  32. package/dist/sample/felines/class/lion.class.js +8 -0
  33. package/dist/sample/felines/class/lion.class.js.map +1 -0
  34. package/dist/sample/felines/class/message.class.d.ts +7 -0
  35. package/dist/sample/felines/class/message.class.js +28 -0
  36. package/dist/sample/felines/class/message.class.js.map +1 -0
  37. package/dist/sample/felines/class/tiger.class.d.ts +4 -0
  38. package/dist/sample/felines/class/tiger.class.js +8 -0
  39. package/dist/sample/felines/class/tiger.class.js.map +1 -0
  40. package/dist/sample/felines/dto/create-feline.dto.d.ts +4 -0
  41. package/dist/sample/felines/dto/create-feline.dto.js +28 -0
  42. package/dist/sample/felines/dto/create-feline.dto.js.map +1 -0
  43. package/dist/sample/felines/dto/index.d.ts +2 -0
  44. package/dist/sample/felines/dto/index.js +19 -0
  45. package/dist/sample/felines/dto/index.js.map +1 -0
  46. package/dist/sample/felines/dto/journaling-data.dto.d.ts +4 -0
  47. package/dist/sample/felines/dto/journaling-data.dto.js +8 -0
  48. package/dist/sample/felines/dto/journaling-data.dto.js.map +1 -0
  49. package/dist/sample/felines/felines.constants.d.ts +1 -0
  50. package/dist/sample/felines/felines.constants.js +5 -0
  51. package/dist/sample/felines/felines.constants.js.map +1 -0
  52. package/dist/sample/felines/felines.controller.d.ts +15 -0
  53. package/dist/sample/felines/felines.controller.js +101 -0
  54. package/dist/sample/felines/felines.controller.js.map +1 -0
  55. package/dist/sample/felines/felines.gateway.d.ts +16 -0
  56. package/dist/sample/felines/felines.gateway.js +90 -0
  57. package/dist/sample/felines/felines.gateway.js.map +1 -0
  58. package/dist/sample/felines/felines.module.d.ts +2 -0
  59. package/dist/sample/felines/felines.module.js +28 -0
  60. package/dist/sample/felines/felines.module.js.map +1 -0
  61. package/dist/sample/felines/felines.service.d.ts +8 -0
  62. package/dist/sample/felines/felines.service.js +33 -0
  63. package/dist/sample/felines/felines.service.js.map +1 -0
  64. package/dist/sample/felines/rto/feline.rto.d.ts +7 -0
  65. package/dist/sample/felines/rto/feline.rto.js +31 -0
  66. package/dist/sample/felines/rto/feline.rto.js.map +1 -0
  67. package/dist/sample/felines/rto/index.d.ts +1 -0
  68. package/dist/sample/felines/rto/index.js +18 -0
  69. package/dist/sample/felines/rto/index.js.map +1 -0
  70. package/dist/sample/index.d.ts +3 -0
  71. package/dist/sample/index.js +20 -0
  72. package/dist/sample/index.js.map +1 -0
  73. package/dist/sample/main.d.ts +1 -0
  74. package/dist/sample/main.js +30 -0
  75. package/dist/sample/main.js.map +1 -0
  76. package/dist/src/asyncapi-document.builder.d.ts +27 -0
  77. package/dist/src/asyncapi-document.builder.js +110 -0
  78. package/dist/src/asyncapi-document.builder.js.map +1 -0
  79. package/dist/src/asyncapi.constants.d.ts +6 -0
  80. package/dist/src/asyncapi.constants.js +11 -0
  81. package/dist/src/asyncapi.constants.js.map +1 -0
  82. package/dist/src/asyncapi.module.d.ts +8 -0
  83. package/dist/src/asyncapi.module.js +47 -0
  84. package/dist/src/asyncapi.module.js.map +1 -0
  85. package/dist/src/binding/asyncapi.amqp.interfaces.d.ts +38 -0
  86. package/dist/src/binding/asyncapi.amqp.interfaces.js +3 -0
  87. package/dist/src/binding/asyncapi.amqp.interfaces.js.map +1 -0
  88. package/dist/src/binding/asyncapi.kafka.interfaces.d.ts +21 -0
  89. package/dist/src/binding/asyncapi.kafka.interfaces.js +3 -0
  90. package/dist/src/binding/asyncapi.kafka.interfaces.js.map +1 -0
  91. package/dist/src/binding/index.d.ts +2 -0
  92. package/dist/src/binding/index.js +19 -0
  93. package/dist/src/binding/index.js.map +1 -0
  94. package/dist/src/decorators/asyncapi-operation-for-meta-key.decorator.d.ts +2 -0
  95. package/dist/src/decorators/asyncapi-operation-for-meta-key.decorator.js +37 -0
  96. package/dist/src/decorators/asyncapi-operation-for-meta-key.decorator.js.map +1 -0
  97. package/dist/src/decorators/asyncapi-operation.decorator.d.ts +2 -0
  98. package/dist/src/decorators/asyncapi-operation.decorator.js +9 -0
  99. package/dist/src/decorators/asyncapi-operation.decorator.js.map +1 -0
  100. package/dist/src/decorators/asyncapi-pub.decorator.d.ts +2 -0
  101. package/dist/src/decorators/asyncapi-pub.decorator.js +10 -0
  102. package/dist/src/decorators/asyncapi-pub.decorator.js.map +1 -0
  103. package/dist/src/decorators/asyncapi-service.decorator.d.ts +1 -0
  104. package/dist/src/decorators/asyncapi-service.decorator.js +9 -0
  105. package/dist/src/decorators/asyncapi-service.decorator.js.map +1 -0
  106. package/dist/src/decorators/asyncapi-sub.decorator.d.ts +2 -0
  107. package/dist/src/decorators/asyncapi-sub.decorator.js +10 -0
  108. package/dist/src/decorators/asyncapi-sub.decorator.js.map +1 -0
  109. package/dist/src/decorators/index.d.ts +4 -0
  110. package/dist/src/decorators/index.js +21 -0
  111. package/dist/src/decorators/index.js.map +1 -0
  112. package/dist/src/explorers/asyncapi-class.explorer.d.ts +5 -0
  113. package/dist/src/explorers/asyncapi-class.explorer.js +27 -0
  114. package/dist/src/explorers/asyncapi-class.explorer.js.map +1 -0
  115. package/dist/src/explorers/asyncapi-operation.explorer.d.ts +17 -0
  116. package/dist/src/explorers/asyncapi-operation.explorer.js +26 -0
  117. package/dist/src/explorers/asyncapi-operation.explorer.js.map +1 -0
  118. package/dist/src/explorers/index.d.ts +2 -0
  119. package/dist/src/explorers/index.js +19 -0
  120. package/dist/src/explorers/index.js.map +1 -0
  121. package/dist/src/index.d.ts +4 -0
  122. package/dist/src/index.js +21 -0
  123. package/dist/src/index.js.map +1 -0
  124. package/dist/src/interface/asyncapi-common.interfaces.d.ts +126 -0
  125. package/dist/src/interface/asyncapi-common.interfaces.js +3 -0
  126. package/dist/src/interface/asyncapi-common.interfaces.js.map +1 -0
  127. package/dist/src/interface/asyncapi-document-options.interface.d.ts +3 -0
  128. package/dist/src/interface/asyncapi-document-options.interface.js +3 -0
  129. package/dist/src/interface/asyncapi-document-options.interface.js.map +1 -0
  130. package/dist/src/interface/asyncapi-message.interface.d.ts +8 -0
  131. package/dist/src/interface/asyncapi-message.interface.js +3 -0
  132. package/dist/src/interface/asyncapi-message.interface.js.map +1 -0
  133. package/dist/src/interface/asyncapi-operation-headers.interface.d.ts +6 -0
  134. package/dist/src/interface/asyncapi-operation-headers.interface.js +3 -0
  135. package/dist/src/interface/asyncapi-operation-headers.interface.js.map +1 -0
  136. package/dist/src/interface/asyncapi-operation-options-raw.interface.d.ts +21 -0
  137. package/dist/src/interface/asyncapi-operation-options-raw.interface.js +3 -0
  138. package/dist/src/interface/asyncapi-operation-options-raw.interface.js.map +1 -0
  139. package/dist/src/interface/asyncapi-operation-options.interface.d.ts +8 -0
  140. package/dist/src/interface/asyncapi-operation-options.interface.js +3 -0
  141. package/dist/src/interface/asyncapi-operation-options.interface.js.map +1 -0
  142. package/dist/src/interface/asyncapi-operation-payload.interface.d.ts +2 -0
  143. package/dist/src/interface/asyncapi-operation-payload.interface.js +3 -0
  144. package/dist/src/interface/asyncapi-operation-payload.interface.js.map +1 -0
  145. package/dist/src/interface/asyncapi-server.interface.d.ts +10 -0
  146. package/dist/src/interface/asyncapi-server.interface.js +3 -0
  147. package/dist/src/interface/asyncapi-server.interface.js.map +1 -0
  148. package/dist/src/interface/asyncapi-template-options.interface.d.ts +7 -0
  149. package/dist/src/interface/asyncapi-template-options.interface.js +3 -0
  150. package/dist/src/interface/asyncapi-template-options.interface.js.map +1 -0
  151. package/dist/src/interface/denormalized-doc-resolvers.interface.d.ts +6 -0
  152. package/dist/src/interface/denormalized-doc-resolvers.interface.js +3 -0
  153. package/dist/src/interface/denormalized-doc-resolvers.interface.js.map +1 -0
  154. package/dist/src/interface/denormalized-doc.interface.d.ts +10 -0
  155. package/dist/src/interface/denormalized-doc.interface.js +3 -0
  156. package/dist/src/interface/denormalized-doc.interface.js.map +1 -0
  157. package/dist/src/interface/generator-options.interface.d.ts +22 -0
  158. package/dist/src/interface/generator-options.interface.js +3 -0
  159. package/dist/src/interface/generator-options.interface.js.map +1 -0
  160. package/dist/src/interface/index.d.ts +11 -0
  161. package/dist/src/interface/index.js +28 -0
  162. package/dist/src/interface/index.js.map +1 -0
  163. package/dist/src/services/asyncapi.explorer.d.ts +12 -0
  164. package/dist/src/services/asyncapi.explorer.js +69 -0
  165. package/dist/src/services/asyncapi.explorer.js.map +1 -0
  166. package/dist/src/services/asyncapi.generator.d.ts +6 -0
  167. package/dist/src/services/asyncapi.generator.js +68 -0
  168. package/dist/src/services/asyncapi.generator.js.map +1 -0
  169. package/dist/src/services/asyncapi.scanner.d.ts +14 -0
  170. package/dist/src/services/asyncapi.scanner.js +71 -0
  171. package/dist/src/services/asyncapi.scanner.js.map +1 -0
  172. package/dist/src/services/asyncapi.transformer.d.ts +4 -0
  173. package/dist/src/services/asyncapi.transformer.js +33 -0
  174. package/dist/src/services/asyncapi.transformer.js.map +1 -0
  175. package/dist/src/services/index.d.ts +4 -0
  176. package/dist/src/services/index.js +21 -0
  177. package/dist/src/services/index.js.map +1 -0
  178. package/dist/src/services/operation-object.factory.d.ts +9 -0
  179. package/dist/src/services/operation-object.factory.js +37 -0
  180. package/dist/src/services/operation-object.factory.js.map +1 -0
  181. package/dist/test/configs/jest-base.config.d.ts +3 -0
  182. package/dist/test/configs/jest-base.config.js +20 -0
  183. package/dist/test/configs/jest-base.config.js.map +1 -0
  184. package/dist/test/configs/jest-e2e.config.d.ts +3 -0
  185. package/dist/test/configs/jest-e2e.config.js +16 -0
  186. package/dist/test/configs/jest-e2e.config.js.map +1 -0
  187. package/dist/test/express.e2e-spec.d.ts +1 -0
  188. package/dist/test/express.e2e-spec.js +89 -0
  189. package/dist/test/express.e2e-spec.js.map +1 -0
  190. package/dist/test/fastify.e2e-spec.d.ts +1 -0
  191. package/dist/test/fastify.e2e-spec.js +57 -0
  192. package/dist/test/fastify.e2e-spec.js.map +1 -0
  193. package/dist/tsconfig.tsbuildinfo +1 -1
  194. package/eslint.config.mjs +21 -0
  195. package/misc/references/ref.html +303 -0
  196. package/misc/references/ref.json +1 -0
  197. package/misc/references/ref.yaml +292 -0
  198. package/misc/take-snaphots.sh +8 -0
  199. package/package.json +48 -41
  200. package/sample/app.module.ts +7 -0
  201. package/sample/common.ts +49 -0
  202. package/sample/constants.ts +12 -0
  203. package/sample/felines/class/cat.class.ts +9 -0
  204. package/sample/felines/class/feline.class.ts +29 -0
  205. package/sample/felines/class/index.ts +5 -0
  206. package/sample/felines/class/lion.class.ts +5 -0
  207. package/sample/felines/class/message.class.ts +17 -0
  208. package/sample/felines/class/tiger.class.ts +5 -0
  209. package/sample/felines/dto/create-feline.dto.ts +13 -0
  210. package/sample/felines/dto/index.ts +2 -0
  211. package/sample/felines/dto/journaling-data.dto.ts +5 -0
  212. package/sample/felines/felines.constants.ts +1 -0
  213. package/sample/felines/felines.controller.ts +76 -0
  214. package/sample/felines/felines.gateway.ts +76 -0
  215. package/sample/felines/felines.module.ts +15 -0
  216. package/sample/felines/felines.service.ts +24 -0
  217. package/sample/felines/rto/feline.rto.ts +17 -0
  218. package/sample/felines/rto/index.ts +1 -0
  219. package/sample/index.ts +3 -0
  220. package/sample/main.ts +34 -0
  221. package/src/asyncapi-document.builder.ts +5 -19
  222. package/src/asyncapi.module.ts +5 -16
  223. package/src/decorators/asyncapi-operation-for-meta-key.decorator.ts +4 -16
  224. package/src/decorators/asyncapi-operation.decorator.ts +1 -3
  225. package/src/decorators/asyncapi-pub.decorator.ts +6 -13
  226. package/src/decorators/asyncapi-sub.decorator.ts +6 -13
  227. package/src/explorers/asyncapi-class.explorer.ts +2 -6
  228. package/src/explorers/asyncapi-operation.explorer.ts +3 -12
  229. package/src/interface/asyncapi-common.interfaces.ts +1 -4
  230. package/src/interface/asyncapi-operation-options.interface.ts +2 -4
  231. package/src/interface/asyncapi-operation-payload.interface.ts +1 -5
  232. package/src/interface/asyncapi-server.interface.ts +1 -4
  233. package/src/interface/asyncapi-template-options.interface.ts +5 -5
  234. package/src/interface/denormalized-doc.interface.ts +1 -5
  235. package/src/services/asyncapi.explorer.ts +25 -34
  236. package/src/services/asyncapi.generator.ts +28 -16
  237. package/src/services/asyncapi.scanner.ts +39 -89
  238. package/src/services/asyncapi.transformer.ts +2 -8
  239. package/src/services/index.ts +0 -1
  240. package/src/services/operation-object.factory.ts +0 -1
  241. package/test/__mocks__/@asyncapi/generator.js +41 -0
  242. package/test/configs/jest-base.config.ts +19 -0
  243. package/test/configs/jest-e2e.config.js +7 -0
  244. package/test/configs/jest-e2e.config.ts +19 -0
  245. package/test/configs/jest-swagger-plugin.js +16 -0
  246. package/test/express.e2e-spec.ts +64 -0
  247. package/test/fastify.e2e-spec.ts +65 -0
  248. package/.eslintrc.js +0 -9
@@ -0,0 +1,21 @@
1
+ import sharedConfig from '@achinet/eslint-config-custom';
2
+
3
+ export default [
4
+ ...sharedConfig,
5
+ {
6
+ ignores: ['dist/**', 'node_modules/**'],
7
+ },
8
+ {
9
+ files: ['**/*.ts', '**/*.tsx'],
10
+ rules: {
11
+ 'no-restricted-syntax': 'off',
12
+ '@typescript-eslint/no-unused-vars': [
13
+ 'warn',
14
+ {
15
+ argsIgnorePattern: '^_',
16
+ varsIgnorePattern: '^_',
17
+ },
18
+ ],
19
+ },
20
+ },
21
+ ];
@@ -0,0 +1,303 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>AsyncAPI Documentation</title>
5
+ </head>
6
+ <body>
7
+ <h1>AsyncAPI Documentation</h1>
8
+ <p>Mock HTML generated for testing</p>
9
+ <pre>asyncapi: 2.5.0
10
+ info:
11
+ title: Feline
12
+ description: Feline server description here
13
+ version: '1.0'
14
+ contact: {}
15
+ tags: []
16
+ servers:
17
+ europe: &ref_0
18
+ url: ws://0.0.0.0:4001
19
+ protocol: socket.io
20
+ protocolVersion: '4'
21
+ description: &gt;-
22
+ Allows you to connect using the websocket protocol to our Socket.io
23
+ server.
24
+ security:
25
+ - user-password: []
26
+ variables:
27
+ port:
28
+ description: Secure connection (TLS) is available through port 443.
29
+ default: '443'
30
+ bindings: {}
31
+ asia: *ref_0
32
+ north-america: *ref_0
33
+ south-america: *ref_0
34
+ africa: *ref_0
35
+ australia: *ref_0
36
+ components:
37
+ securitySchemes:
38
+ user-password:
39
+ type: userPassword
40
+ schemas:
41
+ Feline:
42
+ type: object
43
+ properties:
44
+ id:
45
+ type: number
46
+ name:
47
+ type: string
48
+ age:
49
+ type: number
50
+ gender:
51
+ enum: &ref_2
52
+ - male
53
+ - female
54
+ type: string
55
+ dominantPaw:
56
+ enum: &ref_3
57
+ - left
58
+ - right
59
+ type: string
60
+ tags:
61
+ type: array
62
+ items:
63
+ type: string
64
+ birthDatetime:
65
+ format: date-time
66
+ type: string
67
+ required:
68
+ - id
69
+ - name
70
+ - age
71
+ - gender
72
+ - dominantPaw
73
+ - tags
74
+ - birthDatetime
75
+ CreateFelineDto:
76
+ type: object
77
+ properties:
78
+ correlationId:
79
+ type: string
80
+ format: uuid
81
+ version:
82
+ type: string
83
+ format: x.y.z
84
+ example: 1.0.1
85
+ payload:
86
+ oneOf:
87
+ - $ref: '#/components/schemas/Cat'
88
+ - $ref: '#/components/schemas/Lion'
89
+ - $ref: '#/components/schemas/Tiger'
90
+ allOf:
91
+ - $ref: '#/components/schemas/Feline'
92
+ timestamp:
93
+ format: date-time
94
+ type: string
95
+ required:
96
+ - correlationId
97
+ - version
98
+ - payload
99
+ - timestamp
100
+ FelineRto:
101
+ type: object
102
+ properties:
103
+ correlationId:
104
+ type: string
105
+ format: uuid
106
+ version:
107
+ type: string
108
+ format: x.y.z
109
+ example: 1.0.1
110
+ payload:
111
+ oneOf: &ref_1
112
+ - $ref: '#/components/schemas/Cat'
113
+ - $ref: '#/components/schemas/Lion'
114
+ - $ref: '#/components/schemas/Tiger'
115
+ allOf:
116
+ - $ref: '#/components/schemas/Feline'
117
+ timestamp:
118
+ format: date-time
119
+ type: string
120
+ required:
121
+ - correlationId
122
+ - version
123
+ - payload
124
+ - timestamp
125
+ FelineExtendedRto:
126
+ type: object
127
+ properties:
128
+ correlationId:
129
+ type: string
130
+ format: uuid
131
+ version:
132
+ type: string
133
+ format: x.y.z
134
+ example: 1.0.1
135
+ payload:
136
+ oneOf: *ref_1
137
+ allOf:
138
+ - $ref: '#/components/schemas/Feline'
139
+ timestamp:
140
+ format: date-time
141
+ type: string
142
+ required:
143
+ - correlationId
144
+ - version
145
+ - payload
146
+ - timestamp
147
+ JournalingDataDto:
148
+ type: object
149
+ properties:
150
+ correlationId:
151
+ type: string
152
+ format: uuid
153
+ version:
154
+ type: string
155
+ format: x.y.z
156
+ example: 1.0.1
157
+ payload:
158
+ type: object
159
+ timestamp:
160
+ format: date-time
161
+ type: string
162
+ required:
163
+ - correlationId
164
+ - version
165
+ - payload
166
+ - timestamp
167
+ Cat:
168
+ type: object
169
+ properties:
170
+ breed:
171
+ type: string
172
+ example: Maine Coon
173
+ id:
174
+ type: number
175
+ name:
176
+ type: string
177
+ age:
178
+ type: number
179
+ gender:
180
+ enum: *ref_2
181
+ type: string
182
+ dominantPaw:
183
+ enum: *ref_3
184
+ type: string
185
+ tags:
186
+ type: array
187
+ items:
188
+ type: string
189
+ birthDatetime:
190
+ format: date-time
191
+ type: string
192
+ required:
193
+ - breed
194
+ - id
195
+ - name
196
+ - age
197
+ - gender
198
+ - dominantPaw
199
+ - tags
200
+ - birthDatetime
201
+ Lion:
202
+ type: object
203
+ properties:
204
+ id:
205
+ type: number
206
+ name:
207
+ type: string
208
+ age:
209
+ type: number
210
+ gender:
211
+ enum: *ref_2
212
+ type: string
213
+ dominantPaw:
214
+ enum: *ref_3
215
+ type: string
216
+ tags:
217
+ type: array
218
+ items:
219
+ type: string
220
+ birthDatetime:
221
+ format: date-time
222
+ type: string
223
+ roarVolume:
224
+ type: number
225
+ required:
226
+ - id
227
+ - name
228
+ - age
229
+ - gender
230
+ - dominantPaw
231
+ - tags
232
+ - birthDatetime
233
+ - roarVolume
234
+ Tiger:
235
+ type: object
236
+ properties:
237
+ id:
238
+ type: number
239
+ name:
240
+ type: string
241
+ age:
242
+ type: number
243
+ gender:
244
+ enum: *ref_2
245
+ type: string
246
+ dominantPaw:
247
+ enum: *ref_3
248
+ type: string
249
+ tags:
250
+ type: array
251
+ items:
252
+ type: string
253
+ birthDatetime:
254
+ format: date-time
255
+ type: string
256
+ numberOfStripes:
257
+ type: number
258
+ required:
259
+ - id
260
+ - name
261
+ - age
262
+ - gender
263
+ - dominantPaw
264
+ - tags
265
+ - birthDatetime
266
+ - numberOfStripes
267
+ defaultContentType: application/json
268
+ channels:
269
+ ws/create/feline:
270
+ subscribe:
271
+ message:
272
+ oneOf:
273
+ - name: 'oneOf demo #1'
274
+ payload:
275
+ $ref: '#/components/schemas/FelineRto'
276
+ - name: 'oneOf demo #2'
277
+ payload:
278
+ $ref: '#/components/schemas/FelineExtendedRto'
279
+ publish:
280
+ message:
281
+ payload:
282
+ $ref: '#/components/schemas/CreateFelineDto'
283
+ name: FelinesGateway#createFeline
284
+ ms/journal:
285
+ subscribe:
286
+ message:
287
+ payload:
288
+ $ref: '#/components/schemas/JournalingDataDto'
289
+ name: FelinesController#journal
290
+ ms/create/feline:
291
+ subscribe:
292
+ message:
293
+ payload:
294
+ $ref: '#/components/schemas/FelineRto'
295
+ name: FelinesController#createFeline
296
+ publish:
297
+ message:
298
+ payload:
299
+ $ref: '#/components/schemas/CreateFelineDto'
300
+ name: FelinesController#createFeline
301
+ </pre>
302
+ </body>
303
+ </html>
@@ -0,0 +1 @@
1
+ {"asyncapi":"2.5.0","info":{"title":"Feline","description":"Feline server description here","version":"1.0","contact":{}},"tags":[],"servers":{"europe":{"url":"ws://0.0.0.0:4001","protocol":"socket.io","protocolVersion":"4","description":"Allows you to connect using the websocket protocol to our Socket.io server.","security":[{"user-password":[]}],"variables":{"port":{"description":"Secure connection (TLS) is available through port 443.","default":"443"}},"bindings":{}},"asia":{"url":"ws://0.0.0.0:4001","protocol":"socket.io","protocolVersion":"4","description":"Allows you to connect using the websocket protocol to our Socket.io server.","security":[{"user-password":[]}],"variables":{"port":{"description":"Secure connection (TLS) is available through port 443.","default":"443"}},"bindings":{}},"north-america":{"url":"ws://0.0.0.0:4001","protocol":"socket.io","protocolVersion":"4","description":"Allows you to connect using the websocket protocol to our Socket.io server.","security":[{"user-password":[]}],"variables":{"port":{"description":"Secure connection (TLS) is available through port 443.","default":"443"}},"bindings":{}},"south-america":{"url":"ws://0.0.0.0:4001","protocol":"socket.io","protocolVersion":"4","description":"Allows you to connect using the websocket protocol to our Socket.io server.","security":[{"user-password":[]}],"variables":{"port":{"description":"Secure connection (TLS) is available through port 443.","default":"443"}},"bindings":{}},"africa":{"url":"ws://0.0.0.0:4001","protocol":"socket.io","protocolVersion":"4","description":"Allows you to connect using the websocket protocol to our Socket.io server.","security":[{"user-password":[]}],"variables":{"port":{"description":"Secure connection (TLS) is available through port 443.","default":"443"}},"bindings":{}},"australia":{"url":"ws://0.0.0.0:4001","protocol":"socket.io","protocolVersion":"4","description":"Allows you to connect using the websocket protocol to our Socket.io server.","security":[{"user-password":[]}],"variables":{"port":{"description":"Secure connection (TLS) is available through port 443.","default":"443"}},"bindings":{}}},"components":{"securitySchemes":{"user-password":{"type":"userPassword"}},"schemas":{"Feline":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"age":{"type":"number"},"gender":{"enum":["male","female"],"type":"string"},"dominantPaw":{"enum":["left","right"],"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"birthDatetime":{"format":"date-time","type":"string"}},"required":["id","name","age","gender","dominantPaw","tags","birthDatetime"]},"CreateFelineDto":{"type":"object","properties":{"correlationId":{"type":"string","format":"uuid"},"version":{"type":"string","format":"x.y.z","example":"1.0.1"},"payload":{"oneOf":[{"$ref":"#/components/schemas/Cat"},{"$ref":"#/components/schemas/Lion"},{"$ref":"#/components/schemas/Tiger"}],"allOf":[{"$ref":"#/components/schemas/Feline"}]},"timestamp":{"format":"date-time","type":"string"}},"required":["correlationId","version","payload","timestamp"]},"FelineRto":{"type":"object","properties":{"correlationId":{"type":"string","format":"uuid"},"version":{"type":"string","format":"x.y.z","example":"1.0.1"},"payload":{"oneOf":[{"$ref":"#/components/schemas/Cat"},{"$ref":"#/components/schemas/Lion"},{"$ref":"#/components/schemas/Tiger"}],"allOf":[{"$ref":"#/components/schemas/Feline"}]},"timestamp":{"format":"date-time","type":"string"}},"required":["correlationId","version","payload","timestamp"]},"FelineExtendedRto":{"type":"object","properties":{"correlationId":{"type":"string","format":"uuid"},"version":{"type":"string","format":"x.y.z","example":"1.0.1"},"payload":{"oneOf":[{"$ref":"#/components/schemas/Cat"},{"$ref":"#/components/schemas/Lion"},{"$ref":"#/components/schemas/Tiger"}],"allOf":[{"$ref":"#/components/schemas/Feline"}]},"timestamp":{"format":"date-time","type":"string"}},"required":["correlationId","version","payload","timestamp"]},"JournalingDataDto":{"type":"object","properties":{"correlationId":{"type":"string","format":"uuid"},"version":{"type":"string","format":"x.y.z","example":"1.0.1"},"payload":{"type":"object"},"timestamp":{"format":"date-time","type":"string"}},"required":["correlationId","version","payload","timestamp"]},"Cat":{"type":"object","properties":{"breed":{"type":"string","example":"Maine Coon"},"id":{"type":"number"},"name":{"type":"string"},"age":{"type":"number"},"gender":{"enum":["male","female"],"type":"string"},"dominantPaw":{"enum":["left","right"],"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"birthDatetime":{"format":"date-time","type":"string"}},"required":["breed","id","name","age","gender","dominantPaw","tags","birthDatetime"]},"Lion":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"age":{"type":"number"},"gender":{"enum":["male","female"],"type":"string"},"dominantPaw":{"enum":["left","right"],"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"birthDatetime":{"format":"date-time","type":"string"},"roarVolume":{"type":"number"}},"required":["id","name","age","gender","dominantPaw","tags","birthDatetime","roarVolume"]},"Tiger":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"age":{"type":"number"},"gender":{"enum":["male","female"],"type":"string"},"dominantPaw":{"enum":["left","right"],"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"birthDatetime":{"format":"date-time","type":"string"},"numberOfStripes":{"type":"number"}},"required":["id","name","age","gender","dominantPaw","tags","birthDatetime","numberOfStripes"]}}},"defaultContentType":"application/json","channels":{"ws/create/feline":{"subscribe":{"message":{"oneOf":[{"name":"oneOf demo #1","payload":{"$ref":"#/components/schemas/FelineRto"}},{"name":"oneOf demo #2","payload":{"$ref":"#/components/schemas/FelineExtendedRto"}}]}},"publish":{"message":{"payload":{"$ref":"#/components/schemas/CreateFelineDto"},"name":"FelinesGateway#createFeline"}}},"ms/journal":{"subscribe":{"message":{"payload":{"$ref":"#/components/schemas/JournalingDataDto"},"name":"FelinesController#journal"}}},"ms/create/feline":{"subscribe":{"message":{"payload":{"$ref":"#/components/schemas/FelineRto"},"name":"FelinesController#createFeline"}},"publish":{"message":{"payload":{"$ref":"#/components/schemas/CreateFelineDto"},"name":"FelinesController#createFeline"}}}}}
@@ -0,0 +1,292 @@
1
+ asyncapi: 2.5.0
2
+ info:
3
+ title: Feline
4
+ description: Feline server description here
5
+ version: '1.0'
6
+ contact: {}
7
+ tags: []
8
+ servers:
9
+ europe: &ref_0
10
+ url: ws://0.0.0.0:4001
11
+ protocol: socket.io
12
+ protocolVersion: '4'
13
+ description: >-
14
+ Allows you to connect using the websocket protocol to our Socket.io
15
+ server.
16
+ security:
17
+ - user-password: []
18
+ variables:
19
+ port:
20
+ description: Secure connection (TLS) is available through port 443.
21
+ default: '443'
22
+ bindings: {}
23
+ asia: *ref_0
24
+ north-america: *ref_0
25
+ south-america: *ref_0
26
+ africa: *ref_0
27
+ australia: *ref_0
28
+ components:
29
+ securitySchemes:
30
+ user-password:
31
+ type: userPassword
32
+ schemas:
33
+ Feline:
34
+ type: object
35
+ properties:
36
+ id:
37
+ type: number
38
+ name:
39
+ type: string
40
+ age:
41
+ type: number
42
+ gender:
43
+ enum: &ref_2
44
+ - male
45
+ - female
46
+ type: string
47
+ dominantPaw:
48
+ enum: &ref_3
49
+ - left
50
+ - right
51
+ type: string
52
+ tags:
53
+ type: array
54
+ items:
55
+ type: string
56
+ birthDatetime:
57
+ format: date-time
58
+ type: string
59
+ required:
60
+ - id
61
+ - name
62
+ - age
63
+ - gender
64
+ - dominantPaw
65
+ - tags
66
+ - birthDatetime
67
+ CreateFelineDto:
68
+ type: object
69
+ properties:
70
+ correlationId:
71
+ type: string
72
+ format: uuid
73
+ version:
74
+ type: string
75
+ format: x.y.z
76
+ example: 1.0.1
77
+ payload:
78
+ oneOf:
79
+ - $ref: '#/components/schemas/Cat'
80
+ - $ref: '#/components/schemas/Lion'
81
+ - $ref: '#/components/schemas/Tiger'
82
+ allOf:
83
+ - $ref: '#/components/schemas/Feline'
84
+ timestamp:
85
+ format: date-time
86
+ type: string
87
+ required:
88
+ - correlationId
89
+ - version
90
+ - payload
91
+ - timestamp
92
+ FelineRto:
93
+ type: object
94
+ properties:
95
+ correlationId:
96
+ type: string
97
+ format: uuid
98
+ version:
99
+ type: string
100
+ format: x.y.z
101
+ example: 1.0.1
102
+ payload:
103
+ oneOf: &ref_1
104
+ - $ref: '#/components/schemas/Cat'
105
+ - $ref: '#/components/schemas/Lion'
106
+ - $ref: '#/components/schemas/Tiger'
107
+ allOf:
108
+ - $ref: '#/components/schemas/Feline'
109
+ timestamp:
110
+ format: date-time
111
+ type: string
112
+ required:
113
+ - correlationId
114
+ - version
115
+ - payload
116
+ - timestamp
117
+ FelineExtendedRto:
118
+ type: object
119
+ properties:
120
+ correlationId:
121
+ type: string
122
+ format: uuid
123
+ version:
124
+ type: string
125
+ format: x.y.z
126
+ example: 1.0.1
127
+ payload:
128
+ oneOf: *ref_1
129
+ allOf:
130
+ - $ref: '#/components/schemas/Feline'
131
+ timestamp:
132
+ format: date-time
133
+ type: string
134
+ required:
135
+ - correlationId
136
+ - version
137
+ - payload
138
+ - timestamp
139
+ JournalingDataDto:
140
+ type: object
141
+ properties:
142
+ correlationId:
143
+ type: string
144
+ format: uuid
145
+ version:
146
+ type: string
147
+ format: x.y.z
148
+ example: 1.0.1
149
+ payload:
150
+ type: object
151
+ timestamp:
152
+ format: date-time
153
+ type: string
154
+ required:
155
+ - correlationId
156
+ - version
157
+ - payload
158
+ - timestamp
159
+ Cat:
160
+ type: object
161
+ properties:
162
+ breed:
163
+ type: string
164
+ example: Maine Coon
165
+ id:
166
+ type: number
167
+ name:
168
+ type: string
169
+ age:
170
+ type: number
171
+ gender:
172
+ enum: *ref_2
173
+ type: string
174
+ dominantPaw:
175
+ enum: *ref_3
176
+ type: string
177
+ tags:
178
+ type: array
179
+ items:
180
+ type: string
181
+ birthDatetime:
182
+ format: date-time
183
+ type: string
184
+ required:
185
+ - breed
186
+ - id
187
+ - name
188
+ - age
189
+ - gender
190
+ - dominantPaw
191
+ - tags
192
+ - birthDatetime
193
+ Lion:
194
+ type: object
195
+ properties:
196
+ id:
197
+ type: number
198
+ name:
199
+ type: string
200
+ age:
201
+ type: number
202
+ gender:
203
+ enum: *ref_2
204
+ type: string
205
+ dominantPaw:
206
+ enum: *ref_3
207
+ type: string
208
+ tags:
209
+ type: array
210
+ items:
211
+ type: string
212
+ birthDatetime:
213
+ format: date-time
214
+ type: string
215
+ roarVolume:
216
+ type: number
217
+ required:
218
+ - id
219
+ - name
220
+ - age
221
+ - gender
222
+ - dominantPaw
223
+ - tags
224
+ - birthDatetime
225
+ - roarVolume
226
+ Tiger:
227
+ type: object
228
+ properties:
229
+ id:
230
+ type: number
231
+ name:
232
+ type: string
233
+ age:
234
+ type: number
235
+ gender:
236
+ enum: *ref_2
237
+ type: string
238
+ dominantPaw:
239
+ enum: *ref_3
240
+ type: string
241
+ tags:
242
+ type: array
243
+ items:
244
+ type: string
245
+ birthDatetime:
246
+ format: date-time
247
+ type: string
248
+ numberOfStripes:
249
+ type: number
250
+ required:
251
+ - id
252
+ - name
253
+ - age
254
+ - gender
255
+ - dominantPaw
256
+ - tags
257
+ - birthDatetime
258
+ - numberOfStripes
259
+ defaultContentType: application/json
260
+ channels:
261
+ ws/create/feline:
262
+ subscribe:
263
+ message:
264
+ oneOf:
265
+ - name: 'oneOf demo #1'
266
+ payload:
267
+ $ref: '#/components/schemas/FelineRto'
268
+ - name: 'oneOf demo #2'
269
+ payload:
270
+ $ref: '#/components/schemas/FelineExtendedRto'
271
+ publish:
272
+ message:
273
+ payload:
274
+ $ref: '#/components/schemas/CreateFelineDto'
275
+ name: FelinesGateway#createFeline
276
+ ms/journal:
277
+ subscribe:
278
+ message:
279
+ payload:
280
+ $ref: '#/components/schemas/JournalingDataDto'
281
+ name: FelinesController#journal
282
+ ms/create/feline:
283
+ subscribe:
284
+ message:
285
+ payload:
286
+ $ref: '#/components/schemas/FelineRto'
287
+ name: FelinesController#createFeline
288
+ publish:
289
+ message:
290
+ payload:
291
+ $ref: '#/components/schemas/CreateFelineDto'
292
+ name: FelinesController#createFeline
@@ -0,0 +1,8 @@
1
+ curl http://localhost:4001/async-api > misc/references/ref.html
2
+ curl http://localhost:4001/async-api > docs/live-demo/index.html
3
+ curl http://localhost:4001/async-api-json > misc/references/ref.json
4
+ curl http://localhost:4001/async-api-yaml > misc/references/ref.yaml
5
+ echo 'test snapshots were taken'
6
+
7
+
8
+