@swagger-api/apidom-parser-adapter-asyncapi-json-3 1.0.0-rc.4

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/CHANGELOG.md ADDED
@@ -0,0 +1,10 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ # [1.0.0-rc.4](https://github.com/swagger-api/apidom/compare/v1.0.0-rc.3...v1.0.0-rc.4) (2025-11-25)
7
+
8
+ ### Features
9
+
10
+ - parser adapter for json in asyncapi3 ([#5048](https://github.com/swagger-api/apidom/issues/5048)) ([1ba6aad](https://github.com/swagger-api/apidom/commit/1ba6aad986009b597daae17c22818ce1f9370b5d))
@@ -0,0 +1,182 @@
1
+ This Academic Free License (the "License") applies to any original work
2
+ of authorship (the "Original Work") whose owner (the "Licensor") has
3
+ placed the following licensing notice adjacent to the copyright notice
4
+ for the Original Work:
5
+
6
+ Licensed under the Academic Free License version 3.0
7
+
8
+ 1) Grant of Copyright License. Licensor grants You a worldwide,
9
+ royalty-free, non-exclusive, sublicensable license, for the duration of
10
+ the copyright, to do the following:
11
+
12
+ a) to reproduce the Original Work in copies, either alone or as part of
13
+ a collective work;
14
+
15
+ b) to translate, adapt, alter, transform, modify, or arrange the
16
+ Original Work, thereby creating derivative works ("Derivative Works")
17
+ based upon the Original Work;
18
+
19
+ c) to distribute or communicate copies of the Original Work and
20
+ Derivative Works to the public, under any license of your choice that
21
+ does not contradict the terms and conditions, including Licensor's
22
+ reserved rights and remedies, in this Academic Free License;
23
+
24
+ d) to perform the Original Work publicly; and
25
+
26
+ e) to display the Original Work publicly.
27
+
28
+ 2) Grant of Patent License. Licensor grants You a worldwide,
29
+ royalty-free, non-exclusive, sublicensable license, under patent claims
30
+ owned or controlled by the Licensor that are embodied in the Original
31
+ Work as furnished by the Licensor, for the duration of the patents, to
32
+ make, use, sell, offer for sale, have made, and import the Original Work
33
+ and Derivative Works.
34
+
35
+ 3) Grant of Source Code License. The term "Source Code" means the
36
+ preferred form of the Original Work for making modifications to it
37
+ and all available documentation describing how to modify the Original
38
+ Work. Licensor agrees to provide a machine-readable copy of the Source
39
+ Code of the Original Work along with each copy of the Original Work
40
+ that Licensor distributes. Licensor reserves the right to satisfy this
41
+ obligation by placing a machine-readable copy of the Source Code in an
42
+ information repository reasonably calculated to permit inexpensive and
43
+ convenient access by You for as long as Licensor continues to distribute
44
+ the Original Work.
45
+
46
+ 4) Exclusions From License Grant. Neither the names of Licensor, nor
47
+ the names of any contributors to the Original Work, nor any of their
48
+ trademarks or service marks, may be used to endorse or promote products
49
+ derived from this Original Work without express prior permission of the
50
+ Licensor. Except as expressly stated herein, nothing in this License
51
+ grants any license to Licensor's trademarks, copyrights, patents, trade
52
+ secrets or any other intellectual property. No patent license is granted
53
+ to make, use, sell, offer for sale, have made, or import embodiments
54
+ of any patent claims other than the licensed claims defined in Section
55
+ 2. No license is granted to the trademarks of Licensor even if such
56
+ marks are included in the Original Work. Nothing in this License shall
57
+ be interpreted to prohibit Licensor from licensing under terms different
58
+ from this License any Original Work that Licensor otherwise would have a
59
+ right to license.
60
+
61
+ 5) External Deployment. The term "External Deployment" means the use,
62
+ distribution, or communication of the Original Work or Derivative
63
+ Works in any way such that the Original Work or Derivative Works may
64
+ be used by anyone other than You, whether those works are distributed
65
+ or communicated to those persons or made available as an application
66
+ intended for use over a network. As an express condition for the grants
67
+ of license hereunder, You must treat any External Deployment by You of
68
+ the Original Work or a Derivative Work as a distribution under section
69
+ 1(c).
70
+
71
+ 6) Attribution Rights. You must retain, in the Source Code of any
72
+ Derivative Works that You create, all copyright, patent, or trademark
73
+ notices from the Source Code of the Original Work, as well as any
74
+ notices of licensing and any descriptive text identified therein as an
75
+ "Attribution Notice." You must cause the Source Code for any Derivative
76
+ Works that You create to carry a prominent Attribution Notice reasonably
77
+ calculated to inform recipients that You have modified the Original
78
+ Work.
79
+
80
+ 7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants
81
+ that the copyright in and to the Original Work and the patent rights
82
+ granted herein by Licensor are owned by the Licensor or are sublicensed
83
+ to You under the terms of this License with the permission of the
84
+ contributor(s) of those copyrights and patent rights. Except as
85
+ expressly stated in the immediately preceding sentence, the Original
86
+ Work is provided under this License on an "AS IS" BASIS and WITHOUT
87
+ WARRANTY, either express or implied, including, without limitation,
88
+ the warranties of non-infringement, merchantability or fitness for a
89
+ particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL
90
+ WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential
91
+ part of this License. No license to the Original Work is granted by this
92
+ License except under this disclaimer.
93
+
94
+ 8) Limitation of Liability. Under no circumstances and under no legal
95
+ theory, whether in tort (including negligence), contract, or otherwise,
96
+ shall the Licensor be liable to anyone for any indirect, special,
97
+ incidental, or consequential damages of any character arising as a
98
+ result of this License or the use of the Original Work including,
99
+ without limitation, damages for loss of goodwill, work stoppage,
100
+ computer failure or malfunction, or any and all other commercial damages
101
+ or losses. This limitation of liability shall not apply to the extent
102
+ applicable law prohibits such limitation.
103
+
104
+ 9) Acceptance and Termination. If, at any time, You expressly
105
+ assented to this License, that assent indicates your clear and
106
+ irrevocable acceptance of this License and all of its terms and
107
+ conditions. If You distribute or communicate copies of the Original
108
+ Work or a Derivative Work, You must make a reasonable effort under the
109
+ circumstances to obtain the express assent of recipients to the terms
110
+ of this License. This License conditions your rights to undertake
111
+ the activities listed in Section 1, including your right to create
112
+ Derivative Works based upon the Original Work, and doing so without
113
+ honoring these terms and conditions is prohibited by copyright law and
114
+ international treaty. Nothing in this License is intended to affect
115
+ copyright exceptions and limitations (including "fair use" or "fair
116
+ dealing"). This License shall terminate immediately and You may no
117
+ longer exercise any of the rights granted to You by this License upon
118
+ your failure to honor the conditions in Section 1(c).
119
+
120
+ 10) Termination for Patent Action. This License shall terminate
121
+ automatically and You may no longer exercise any of the rights granted
122
+ to You by this License as of the date You commence an action, including
123
+ a cross-claim or counterclaim, against Licensor or any licensee
124
+ alleging that the Original Work infringes a patent. This termination
125
+ provision shall not apply for an action alleging patent infringement by
126
+ combinations of the Original Work with other software or hardware.
127
+
128
+ 11) Jurisdiction, Venue and Governing Law. Any action or suit relating
129
+ to this License may be brought only in the courts of a jurisdiction
130
+ wherein the Licensor resides or in which Licensor conducts its primary
131
+ business, and under the laws of that jurisdiction excluding its
132
+ conflict-of-law provisions. The application of the United Nations
133
+ Convention on Contracts for the International Sale of Goods is
134
+ expressly excluded. Any use of the Original Work outside the scope
135
+ of this License or after its termination shall be subject to the
136
+ requirements and penalties of copyright or patent law in the appropriate
137
+ jurisdiction. This section shall survive the termination of this
138
+ License.
139
+
140
+ 12) Attorneys' Fees. In any action to enforce the terms of this License
141
+ or seeking damages relating thereto, the prevailing party shall
142
+ be entitled to recover its costs and expenses, including, without
143
+ limitation, reasonable attorneys' fees and costs incurred in connection
144
+ with such action, including any appeal of such action. This section
145
+ shall survive the termination of this License.
146
+
147
+ 13) Miscellaneous. If any provision of this License is held to be
148
+ unenforceable, such provision shall be reformed only to the extent
149
+ necessary to make it enforceable.
150
+
151
+ 14) Definition of "You" in This License. "You" throughout this License,
152
+ whether in upper or lower case, means an individual or a legal entity
153
+ exercising rights under, and complying with all of the terms of, this
154
+ License. For legal entities, "You" includes any entity that controls,
155
+ is controlled by, or is under common control with you. For purposes of
156
+ this definition, "control" means (i) the power, direct or indirect, to
157
+ cause the direction or management of such entity, whether by contract
158
+ or otherwise, or (ii) ownership of fifty percent (50%) or more of the
159
+ outstanding shares, or (iii) beneficial ownership of such entity.
160
+
161
+ 15) Right to Use. You may use the Original Work in all ways not
162
+ otherwise restricted or conditioned by this License or by law, and
163
+ Licensor promises not to interfere with or be responsible for such uses
164
+ by You.
165
+
166
+ 16) Modification of This License. This License is Copyright ©
167
+ 2005 Lawrence Rosen. Permission is granted to copy, distribute, or
168
+ communicate this License without modification. Nothing in this License
169
+ permits You to modify this License as applied to the Original Work or
170
+ to Derivative Works. However, You may modify the text of this License
171
+ and copy, distribute or communicate your modified version (the "Modified
172
+ License") and apply it to other original works of authorship subject
173
+ to the following conditions: (i) You may not indicate in any way that
174
+ your Modified License is the "Academic Free License" or "AFL" and you
175
+ may not use those names in the name of your Modified License; (ii) You
176
+ must replace the notice specified in the first paragraph above with
177
+ the notice "Licensed under <insert your license name here>" or with a
178
+ notice of your own that is not confusingly similar to the notice in
179
+ this License; and (iii) You may not claim that your original works are
180
+ open source software unless your Modified License has been approved by
181
+ Open Source Initiative (OSI) and You comply with its license review and
182
+ certification process.
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,26 @@
1
+ Redistribution and use in source and binary forms, with or without
2
+ modification, are permitted provided that the following conditions are
3
+ met:
4
+
5
+ 1. Redistributions of source code must retain the above copyright
6
+ notice, this list of conditions and the following disclaimer.
7
+
8
+ 2. Redistributions in binary form must reproduce the above copyright
9
+ notice, this list of conditions and the following disclaimer in the
10
+ documentation and/or other materials provided with the distribution.
11
+
12
+ 3. Neither the name of the copyright holder nor the names of its
13
+ contributors may be used to endorse or promote products derived from
14
+ this software without specific prior written permission.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
22
+ TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) <year> <copyright holders>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/NOTICE ADDED
@@ -0,0 +1,83 @@
1
+ ApiDOM
2
+ Copyright 2020 SmartBear Software Inc.
3
+ ApiDOM is licensed under Apache 2.0 license.
4
+ Copy of the Apache 2.0 license can be found in `LICENSES/Apache-2.0.txt` file.
5
+
6
+ json-schema-ref-parser
7
+ Copyright (c) 2015 James Messinger
8
+ File packages/apidom-reference/src/util/url.ts (the file) was originally created under MIT license in https://github.com/APIDevTools/json-schema-ref-parser repository.
9
+ The file has been copied into this project and modified. All modifications are licensed under Apache 2.0 License.
10
+ Copy of the MIT license can be found in `LICENSES/MIT.txt` file.
11
+
12
+ graphql-js
13
+ Copyright (c) GraphQL Contributors
14
+ File packages/apidom-ast/src/traversal/visitor.ts (the file) was originally created under MIT license in https://github.com/graphql/graphql-js repository.
15
+ The file has been copied into this project and modified. All modifications are licensed under Apache 2.0 License.
16
+ Copy of the MIT license can be found in `LICENSES/MIT.txt` file.
17
+
18
+ babel-plugin-add-import-extension
19
+ Copyright (c) 2019 Karl Prieb
20
+ File scripts/babel-plugin-add-import-extension.cjs (the file) was originally created under MIT license in https://codeberg.org/karl/babel-plugin-add-import-extension.
21
+ The file has been copied into this project and modified. All modifications are licensed under Apache 2.0 License.
22
+ Copy of the MIT license can be found in `LICENSES/MIT.txt` file.
23
+
24
+ refract-spec
25
+ Copyright (c) 2015 refractproject
26
+ Specific texts in README.md (the file) were originally created under MIT license in https://github.com/refractproject/refract-spec repository.
27
+ Specific texts have been copied into this project and modified. All modifications are licensed under Apache 2.0 License.
28
+ Copy of the MIT license can be found in `LICENSES/MIT.txt` file.
29
+
30
+ api-elements
31
+ Copyright (c) 2015 Apiary Inc.
32
+ Specific texts in README.md (the file) were originally created under MIT license in https://github.com/refractproject/refract-spec repository.
33
+ Specific texts have been copied into this project and modified. All modifications are licensed under Apache 2.0 License.
34
+ Copy of the MIT license can be found in `LICENSES/MIT.txt` file.
35
+
36
+ deepmerge
37
+ Copyright (c) 2012 James Halliday, Josh Duff, and other contributors
38
+ - File packages/apidom-core/src/deepmerge.ts contains algorithms that we originally created
39
+ in https://github.com/TehShrike/deepmerge/blob/master/index.js to handle deep merging of JavaScript Objects and Arrays.
40
+ These algorithms have been reverse engineered and adapted to support deep merging of ApiDOM structures.
41
+ - File packages/apidom-core/test/deepmerge.ts contains tests and fixtures that were originally created
42
+ in https://github.com/TehShrike/deepmerge/blob/master/test/merge.js to test deep merging of JavaScript Objects and Arrays.
43
+ These tests have been adapted to support testing deep merging of ApiDOM structures.
44
+ - File packages/apidom-core/README.md contains text fragments that were originally created
45
+ in https://github.com/TehShrike/deepmerge/blob/master/readme.md to document deepmerge library.
46
+ These text fragments have been amended to describe merging of ApiDOM structures.
47
+ Copy of the MIT license can be found in `LICENSES/MIT.txt` file.
48
+ All modifications are licensed under Apache 2.0 License.
49
+
50
+ OpenAPI Specification 2.0
51
+ Copyright The Linux Foundation
52
+ Fragments of the specification text are embedded in packages/apidom-ls/src/config/openapi.
53
+ Copy of the Apache 2.0 license can be found in `LICENSES/Apache-2.0.txt` file.
54
+
55
+ OpenAPI Specification 3.0.x
56
+ Copyright The Linux Foundation
57
+ Fragments of the specification text are embedded in packages/apidom-ls/src/config/openapi.
58
+ Copy of the Apache 2.0 license can be found in `LICENSES/Apache-2.0.txt` file.
59
+
60
+ OpenAPI Specification 3.1.x
61
+ Copyright The Linux Foundation
62
+ Fragments of the specification text are embedded in packages/apidom-ls/src/config/openapi.
63
+ Copy of the Apache 2.0 license can be found in `LICENSES/Apache-2.0.txt` file.
64
+
65
+ AsyncAPI Specification 2.x / AsyncAPI Initiative
66
+ Copyright The Linux Foundation
67
+ Fragments of the specification text are embedded in packages/apidom-ls/src/config/asyncapi.
68
+ Copy of the Apache 2.0 license can be found in `LICENSES/Apache-2.0.txt` file.
69
+
70
+ JSON Schema Specification (Draft 4/5 -> 2020-12)
71
+ Copyright (c) 2022 JSON Schema Specification Authors
72
+ Fragments of the specification text are embedded in packages/apidom-ls/src/config/common.
73
+ Copy of the BSD 3-Clause "New" or "Revised" License can be found in `LICENSES/BSD-3-Clause.txt` file.
74
+ Copy of the Academic Free License v3.0 can be found in `LICENSES/AFL-3.0.txt` file.
75
+
76
+ ---
77
+
78
+ If the SPDX-FileCopyrightText and SPDX-License-Identifier tags are not present in the file,
79
+ it is assumed that these tags have following implicit value:
80
+
81
+ SPDX-FileCopyrightText: Copyright 2020-2021 SmartBear Software Inc.
82
+ SPDX-License-Identifier: Apache-2.0
83
+
package/README.md ADDED
@@ -0,0 +1,93 @@
1
+ # @swagger-api/apidom-parser-adapter-asyncapi-json-3
2
+
3
+ `@swagger-api/apidom-parser-adapter-asyncapi-json-3` is a parser adapter for following AsyncAPI specification versions defined in [JSON format](https://www.json.org/json-en.html):
4
+
5
+ - [AsyncAPI 3.0.0 specification](https://github.com/asyncapi/spec/blob/v3.0.0/spec/asyncapi.md)
6
+ - [AsyncAPI 3.0.1 specification](https://github.com/asyncapi/spec/blob/v3.0.1/spec/asyncapi.md)
7
+
8
+ Under the hood this adapter uses [@swagger-api/apidom-parser-adapter-json](https://github.com/swagger-api/apidom/tree/main/packages/apidom-parser-adapter-json)
9
+ to parse a source string into generic ApiDOM in [base ApiDOM namespace](https://github.com/swagger-api/apidom/tree/main/packages/apidom-core#base-namespace)
10
+ which is then refracted with [AsyncApi 3.x.y Refractors](https://github.com/swagger-api/apidom/tree/main/packages/apidom-ns-asyncapi-3#refractors).
11
+
12
+ ## Installation
13
+
14
+ After [prerequisites](https://github.com/swagger-api/apidom/blob/main/README.md#prerequisites) for installing this package are satisfied, you can install it
15
+ via [npm CLI](https://docs.npmjs.com/cli) by running the following command:
16
+
17
+ ```sh
18
+ $ npm install @swagger-api/apidom-parser-adapter-asyncapi-json-3
19
+ ```
20
+
21
+ ## Parser adapter API
22
+
23
+ This parser adapter is fully compatible with parser adapter interface required by [@swagger-api/apidom-parser](https://github.com/swagger-api/apidom/tree/main/packages/apidom-parser#mounting-parser-adapters)
24
+ and implements all required properties.
25
+
26
+ ### mediaTypes
27
+
28
+ Defines list of media types that this parser adapter recognizes.
29
+
30
+ ```js
31
+ [
32
+ 'application/vnd.aai.asyncapi;version=3.0.0',
33
+ 'application/vnd.aai.asyncapi+json;version=3.0.0',
34
+ 'application/vnd.aai.asyncapi;version=3.0.1',
35
+ 'application/vnd.aai.asyncapi+json;version=3.0.1',
36
+ ]
37
+ ```
38
+
39
+ ### detect
40
+
41
+ [Detection](https://github.com/swagger-api/apidom/blob/main/packages/apidom-parser-adapter-asyncapi-json-3/src/adapter.ts#L18) is based on a regular expression matching required AsyncApi 3.0.0 specification symbols in JSON format.
42
+
43
+ ### namespace
44
+
45
+ This adapter exposes an instance of [AsyncApi 3.x.y ApiDOM namespace](https://github.com/swagger-api/apidom/tree/main/packages/apidom-ns-asyncapi-3#asyncapi-3xy-namespace).
46
+
47
+ ### parse
48
+
49
+ `parse` function consumes various options as a second argument. Here is a list of these options:
50
+
51
+ Option | Type | Default | Description
52
+ --- | --- | --- | ---
53
+ <a name="specObj"></a>`specObj` | `Object` | [Specification Object](https://github.com/swagger-api/apidom/blob/main/packages/apidom-ns-asyncapi-3/src/refractor/specification.ts) | This specification object drives the JSON AST transformation to AsyncAPI 3.x ApiDOM namespace.
54
+ <a name="sourceMap"></a>`sourceMap` | `Boolean` | `false` | Indicate whether to generate source maps.
55
+ <a name="refractorOpts"></a>`refractorOpts` | `Object` | `{}` | Refractor options are [passed to refractors](https://github.com/swagger-api/apidom/tree/main/packages/apidom-ns-asyncapi-3#refractor-plugins) during refracting phase.
56
+
57
+ All unrecognized arbitrary options will be ignored.
58
+
59
+ ## Usage
60
+
61
+ This parser adapter can be used directly or indirectly via [@swagger-api/apidom-parser](https://github.com/swagger-api/apidom/tree/main/packages/apidom-parser).
62
+
63
+ ### Direct usage
64
+
65
+ During direct usage you don't need to provide `mediaType` as the `parse` function is already pre-bound
66
+ with [supported media types](#mediatypes).
67
+
68
+ ```js
69
+ import { parse, detect } from '@swagger-api/apidom-parser-adapter-asyncapi-json-3';
70
+
71
+ // detecting
72
+ await detect('{"asyncapi": "3.0.0"}'); // => true
73
+ await detect('{"asyncapi": "3.0.1"}'); // => true
74
+ await detect('test'); // => false
75
+
76
+ // parsing
77
+ const parseResult = await parse('{"asyncapi": "3.0.0"}', { sourceMap: true });
78
+ ```
79
+
80
+ ### Indirect usage
81
+
82
+ You can omit the `mediaType` option here, but please read [Word on detect vs mediaTypes](https://github.com/swagger-api/apidom/tree/main/packages/apidom-parser#word-on-detect-vs-mediatypes) before you do so.
83
+
84
+ ```js
85
+ import ApiDOMParser from '@swagger-api/apidom-parser';
86
+ import * as asyncApiJsonAdapter from '@swagger-api/apidom-parser-adapter-asyncapi-json-3';
87
+
88
+ const parser = new ApiDOMParser();
89
+
90
+ parser.use(asyncApiJsonAdapter);
91
+
92
+ const parseResult = await parser.parse('{"asyncapi": "3.0.1"}', { mediaType: asyncApiJsonAdapter.mediaTypes.latest('json') });
93
+ ```