@asyncapi/converter 0.6.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.
Files changed (39) hide show
  1. package/.github/workflows/automerge-orphans.yml +63 -0
  2. package/.github/workflows/automerge.yml +47 -0
  3. package/.github/workflows/bump.yml +32 -0
  4. package/.github/workflows/if-go-pr-testing.yml +58 -0
  5. package/.github/workflows/if-nodejs-pr-testing.yml +48 -0
  6. package/.github/workflows/if-nodejs-release.yml +70 -0
  7. package/.github/workflows/if-nodejs-version-bump.yml +48 -0
  8. package/.github/workflows/issues-prs-notifications.yml +72 -0
  9. package/.github/workflows/lint-pr-title.yml +22 -0
  10. package/.github/workflows/release-announcements.yml +76 -0
  11. package/.github/workflows/sentiment-analysis.yml +44 -0
  12. package/.github/workflows/stale-issues-prs.yml +30 -0
  13. package/.github/workflows/welcome-first-time-contrib.yml +34 -0
  14. package/README.md +60 -0
  15. package/cli.js +47 -0
  16. package/lib/helpers.js +91 -0
  17. package/lib/index.js +204 -0
  18. package/package.json +70 -0
  19. package/test/index.js +194 -0
  20. package/test/input/1.0.0/streetlights.yml +120 -0
  21. package/test/input/1.1.0/streetlights.yml +120 -0
  22. package/test/input/1.2.0/gitter-streaming.yml +140 -0
  23. package/test/input/1.2.0/slack-rtm.yml +876 -0
  24. package/test/input/1.2.0/streetlights.yml +120 -0
  25. package/test/input/2.0.0/streetlights.yml +113 -0
  26. package/test/input/2.0.0-rc1/streetlights.yml +109 -0
  27. package/test/input/2.0.0-rc2/streetlights.yml +113 -0
  28. package/test/input/2.1.0/streetlights.yml +113 -0
  29. package/test/output/2.0.0/gitter-streaming.yml +137 -0
  30. package/test/output/2.0.0/slack-rtm.yml +879 -0
  31. package/test/output/2.0.0/streetlights.yml +113 -0
  32. package/test/output/2.0.0-rc1/gitter-streaming.yml +137 -0
  33. package/test/output/2.0.0-rc1/slack-rtm.yml +879 -0
  34. package/test/output/2.0.0-rc1/streetlights.yml +109 -0
  35. package/test/output/2.0.0-rc2/gitter-streaming.yml +137 -0
  36. package/test/output/2.0.0-rc2/slack-rtm.yml +879 -0
  37. package/test/output/2.0.0-rc2/streetlights.yml +113 -0
  38. package/test/output/2.1.0/streetlights.yml +113 -0
  39. package/test/output/2.2.0/streetlights.yml +113 -0
