You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+13
Original file line number
Diff line number
Diff line change
@@ -134,6 +134,8 @@ This is the current project structure explained:
134
134
-[./examples](./examples) - contain most individual definition examples that will automatically be bundled together to provide example for each definition in the schemas in [./schemas](./schemas).
135
135
-[./tools/bundler](./tools/bundler) - is the tool that bundles all the individual schemas together.
136
136
-[./schemas](./schemas) - contain all automatically bundled and complete schemas for each AsyncAPI version. These schemas should **NOT** be manually changed as they are automatically generated. Any changes should be done in [./definitions](./definitions).
137
+
-[./extensions](./extensions) - contains all the schemas of the extensions that will automatically be bundled to provide informations about extensions.
138
+
137
139
138
140
## Schema Bundling
139
141
@@ -210,7 +212,18 @@ Whenever you make changes in AsyncAPI JSON Schema, you should always manually ve
Extensions are a way to [extend AsyncAPI specification](https://www.asyncapi.com/docs/concepts/asyncapi-document/extending-specification) with fields that are not yet defined inside the specification. To add JSON schema of the extension in this repository, you need to first make sure it is added to the [extension-catalog](https://github.com/asyncapi/extensions-catalog) repository.
219
+
### How to add schema of the extension
220
+
213
221
222
+
1. All the extensions must be present in [./extensions](./extensions) folder.
223
+
2. A proper folder structure must be followed to add the extensions.
224
+
3. A new folder just as [x extension](./extensions/x) must be added with proper `versioning` and `schema file`.
225
+
4. All the schemas must be added in a file named `schema.json` just as one is defined for [x extension](./extensions/x/0.1.0/schema.json).
214
226
227
+
5. Extension schema should not be referenced directly in the definition of the object it extends. For example if you add an extension for `info`, your extension's schema should not be referenced from `info.json` but [infoExtensions.json](./definitions/3.0.0/infoExtensions.json). If the object that you extend doesn't have a corresponding `*Extensions.json` file, you need to create one.
0 commit comments