@asyncapi/converter 0.9.0 → 0.10.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 (57) hide show
  1. package/README.md +23 -3
  2. package/lib/convert.d.ts +3 -0
  3. package/lib/convert.js +193 -0
  4. package/lib/index.d.ts +2 -0
  5. package/lib/index.js +5 -212
  6. package/lib/interfaces.d.ts +7 -0
  7. package/lib/interfaces.js +2 -0
  8. package/lib/utils.d.ts +21 -0
  9. package/lib/utils.js +114 -0
  10. package/package.json +21 -6
  11. package/.github/workflows/add-good-first-issue-labels.yml +0 -68
  12. package/.github/workflows/automerge-for-humans-add-ready-to-merge-or-do-not-merge-label.yml +0 -54
  13. package/.github/workflows/automerge-for-humans-merging.yml +0 -32
  14. package/.github/workflows/automerge-for-humans-remove-ready-to-merge-label-on-edit.yml +0 -35
  15. package/.github/workflows/automerge-orphans.yml +0 -63
  16. package/.github/workflows/automerge.yml +0 -50
  17. package/.github/workflows/autoupdate.yml +0 -32
  18. package/.github/workflows/bump.yml +0 -33
  19. package/.github/workflows/help-command.yml +0 -43
  20. package/.github/workflows/if-go-pr-testing.yml +0 -68
  21. package/.github/workflows/if-nodejs-pr-testing.yml +0 -60
  22. package/.github/workflows/if-nodejs-release.yml +0 -85
  23. package/.github/workflows/if-nodejs-version-bump.yml +0 -48
  24. package/.github/workflows/issues-prs-notifications.yml +0 -72
  25. package/.github/workflows/lint-pr-title.yml +0 -22
  26. package/.github/workflows/notify-tsc-members-mention.yml +0 -142
  27. package/.github/workflows/release-announcements.yml +0 -76
  28. package/.github/workflows/sentiment-analysis.yml +0 -44
  29. package/.github/workflows/stale-issues-prs.yml +0 -42
  30. package/.github/workflows/welcome-first-time-contrib.yml +0 -83
  31. package/CODEOWNERS +0 -8
  32. package/lib/helpers.js +0 -109
  33. package/test/index.js +0 -257
  34. package/test/input/1.0.0/streetlights.yml +0 -120
  35. package/test/input/1.1.0/streetlights.yml +0 -120
  36. package/test/input/1.2.0/gitter-streaming.yml +0 -140
  37. package/test/input/1.2.0/slack-rtm.yml +0 -876
  38. package/test/input/1.2.0/streetlights.yml +0 -120
  39. package/test/input/2.0.0/streetlights.json +0 -172
  40. package/test/input/2.0.0/streetlights.yml +0 -112
  41. package/test/input/2.0.0-rc1/streetlights.yml +0 -109
  42. package/test/input/2.0.0-rc2/streetlights.yml +0 -112
  43. package/test/input/2.1.0/streetlights.yml +0 -112
  44. package/test/input/2.2.0/streetlights.yml +0 -112
  45. package/test/output/2.0.0/gitter-streaming.yml +0 -137
  46. package/test/output/2.0.0/slack-rtm.yml +0 -879
  47. package/test/output/2.0.0/streetlights.yml +0 -112
  48. package/test/output/2.0.0-rc1/gitter-streaming.yml +0 -137
  49. package/test/output/2.0.0-rc1/slack-rtm.yml +0 -879
  50. package/test/output/2.0.0-rc1/streetlights.yml +0 -109
  51. package/test/output/2.0.0-rc2/gitter-streaming.yml +0 -137
  52. package/test/output/2.0.0-rc2/slack-rtm.yml +0 -879
  53. package/test/output/2.0.0-rc2/streetlights.yml +0 -112
  54. package/test/output/2.1.0/streetlights.json +0 -172
  55. package/test/output/2.1.0/streetlights.yml +0 -112
  56. package/test/output/2.2.0/streetlights.yml +0 -112
  57. package/test/output/2.3.0/streetlights.yml +0 -112