@@ -0,0 +1,113 @@
1
+ asyncapi: 2.0.0-rc2
2
+ info:
3
+ title: Streetlights API
4
+ version: 1.0.0
5
+ description: "The Smartylighting Streetlights API allows you to remotely manage the city lights.\n\n### Check out its awesome features:\n\n* Turn a specific streetlight on/off \U0001F303\n* Dim a specific streetlight \U0001F60E\n* Receive real-time information about environmental lighting conditions \U0001F4C8\n"
6
+ license:
7
+ name: Apache 2.0
8
+ url: 'https://www.apache.org/licenses/LICENSE-2.0'
9
+ servers:
10
+ default:
11
+ url: 'api.streetlights.smartylighting.com:{port}'
12
+ description: Test broker
13
+ variables:
14
+ port:
15
+ description: Secure connection (TLS) is available through port 8883.
16
+ default: '1883'
17
+ enum:
18
+ - '1883'
19
+ - '8883'
20
+ protocol: mqtt
21
+ security:
22
+ - apiKey: []
23
+ components:
24
+ messages:
25
+ lightMeasured:
26
+ summary: >-
27
+ Inform about environmental lighting conditions for a particular
28
+ streetlight.
29
+ payload:
30
+ $ref: '#/components/schemas/lightMeasuredPayload'
31
+ turnOnOff:
32
+ summary: Command a particular streetlight to turn the lights on or off.
33
+ payload:
34
+ $ref: '#/components/schemas/turnOnOffPayload'
35
+ dimLight:
36
+ summary: Command a particular streetlight to dim the lights.
37
+ payload:
38
+ $ref: '#/components/schemas/dimLightPayload'
39
+ schemas:
40
+ lightMeasuredPayload:
41
+ type: object
42
+ properties:
43
+ lumens:
44
+ type: integer
45
+ minimum: 0
46
+ description: Light intensity measured in lumens.
47
+ sentAt:
48
+ $ref: '#/components/schemas/sentAt'
49
+ turnOnOffPayload:
50
+ type: object
51
+ properties:
52
+ command:
53
+ type: string
54
+ enum:
55
+ - 'on'
56
+ - 'off'
57
+ description: Whether to turn on or off the light.
58
+ sentAt:
59
+ $ref: '#/components/schemas/sentAt'
60
+ dimLightPayload:
61
+ type: object
62
+ properties:
63
+ percentage:
64
+ type: integer
65
+ description: Percentage to which the light should be dimmed to.
66
+ minimum: 0
67
+ maximum: 100
68
+ sentAt:
69
+ $ref: '#/components/schemas/sentAt'
70
+ sentAt:
71
+ type: string
72
+ format: date-time
73
+ description: Date and time when the message was sent.
74
+ securitySchemes:
75
+ apiKey:
76
+ type: apiKey
77
+ in: user
78
+ description: Provide your API key as the user and leave the password empty.
79
+ parameters:
80
+ streetlightId:
81
+ name: streetlightId
82
+ description: The ID of the streetlight.
83
+ schema:
84
+ type: string
85
+ channels:
86
+ 'smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured':
87
+ parameters:
88
+ streetlightId:
89
+ $ref: '#/components/parameters/streetlightId'
90
+ publish:
91
+ message:
92
+ $ref: '#/components/messages/lightMeasured'
93
+ 'smartylighting/streetlights/1/0/action/{streetlightId}/turn/on':
94
+ parameters:
95
+ streetlightId:
96
+ $ref: '#/components/parameters/streetlightId'
97
+ subscribe:
98
+ message:
99
+ $ref: '#/components/messages/turnOnOff'
100
+ 'smartylighting/streetlights/1/0/action/{streetlightId}/turn/off':
101
+ parameters:
102
+ streetlightId:
103
+ $ref: '#/components/parameters/streetlightId'
104
+ subscribe:
105
+ message:
106
+ $ref: '#/components/messages/turnOnOff'
107
+ 'smartylighting/streetlights/1/0/action/{streetlightId}/dim':
108
+ parameters:
109
+ streetlightId:
110
+ $ref: '#/components/parameters/streetlightId'
111
+ subscribe:
112
+ message:
113
+ $ref: '#/components/messages/dimLight'
@@ -0,0 +1,113 @@
1
+ asyncapi: 2.1.0
2
+ info:
3
+ title: Streetlights API
4
+ version: 1.0.0
5
+ description: "The Smartylighting Streetlights API allows you to remotely manage the city lights.\n\n### Check out its awesome features:\n\n* Turn a specific streetlight on/off \U0001F303\n* Dim a specific streetlight \U0001F60E\n* Receive real-time information about environmental lighting conditions \U0001F4C8\n"
6
+ license:
7
+ name: Apache 2.0
8
+ url: 'https://www.apache.org/licenses/LICENSE-2.0'
9
+ servers:
10
+ default:
11
+ url: 'api.streetlights.smartylighting.com:{port}'
12
+ description: Test broker
13
+ variables:
14
+ port:
15
+ description: Secure connection (TLS) is available through port 8883.
16
+ default: '1883'
17
+ enum:
18
+ - '1883'
19
+ - '8883'
20
+ protocol: mqtt
21
+ security:
22
+ - apiKey: []
23
+ components:
24
+ messages:
25
+ lightMeasured:
26
+ summary: >-
27
+ Inform about environmental lighting conditions for a particular
28
+ streetlight.
29
+ payload:
30
+ $ref: '#/components/schemas/lightMeasuredPayload'
31
+ turnOnOff:
32
+ summary: Command a particular streetlight to turn the lights on or off.
33
+ payload:
34
+ $ref: '#/components/schemas/turnOnOffPayload'
35
+ dimLight:
36
+ summary: Command a particular streetlight to dim the lights.
37
+ payload:
38
+ $ref: '#/components/schemas/dimLightPayload'
39
+ schemas:
40
+ lightMeasuredPayload:
41
+ type: object
42
+ properties:
43
+ lumens:
44
+ type: integer
45
+ minimum: 0
46
+ description: Light intensity measured in lumens.
47
+ sentAt:
48
+ $ref: '#/components/schemas/sentAt'
49
+ turnOnOffPayload:
50
+ type: object
51
+ properties:
52
+ command:
53
+ type: string
54
+ enum:
55
+ - 'on'
56
+ - 'off'
57
+ description: Whether to turn on or off the light.
58
+ sentAt:
59
+ $ref: '#/components/schemas/sentAt'
60
+ dimLightPayload:
61
+ type: object
62
+ properties:
63
+ percentage:
64
+ type: integer
65
+ description: Percentage to which the light should be dimmed to.
66
+ minimum: 0
67
+ maximum: 100
68
+ sentAt:
69
+ $ref: '#/components/schemas/sentAt'
70
+ sentAt:
71
+ type: string
72
+ format: date-time
73
+ description: Date and time when the message was sent.
74
+ securitySchemes:
75
+ apiKey:
76
+ type: apiKey
77
+ in: user
78
+ description: Provide your API key as the user and leave the password empty.
79
+ parameters:
80
+ streetlightId:
81
+ name: streetlightId
82
+ description: The ID of the streetlight.
83
+ schema:
84
+ type: string
85
+ channels:
86
+ 'smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured':
87
+ parameters:
88
+ streetlightId:
89
+ $ref: '#/components/parameters/streetlightId'
90
+ publish:
91
+ message:
92
+ $ref: '#/components/messages/lightMeasured'
93
+ 'smartylighting/streetlights/1/0/action/{streetlightId}/turn/on':
94
+ parameters:
95
+ streetlightId:
96
+ $ref: '#/components/parameters/streetlightId'
97
+ subscribe:
98
+ message:
99
+ $ref: '#/components/messages/turnOnOff'
100
+ 'smartylighting/streetlights/1/0/action/{streetlightId}/turn/off':
101
+ parameters:
102
+ streetlightId:
103
+ $ref: '#/components/parameters/streetlightId'
104
+ subscribe:
105
+ message:
106
+ $ref: '#/components/messages/turnOnOff'
107
+ 'smartylighting/streetlights/1/0/action/{streetlightId}/dim':
108
+ parameters:
109
+ streetlightId:
110
+ $ref: '#/components/parameters/streetlightId'
111
+ subscribe:
112
+ message:
113
+ $ref: '#/components/messages/dimLight'
@@ -0,0 +1,113 @@
1
+ asyncapi: 2.2.0
2
+ info:
3
+ title: Streetlights API
4
+ version: 1.0.0
5
+ description: "The Smartylighting Streetlights API allows you to remotely manage the city lights.\n\n### Check out its awesome features:\n\n* Turn a specific streetlight on/off \U0001F303\n* Dim a specific streetlight \U0001F60E\n* Receive real-time information about environmental lighting conditions \U0001F4C8\n"
6
+ license:
7
+ name: Apache 2.0
8
+ url: 'https://www.apache.org/licenses/LICENSE-2.0'
9
+ servers:
10
+ default:
11
+ url: 'api.streetlights.smartylighting.com:{port}'
12
+ description: Test broker
13
+ variables:
14
+ port:
15
+ description: Secure connection (TLS) is available through port 8883.
16
+ default: '1883'
17
+ enum:
18
+ - '1883'
19
+ - '8883'
20
+ protocol: mqtt
21
+ security:
22
+ - apiKey: []
23
+ components:
24
+ messages:
25
+ lightMeasured:
26
+ summary: >-
27
+ Inform about environmental lighting conditions for a particular
28
+ streetlight.
29
+ payload:
30
+ $ref: '#/components/schemas/lightMeasuredPayload'
31
+ turnOnOff:
32
+ summary: Command a particular streetlight to turn the lights on or off.
33
+ payload:
34
+ $ref: '#/components/schemas/turnOnOffPayload'
35
+ dimLight:
36
+ summary: Command a particular streetlight to dim the lights.
37
+ payload:
38
+ $ref: '#/components/schemas/dimLightPayload'
39
+ schemas:
40
+ lightMeasuredPayload:
41
+ type: object
42
+ properties:
43
+ lumens:
44
+ type: integer
45
+ minimum: 0
46
+ description: Light intensity measured in lumens.
47
+ sentAt:
48
+ $ref: '#/components/schemas/sentAt'
49
+ turnOnOffPayload:
50
+ type: object
51
+ properties:
52
+ command:
53
+ type: string
54
+ enum:
55
+ - 'on'
56
+ - 'off'
57
+ description: Whether to turn on or off the light.
58
+ sentAt:
59
+ $ref: '#/components/schemas/sentAt'
60
+ dimLightPayload:
61
+ type: object
62
+ properties:
63
+ percentage:
64
+ type: integer
65
+ description: Percentage to which the light should be dimmed to.
66
+ minimum: 0
67
+ maximum: 100
68
+ sentAt:
69
+ $ref: '#/components/schemas/sentAt'
70
+ sentAt:
71
+ type: string
72
+ format: date-time
73
+ description: Date and time when the message was sent.
74
+ securitySchemes:
75
+ apiKey:
76
+ type: apiKey
77
+ in: user
78
+ description: Provide your API key as the user and leave the password empty.
79
+ parameters:
80
+ streetlightId:
81
+ name: streetlightId
82
+ description: The ID of the streetlight.
83
+ schema:
84
+ type: string
85
+ channels:
86
+ 'smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured':
87
+ parameters:
88
+ streetlightId:
89
+ $ref: '#/components/parameters/streetlightId'
90
+ publish:
91
+ message:
92
+ $ref: '#/components/messages/lightMeasured'
93
+ 'smartylighting/streetlights/1/0/action/{streetlightId}/turn/on':
94
+ parameters:
95
+ streetlightId:
96
+ $ref: '#/components/parameters/streetlightId'
97
+ subscribe:
98
+ message:
99
+ $ref: '#/components/messages/turnOnOff'
100
+ 'smartylighting/streetlights/1/0/action/{streetlightId}/turn/off':
101
+ parameters:
102
+ streetlightId:
103
+ $ref: '#/components/parameters/streetlightId'
104
+ subscribe:
105
+ message:
106
+ $ref: '#/components/messages/turnOnOff'
107
+ 'smartylighting/streetlights/1/0/action/{streetlightId}/dim':
108
+ parameters:
109
+ streetlightId:
110
+ $ref: '#/components/parameters/streetlightId'
111
+ subscribe:
112
+ message:
113
+ $ref: '#/components/messages/dimLight'