@asyncapi/converter 0.9.0 → 1.0.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 (58) hide show
  1. package/README.md +96 -21
  2. package/lib/convert.d.ts +3 -0
  3. package/lib/convert.js +192 -0
  4. package/lib/index.d.ts +2 -0
  5. package/lib/index.js +5 -212
  6. package/lib/interfaces.d.ts +6 -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 +24 -12
  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/cli.js +0 -66
  33. package/lib/helpers.js +0 -109
  34. package/test/index.js +0 -257
  35. package/test/input/1.0.0/streetlights.yml +0 -120
  36. package/test/input/1.1.0/streetlights.yml +0 -120
  37. package/test/input/1.2.0/gitter-streaming.yml +0 -140
  38. package/test/input/1.2.0/slack-rtm.yml +0 -876
  39. package/test/input/1.2.0/streetlights.yml +0 -120
  40. package/test/input/2.0.0/streetlights.json +0 -172
  41. package/test/input/2.0.0/streetlights.yml +0 -112
  42. package/test/input/2.0.0-rc1/streetlights.yml +0 -109
  43. package/test/input/2.0.0-rc2/streetlights.yml +0 -112
  44. package/test/input/2.1.0/streetlights.yml +0 -112
  45. package/test/input/2.2.0/streetlights.yml +0 -112
  46. package/test/output/2.0.0/gitter-streaming.yml +0 -137
  47. package/test/output/2.0.0/slack-rtm.yml +0 -879
  48. package/test/output/2.0.0/streetlights.yml +0 -112
  49. package/test/output/2.0.0-rc1/gitter-streaming.yml +0 -137
  50. package/test/output/2.0.0-rc1/slack-rtm.yml +0 -879
  51. package/test/output/2.0.0-rc1/streetlights.yml +0 -109
  52. package/test/output/2.0.0-rc2/gitter-streaming.yml +0 -137
  53. package/test/output/2.0.0-rc2/slack-rtm.yml +0 -879
  54. package/test/output/2.0.0-rc2/streetlights.yml +0 -112
  55. package/test/output/2.1.0/streetlights.json +0 -172
  56. package/test/output/2.1.0/streetlights.yml +0 -112
  57. package/test/output/2.2.0/streetlights.yml +0 -112
  58. package/test/output/2.3.0/streetlights.yml +0 -112
