@achinet/nestjs-async 0.2.0 → 0.3.0
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/asyncapi-document.builder.d.ts +1 -1
- package/dist/asyncapi-document.builder.js.map +1 -1
- package/dist/asyncapi.module.js +8 -5
- package/dist/asyncapi.module.js.map +1 -1
- package/dist/binding/asyncapi.kafka.interfaces.d.ts +1 -1
- package/dist/decorators/asyncapi-operation-for-meta-key.decorator.js +3 -3
- package/dist/decorators/asyncapi-operation-for-meta-key.decorator.js.map +1 -1
- package/dist/decorators/asyncapi-operation.decorator.js.map +1 -1
- package/dist/decorators/asyncapi-pub.decorator.js.map +1 -1
- package/dist/decorators/asyncapi-service.decorator.d.ts +1 -1
- package/dist/decorators/asyncapi-service.decorator.js +2 -2
- package/dist/decorators/asyncapi-service.decorator.js.map +1 -1
- package/dist/decorators/asyncapi-sub.decorator.js.map +1 -1
- package/dist/explorers/asyncapi-class.explorer.js +1 -5
- package/dist/explorers/asyncapi-class.explorer.js.map +1 -1
- package/dist/explorers/asyncapi-operation.explorer.d.ts +1 -2
- package/dist/explorers/asyncapi-operation.explorer.js +2 -2
- package/dist/explorers/asyncapi-operation.explorer.js.map +1 -1
- package/dist/interface/asyncapi-common.interfaces.d.ts +1 -1
- package/dist/interface/asyncapi-server.interface.d.ts +1 -1
- package/dist/interface/asyncapi-template-options.interface.d.ts +2 -3
- package/dist/interface/index.d.ts +0 -1
- package/dist/interface/index.js +0 -1
- package/dist/interface/index.js.map +1 -1
- package/dist/services/asyncapi.explorer.d.ts +2 -4
- package/dist/services/asyncapi.explorer.js +8 -13
- package/dist/services/asyncapi.explorer.js.map +1 -1
- package/dist/services/asyncapi.generator.d.ts +4 -3
- package/dist/services/asyncapi.generator.js +72 -17
- package/dist/services/asyncapi.generator.js.map +1 -1
- package/dist/services/asyncapi.scanner.d.ts +1 -4
- package/dist/services/asyncapi.scanner.js +10 -31
- package/dist/services/asyncapi.scanner.js.map +1 -1
- package/dist/services/asyncapi.transformer.js.map +1 -1
- package/dist/services/index.d.ts +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/index.js.map +1 -1
- package/dist/services/operation-object.factory.d.ts +2 -6
- package/dist/services/operation-object.factory.js +7 -14
- package/dist/services/operation-object.factory.js.map +1 -1
- package/dist/services/swagger-schema.factory.d.ts +6 -0
- package/dist/services/swagger-schema.factory.js +27 -0
- package/dist/services/swagger-schema.factory.js.map +1 -0
- package/dist/utils/decorator.utils.d.ts +2 -0
- package/dist/utils/decorator.utils.js +26 -0
- package/dist/utils/decorator.utils.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/{sample/felines/rto → utils}/index.js +2 -1
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/path.utils.d.ts +2 -0
- package/dist/utils/path.utils.js +8 -0
- package/dist/utils/path.utils.js.map +1 -0
- package/package.json +54 -34
- package/.prettierrc +0 -5
- package/CHANGELOG.md +0 -26
- package/dist/interface/generator-options.interface.d.ts +0 -22
- package/dist/interface/generator-options.interface.js +0 -3
- package/dist/interface/generator-options.interface.js.map +0 -1
- package/dist/sample/app.module.d.ts +0 -2
- package/dist/sample/app.module.js +0 -20
- package/dist/sample/app.module.js.map +0 -1
- package/dist/sample/common.d.ts +0 -3
- package/dist/sample/common.js +0 -40
- package/dist/sample/common.js.map +0 -1
- package/dist/sample/constants.d.ts +0 -12
- package/dist/sample/constants.js +0 -16
- package/dist/sample/constants.js.map +0 -1
- package/dist/sample/felines/class/cat.class.d.ts +0 -4
- package/dist/sample/felines/class/cat.class.js +0 -24
- package/dist/sample/felines/class/cat.class.js.map +0 -1
- package/dist/sample/felines/class/feline.class.d.ts +0 -19
- package/dist/sample/felines/class/feline.class.js +0 -20
- package/dist/sample/felines/class/feline.class.js.map +0 -1
- package/dist/sample/felines/class/index.d.ts +0 -5
- package/dist/sample/felines/class/index.js +0 -22
- package/dist/sample/felines/class/index.js.map +0 -1
- package/dist/sample/felines/class/lion.class.d.ts +0 -4
- package/dist/sample/felines/class/lion.class.js +0 -8
- package/dist/sample/felines/class/lion.class.js.map +0 -1
- package/dist/sample/felines/class/message.class.d.ts +0 -7
- package/dist/sample/felines/class/message.class.js +0 -28
- package/dist/sample/felines/class/message.class.js.map +0 -1
- package/dist/sample/felines/class/tiger.class.d.ts +0 -4
- package/dist/sample/felines/class/tiger.class.js +0 -8
- package/dist/sample/felines/class/tiger.class.js.map +0 -1
- package/dist/sample/felines/dto/create-feline.dto.d.ts +0 -4
- package/dist/sample/felines/dto/create-feline.dto.js +0 -28
- package/dist/sample/felines/dto/create-feline.dto.js.map +0 -1
- package/dist/sample/felines/dto/index.d.ts +0 -2
- package/dist/sample/felines/dto/index.js +0 -19
- package/dist/sample/felines/dto/index.js.map +0 -1
- package/dist/sample/felines/dto/journaling-data.dto.d.ts +0 -4
- package/dist/sample/felines/dto/journaling-data.dto.js +0 -8
- package/dist/sample/felines/dto/journaling-data.dto.js.map +0 -1
- package/dist/sample/felines/felines.constants.d.ts +0 -1
- package/dist/sample/felines/felines.constants.js +0 -5
- package/dist/sample/felines/felines.constants.js.map +0 -1
- package/dist/sample/felines/felines.controller.d.ts +0 -15
- package/dist/sample/felines/felines.controller.js +0 -101
- package/dist/sample/felines/felines.controller.js.map +0 -1
- package/dist/sample/felines/felines.gateway.d.ts +0 -16
- package/dist/sample/felines/felines.gateway.js +0 -90
- package/dist/sample/felines/felines.gateway.js.map +0 -1
- package/dist/sample/felines/felines.module.d.ts +0 -2
- package/dist/sample/felines/felines.module.js +0 -28
- package/dist/sample/felines/felines.module.js.map +0 -1
- package/dist/sample/felines/felines.service.d.ts +0 -8
- package/dist/sample/felines/felines.service.js +0 -33
- package/dist/sample/felines/felines.service.js.map +0 -1
- package/dist/sample/felines/rto/feline.rto.d.ts +0 -7
- package/dist/sample/felines/rto/feline.rto.js +0 -31
- package/dist/sample/felines/rto/feline.rto.js.map +0 -1
- package/dist/sample/felines/rto/index.d.ts +0 -1
- package/dist/sample/felines/rto/index.js.map +0 -1
- package/dist/sample/index.d.ts +0 -3
- package/dist/sample/index.js +0 -20
- package/dist/sample/index.js.map +0 -1
- package/dist/sample/main.d.ts +0 -1
- package/dist/sample/main.js +0 -30
- package/dist/sample/main.js.map +0 -1
- package/dist/src/asyncapi-document.builder.d.ts +0 -27
- package/dist/src/asyncapi-document.builder.js +0 -110
- package/dist/src/asyncapi-document.builder.js.map +0 -1
- package/dist/src/asyncapi.constants.d.ts +0 -6
- package/dist/src/asyncapi.constants.js +0 -11
- package/dist/src/asyncapi.constants.js.map +0 -1
- package/dist/src/asyncapi.module.d.ts +0 -8
- package/dist/src/asyncapi.module.js +0 -47
- package/dist/src/asyncapi.module.js.map +0 -1
- package/dist/src/binding/asyncapi.amqp.interfaces.d.ts +0 -38
- package/dist/src/binding/asyncapi.amqp.interfaces.js +0 -3
- package/dist/src/binding/asyncapi.amqp.interfaces.js.map +0 -1
- package/dist/src/binding/asyncapi.kafka.interfaces.d.ts +0 -21
- package/dist/src/binding/asyncapi.kafka.interfaces.js +0 -3
- package/dist/src/binding/asyncapi.kafka.interfaces.js.map +0 -1
- package/dist/src/binding/index.d.ts +0 -2
- package/dist/src/binding/index.js +0 -19
- package/dist/src/binding/index.js.map +0 -1
- package/dist/src/decorators/asyncapi-operation-for-meta-key.decorator.d.ts +0 -2
- package/dist/src/decorators/asyncapi-operation-for-meta-key.decorator.js +0 -37
- package/dist/src/decorators/asyncapi-operation-for-meta-key.decorator.js.map +0 -1
- package/dist/src/decorators/asyncapi-operation.decorator.d.ts +0 -2
- package/dist/src/decorators/asyncapi-operation.decorator.js +0 -9
- package/dist/src/decorators/asyncapi-operation.decorator.js.map +0 -1
- package/dist/src/decorators/asyncapi-pub.decorator.d.ts +0 -2
- package/dist/src/decorators/asyncapi-pub.decorator.js +0 -10
- package/dist/src/decorators/asyncapi-pub.decorator.js.map +0 -1
- package/dist/src/decorators/asyncapi-service.decorator.d.ts +0 -1
- package/dist/src/decorators/asyncapi-service.decorator.js +0 -9
- package/dist/src/decorators/asyncapi-service.decorator.js.map +0 -1
- package/dist/src/decorators/asyncapi-sub.decorator.d.ts +0 -2
- package/dist/src/decorators/asyncapi-sub.decorator.js +0 -10
- package/dist/src/decorators/asyncapi-sub.decorator.js.map +0 -1
- package/dist/src/decorators/index.d.ts +0 -4
- package/dist/src/decorators/index.js +0 -21
- package/dist/src/decorators/index.js.map +0 -1
- package/dist/src/explorers/asyncapi-class.explorer.d.ts +0 -5
- package/dist/src/explorers/asyncapi-class.explorer.js +0 -27
- package/dist/src/explorers/asyncapi-class.explorer.js.map +0 -1
- package/dist/src/explorers/asyncapi-operation.explorer.d.ts +0 -17
- package/dist/src/explorers/asyncapi-operation.explorer.js +0 -26
- package/dist/src/explorers/asyncapi-operation.explorer.js.map +0 -1
- package/dist/src/explorers/index.d.ts +0 -2
- package/dist/src/explorers/index.js +0 -19
- package/dist/src/explorers/index.js.map +0 -1
- package/dist/src/index.d.ts +0 -4
- package/dist/src/index.js +0 -21
- package/dist/src/index.js.map +0 -1
- package/dist/src/interface/asyncapi-common.interfaces.d.ts +0 -126
- package/dist/src/interface/asyncapi-common.interfaces.js +0 -3
- package/dist/src/interface/asyncapi-common.interfaces.js.map +0 -1
- package/dist/src/interface/asyncapi-document-options.interface.d.ts +0 -3
- package/dist/src/interface/asyncapi-document-options.interface.js +0 -3
- package/dist/src/interface/asyncapi-document-options.interface.js.map +0 -1
- package/dist/src/interface/asyncapi-message.interface.d.ts +0 -8
- package/dist/src/interface/asyncapi-message.interface.js +0 -3
- package/dist/src/interface/asyncapi-message.interface.js.map +0 -1
- package/dist/src/interface/asyncapi-operation-headers.interface.d.ts +0 -6
- package/dist/src/interface/asyncapi-operation-headers.interface.js +0 -3
- package/dist/src/interface/asyncapi-operation-headers.interface.js.map +0 -1
- package/dist/src/interface/asyncapi-operation-options-raw.interface.d.ts +0 -21
- package/dist/src/interface/asyncapi-operation-options-raw.interface.js +0 -3
- package/dist/src/interface/asyncapi-operation-options-raw.interface.js.map +0 -1
- package/dist/src/interface/asyncapi-operation-options.interface.d.ts +0 -8
- package/dist/src/interface/asyncapi-operation-options.interface.js +0 -3
- package/dist/src/interface/asyncapi-operation-options.interface.js.map +0 -1
- package/dist/src/interface/asyncapi-operation-payload.interface.d.ts +0 -2
- package/dist/src/interface/asyncapi-operation-payload.interface.js +0 -3
- package/dist/src/interface/asyncapi-operation-payload.interface.js.map +0 -1
- package/dist/src/interface/asyncapi-server.interface.d.ts +0 -10
- package/dist/src/interface/asyncapi-server.interface.js +0 -3
- package/dist/src/interface/asyncapi-server.interface.js.map +0 -1
- package/dist/src/interface/asyncapi-template-options.interface.d.ts +0 -7
- package/dist/src/interface/asyncapi-template-options.interface.js +0 -3
- package/dist/src/interface/asyncapi-template-options.interface.js.map +0 -1
- package/dist/src/interface/denormalized-doc-resolvers.interface.d.ts +0 -6
- package/dist/src/interface/denormalized-doc-resolvers.interface.js +0 -3
- package/dist/src/interface/denormalized-doc-resolvers.interface.js.map +0 -1
- package/dist/src/interface/denormalized-doc.interface.d.ts +0 -10
- package/dist/src/interface/denormalized-doc.interface.js +0 -3
- package/dist/src/interface/denormalized-doc.interface.js.map +0 -1
- package/dist/src/interface/generator-options.interface.d.ts +0 -22
- package/dist/src/interface/generator-options.interface.js +0 -3
- package/dist/src/interface/generator-options.interface.js.map +0 -1
- package/dist/src/interface/index.d.ts +0 -11
- package/dist/src/interface/index.js +0 -28
- package/dist/src/interface/index.js.map +0 -1
- package/dist/src/services/asyncapi.explorer.d.ts +0 -12
- package/dist/src/services/asyncapi.explorer.js +0 -69
- package/dist/src/services/asyncapi.explorer.js.map +0 -1
- package/dist/src/services/asyncapi.generator.d.ts +0 -6
- package/dist/src/services/asyncapi.generator.js +0 -68
- package/dist/src/services/asyncapi.generator.js.map +0 -1
- package/dist/src/services/asyncapi.scanner.d.ts +0 -14
- package/dist/src/services/asyncapi.scanner.js +0 -71
- package/dist/src/services/asyncapi.scanner.js.map +0 -1
- package/dist/src/services/asyncapi.transformer.d.ts +0 -4
- package/dist/src/services/asyncapi.transformer.js +0 -33
- package/dist/src/services/asyncapi.transformer.js.map +0 -1
- package/dist/src/services/index.d.ts +0 -4
- package/dist/src/services/index.js +0 -21
- package/dist/src/services/index.js.map +0 -1
- package/dist/src/services/operation-object.factory.d.ts +0 -9
- package/dist/src/services/operation-object.factory.js +0 -37
- package/dist/src/services/operation-object.factory.js.map +0 -1
- package/dist/test/configs/jest-base.config.d.ts +0 -3
- package/dist/test/configs/jest-base.config.js +0 -20
- package/dist/test/configs/jest-base.config.js.map +0 -1
- package/dist/test/configs/jest-e2e.config.d.ts +0 -3
- package/dist/test/configs/jest-e2e.config.js +0 -16
- package/dist/test/configs/jest-e2e.config.js.map +0 -1
- package/dist/test/express.e2e-spec.d.ts +0 -1
- package/dist/test/express.e2e-spec.js +0 -89
- package/dist/test/express.e2e-spec.js.map +0 -1
- package/dist/test/fastify.e2e-spec.d.ts +0 -1
- package/dist/test/fastify.e2e-spec.js +0 -57
- package/dist/test/fastify.e2e-spec.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/eslint.config.mjs +0 -21
- package/misc/references/ref.html +0 -303
- package/misc/references/ref.json +0 -1
- package/misc/references/ref.yaml +0 -292
- package/misc/take-snaphots.sh +0 -8
- package/sample/app.module.ts +0 -7
- package/sample/common.ts +0 -49
- package/sample/constants.ts +0 -12
- package/sample/felines/class/cat.class.ts +0 -9
- package/sample/felines/class/feline.class.ts +0 -29
- package/sample/felines/class/index.ts +0 -5
- package/sample/felines/class/lion.class.ts +0 -5
- package/sample/felines/class/message.class.ts +0 -17
- package/sample/felines/class/tiger.class.ts +0 -5
- package/sample/felines/dto/create-feline.dto.ts +0 -13
- package/sample/felines/dto/index.ts +0 -2
- package/sample/felines/dto/journaling-data.dto.ts +0 -5
- package/sample/felines/felines.constants.ts +0 -1
- package/sample/felines/felines.controller.ts +0 -76
- package/sample/felines/felines.gateway.ts +0 -76
- package/sample/felines/felines.module.ts +0 -15
- package/sample/felines/felines.service.ts +0 -24
- package/sample/felines/rto/feline.rto.ts +0 -17
- package/sample/felines/rto/index.ts +0 -1
- package/sample/index.ts +0 -3
- package/sample/main.ts +0 -34
- package/src/asyncapi-document.builder.ts +0 -172
- package/src/asyncapi.constants.ts +0 -8
- package/src/asyncapi.module.ts +0 -65
- package/src/binding/asyncapi.amqp.interfaces.ts +0 -48
- package/src/binding/asyncapi.kafka.interfaces.ts +0 -35
- package/src/binding/index.ts +0 -2
- package/src/decorators/asyncapi-operation-for-meta-key.decorator.ts +0 -58
- package/src/decorators/asyncapi-operation.decorator.ts +0 -7
- package/src/decorators/asyncapi-pub.decorator.ts +0 -11
- package/src/decorators/asyncapi-service.decorator.ts +0 -9
- package/src/decorators/asyncapi-sub.decorator.ts +0 -11
- package/src/decorators/index.ts +0 -4
- package/src/explorers/asyncapi-class.explorer.ts +0 -26
- package/src/explorers/asyncapi-operation.explorer.ts +0 -40
- package/src/explorers/index.ts +0 -2
- package/src/index.ts +0 -4
- package/src/interface/asyncapi-common.interfaces.ts +0 -169
- package/src/interface/asyncapi-document-options.interface.ts +0 -3
- package/src/interface/asyncapi-message.interface.ts +0 -10
- package/src/interface/asyncapi-operation-headers.interface.ts +0 -6
- package/src/interface/asyncapi-operation-options-raw.interface.ts +0 -23
- package/src/interface/asyncapi-operation-options.interface.ts +0 -10
- package/src/interface/asyncapi-operation-payload.interface.ts +0 -3
- package/src/interface/asyncapi-server.interface.ts +0 -11
- package/src/interface/asyncapi-template-options.interface.ts +0 -20
- package/src/interface/denormalized-doc-resolvers.interface.ts +0 -6
- package/src/interface/denormalized-doc.interface.ts +0 -6
- package/src/interface/generator-options.interface.ts +0 -21
- package/src/interface/index.ts +0 -12
- package/src/services/asyncapi.explorer.ts +0 -112
- package/src/services/asyncapi.generator.ts +0 -45
- package/src/services/asyncapi.scanner.ts +0 -105
- package/src/services/asyncapi.transformer.ts +0 -33
- package/src/services/index.ts +0 -4
- package/src/services/operation-object.factory.ts +0 -55
- package/test/__mocks__/@asyncapi/generator.js +0 -41
- package/test/configs/jest-base.config.ts +0 -19
- package/test/configs/jest-e2e.config.js +0 -7
- package/test/configs/jest-e2e.config.ts +0 -19
- package/test/configs/jest-swagger-plugin.js +0 -16
- package/test/express.e2e-spec.ts +0 -64
- package/test/fastify.e2e-spec.ts +0 -65
- package/tsconfig.build.json +0 -4
- package/tsconfig.json +0 -8
package/eslint.config.mjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
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
|
-
];
|
package/misc/references/ref.html
DELETED
|
@@ -1,303 +0,0 @@
|
|
|
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: >-
|
|
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>
|
package/misc/references/ref.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}}}}}
|
package/misc/references/ref.yaml
DELETED
|
@@ -1,292 +0,0 @@
|
|
|
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
|
package/misc/take-snaphots.sh
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
|
package/sample/app.module.ts
DELETED
package/sample/common.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { INestApplicationContext } from '@nestjs/common';
|
|
2
|
-
import { HOST, PORT, SERVER } from './constants';
|
|
3
|
-
import { Cat, Feline, Lion, Tiger } from './felines/class';
|
|
4
|
-
import { FelinesModule } from './felines/felines.module';
|
|
5
|
-
import {
|
|
6
|
-
AsyncApiDocument,
|
|
7
|
-
AsyncApiDocumentBuilder,
|
|
8
|
-
AsyncApiModule,
|
|
9
|
-
AsyncServerObject,
|
|
10
|
-
} from '../src';
|
|
11
|
-
|
|
12
|
-
export async function makeAsyncapiDocument(
|
|
13
|
-
app: INestApplicationContext,
|
|
14
|
-
): Promise<AsyncApiDocument> {
|
|
15
|
-
const asyncApiServer: AsyncServerObject = {
|
|
16
|
-
url: `ws://${HOST}:${PORT}`,
|
|
17
|
-
protocol: 'socket.io',
|
|
18
|
-
protocolVersion: '4',
|
|
19
|
-
description:
|
|
20
|
-
'Allows you to connect using the websocket protocol to our Socket.io server.',
|
|
21
|
-
security: [{ 'user-password': [] }],
|
|
22
|
-
variables: {
|
|
23
|
-
port: {
|
|
24
|
-
description: 'Secure connection (TLS) is available through port 443.',
|
|
25
|
-
default: '443',
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
bindings: {},
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const servers = Object.keys(SERVER).map((i) => ({
|
|
32
|
-
name: SERVER[i],
|
|
33
|
-
server: asyncApiServer,
|
|
34
|
-
}));
|
|
35
|
-
|
|
36
|
-
const asyncApiOptions = new AsyncApiDocumentBuilder()
|
|
37
|
-
.setTitle('Feline')
|
|
38
|
-
.setDescription('Feline server description here')
|
|
39
|
-
.setVersion('1.0')
|
|
40
|
-
.setDefaultContentType('application/json')
|
|
41
|
-
.addSecurity('user-password', { type: 'userPassword' })
|
|
42
|
-
.addServers(servers)
|
|
43
|
-
.build();
|
|
44
|
-
|
|
45
|
-
return AsyncApiModule.createDocument(app, asyncApiOptions, {
|
|
46
|
-
include: [FelinesModule],
|
|
47
|
-
extraModels: [Cat, Lion, Tiger, Feline],
|
|
48
|
-
});
|
|
49
|
-
}
|