@@ -1,112 +0,0 @@
1
- asyncapi: 2.0.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
- description: The ID of the streetlight.
82
- schema:
83
- type: string
84
- channels:
85
- 'smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured':
86
- parameters:
87
- streetlightId:
88
- $ref: '#/components/parameters/streetlightId'
89
- publish:
90
- message:
91
- $ref: '#/components/messages/lightMeasured'
92
- 'smartylighting/streetlights/1/0/action/{streetlightId}/turn/on':
93
- parameters:
94
- streetlightId:
95
- $ref: '#/components/parameters/streetlightId'
96
- subscribe:
97
- message:
98
- $ref: '#/components/messages/turnOnOff'
99
- 'smartylighting/streetlights/1/0/action/{streetlightId}/turn/off':
100
- parameters:
101
- streetlightId:
102
- $ref: '#/components/parameters/streetlightId'
103
- subscribe:
104
- message:
105
- $ref: '#/components/messages/turnOnOff'
106
- 'smartylighting/streetlights/1/0/action/{streetlightId}/dim':
107
- parameters:
108
- streetlightId:
109
- $ref: '#/components/parameters/streetlightId'
110
- subscribe:
111
- message:
112
- $ref: '#/components/messages/dimLight'
@@ -1,137 +0,0 @@
1
- asyncapi: 2.0.0-rc1
2
- info:
3
- title: Gitter Streaming API
4
- version: 1.0.0
5
- servers:
6
- - url: 'https://stream.gitter.im/v1/rooms/{roomId}/{resource}'
7
- variables:
8
- roomId:
9
- description: Id of the Gitter room.
10
- resource:
11
- description: The resource to consume.
12
- enum:
13
- - chatMessages
14
- - events
15
- protocol: https
16
- protocolVersion: '1.1'
17
- security:
18
- - httpBearerToken: []
19
- components:
20
- securitySchemes:
21
- httpBearerToken:
22
- type: http
23
- scheme: bearer
24
- messages:
25
- chatMessage:
26
- summary: >-
27
- A message represents an individual chat message sent to a room. They are
28
- a sub-resource of a room.
29
- payload:
30
- type: object
31
- properties:
32
- id:
33
- type: string
34
- description: ID of the message.
35
- text:
36
- type: string
37
- description: Original message in plain-text/markdown.
38
- html:
39
- type: string
40
- description: HTML formatted message.
41
- sent:
42
- type: string
43
- format: date-time
44
- description: ISO formatted date of the message.
45
- fromUser:
46
- type: object
47
- description: User that sent the message.
48
- properties:
49
- id:
50
- type: string
51
- description: Gitter User ID.
52
- username:
53
- type: string
54
- description: Gitter/GitHub username.
55
- displayName:
56
- type: string
57
- description: Gitter/GitHub user real name.
58
- url:
59
- type: string
60
- description: Path to the user on Gitter.
61
- avatarUrl:
62
- type: string
63
- format: uri
64
- description: User avatar URI.
65
- avatarUrlSmall:
66
- type: string
67
- format: uri
68
- description: User avatar URI (small).
69
- avatarUrlMedium:
70
- type: string
71
- format: uri
72
- description: User avatar URI (medium).
73
- v:
74
- type: number
75
- description: Version.
76
- gv:
77
- type: string
78
- description: Stands for "Gravatar version" and is used for cache busting.
79
- unread:
80
- type: boolean
81
- description: Boolean that indicates if the current user has read the message.
82
- readBy:
83
- type: number
84
- description: Number of users that have read the message.
85
- urls:
86
- type: array
87
- description: List of URLs present in the message.
88
- items:
89
- type: string
90
- format: uri
91
- mentions:
92
- type: array
93
- description: List of @Mentions in the message.
94
- items:
95
- type: object
96
- properties:
97
- screenName:
98
- type: string
99
- userId:
100
- type: string
101
- userIds:
102
- type: array
103
- items:
104
- type: string
105
- issues:
106
- type: array
107
- description: 'List of #Issues referenced in the message.'
108
- items:
109
- type: object
110
- properties:
111
- number:
112
- type: string
113
- meta:
114
- type: array
115
- description: Metadata. This is currently not used for anything.
116
- items: {}
117
- v:
118
- type: number
119
- description: Version.
120
- gv:
121
- type: string
122
- description: Stands for "Gravatar version" and is used for cache busting.
123
- heartbeat:
124
- summary: Its purpose is to keep the connection alive.
125
- payload:
126
- type: string
127
- enum:
128
- - |+
129
-
130
- id: 'urn:gitter.streaming.api'
131
- channels:
132
- /:
133
- publish:
134
- message:
135
- oneOf:
136
- - $ref: '#/components/messages/chatMessage'
137
- - $ref: '#/components/messages/heartbeat'