@@ -1,109 +0,0 @@
1
- asyncapi: 2.0.0-rc1
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
- - url: 'api.streetlights.smartylighting.com:{port}'
11
- description: Test broker
12
- variables:
13
- port:
14
- description: Secure connection (TLS) is available through port 8883.
15
- default: '1883'
16
- enum:
17
- - '1883'
18
- - '8883'
19
- protocol: mqtt
20
- security:
21
- - apiKey: []
22
- components:
23
- messages:
24
- lightMeasured:
25
- summary: >-
26
- Inform about environmental lighting conditions for a particular
27
- streetlight.
28
- payload:
29
- $ref: '#/components/schemas/lightMeasuredPayload'
30
- turnOnOff:
31
- summary: Command a particular streetlight to turn the lights on or off.
32
- payload:
33
- $ref: '#/components/schemas/turnOnOffPayload'
34
- dimLight:
35
- summary: Command a particular streetlight to dim the lights.
36
- payload:
37
- $ref: '#/components/schemas/dimLightPayload'
38
- schemas:
39
- lightMeasuredPayload:
40
- type: object
41
- properties:
42
- lumens:
43
- type: integer
44
- minimum: 0
45
- description: Light intensity measured in lumens.
46
- sentAt:
47
- $ref: '#/components/schemas/sentAt'
48
- turnOnOffPayload:
49
- type: object
50
- properties:
51
- command:
52
- type: string
53
- enum:
54
- - 'on'
55
- - 'off'
56
- description: Whether to turn on or off the light.
57
- sentAt:
58
- $ref: '#/components/schemas/sentAt'
59
- dimLightPayload:
60
- type: object
61
- properties:
62
- percentage:
63
- type: integer
64
- description: Percentage to which the light should be dimmed to.
65
- minimum: 0
66
- maximum: 100
67
- sentAt:
68
- $ref: '#/components/schemas/sentAt'
69
- sentAt:
70
- type: string
71
- format: date-time
72
- description: Date and time when the message was sent.
73
- securitySchemes:
74
- apiKey:
75
- type: apiKey
76
- in: user
77
- description: Provide your API key as the user and leave the password empty.
78
- parameters:
79
- streetlightId:
80
- name: streetlightId
81
- description: The ID of the streetlight.
82
- schema:
83
- type: string
84
- id: 'urn:streetlights.api'
85
- channels:
86
- 'smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured':
87
- parameters:
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
- - $ref: '#/components/parameters/streetlightId'
95
- subscribe:
96
- message:
97
- $ref: '#/components/messages/turnOnOff'
98
- 'smartylighting/streetlights/1/0/action/{streetlightId}/turn/off':
99
- parameters:
100
- - $ref: '#/components/parameters/streetlightId'
101
- subscribe:
102
- message:
103
- $ref: '#/components/messages/turnOnOff'
104
- 'smartylighting/streetlights/1/0/action/{streetlightId}/dim':
105
- parameters:
106
- - $ref: '#/components/parameters/streetlightId'
107
- subscribe:
108
- message:
109
- $ref: '#/components/messages/dimLight'
@@ -1,137 +0,0 @@
1
- asyncapi: 2.0.0-rc2
2
- info:
3
- title: Gitter Streaming API
4
- version: 1.0.0
5
- servers:
6
- default:
7
- url: 'https://stream.gitter.im/v1/rooms/{roomId}/{resource}'
8
- variables:
9
- roomId:
10
- description: Id of the Gitter room.
11
- resource:
12
- description: The resource to consume.
13
- enum:
14
- - chatMessages
15
- - events
16
- protocol: https
17
- protocolVersion: '1.1'
18
- security:
19
- - httpBearerToken: []
20
- components:
21
- securitySchemes:
22
- httpBearerToken:
23
- type: http
24
- scheme: bearer
25
- messages:
26
- chatMessage:
27
- summary: >-
28
- A message represents an individual chat message sent to a room. They are
29
- a sub-resource of a room.
30
- payload:
31
- type: object
32
- properties:
33
- id:
34
- type: string
35
- description: ID of the message.
36
- text:
37
- type: string
38
- description: Original message in plain-text/markdown.
39
- html:
40
- type: string
41
- description: HTML formatted message.
42
- sent:
43
- type: string
44
- format: date-time
45
- description: ISO formatted date of the message.
46
- fromUser:
47
- type: object
48
- description: User that sent the message.
49
- properties:
50
- id:
51
- type: string
52
- description: Gitter User ID.
53
- username:
54
- type: string
55
- description: Gitter/GitHub username.
56
- displayName:
57
- type: string
58
- description: Gitter/GitHub user real name.
59
- url:
60
- type: string
61
- description: Path to the user on Gitter.
62
- avatarUrl:
63
- type: string
64
- format: uri
65
- description: User avatar URI.
66
- avatarUrlSmall:
67
- type: string
68
- format: uri
69
- description: User avatar URI (small).
70
- avatarUrlMedium:
71
- type: string
72
- format: uri
73
- description: User avatar URI (medium).
74
- v:
75
- type: number
76
- description: Version.
77
- gv:
78
- type: string
79
- description: Stands for "Gravatar version" and is used for cache busting.
80
- unread:
81
- type: boolean
82
- description: Boolean that indicates if the current user has read the message.
83
- readBy:
84
- type: number
85
- description: Number of users that have read the message.
86
- urls:
87
- type: array
88
- description: List of URLs present in the message.
89
- items:
90
- type: string
91
- format: uri
92
- mentions:
93
- type: array
94
- description: List of @Mentions in the message.
95
- items:
96
- type: object
97
- properties:
98
- screenName:
99
- type: string
100
- userId:
101
- type: string
102
- userIds:
103
- type: array
104
- items:
105
- type: string
106
- issues:
107
- type: array
108
- description: 'List of #Issues referenced in the message.'
109
- items:
110
- type: object
111
- properties:
112
- number:
113
- type: string
114
- meta:
115
- type: array
116
- description: Metadata. This is currently not used for anything.
117
- items: {}
118
- v:
119
- type: number
120
- description: Version.
121
- gv:
122
- type: string
123
- description: Stands for "Gravatar version" and is used for cache busting.
124
- heartbeat:
125
- summary: Its purpose is to keep the connection alive.
126
- payload:
127
- type: string
128
- enum:
129
- - |+
130
-
131
- channels:
132
- /:
133
- publish:
134
- message:
135
- oneOf:
136
- - $ref: '#/components/messages/chatMessage'
137
- - $ref: '#/components/messages/heartbeat'