-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: prepare
next-major-spec
for release (#421)
Co-authored-by: Sergio Moya <[email protected]>
- Loading branch information
1 parent
31f4f9c
commit 24e105a
Showing
4 changed files
with
66 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Migrating to version 5 | ||
|
||
In version 5, we now export two different types of schemas, one using `$id` feature in JSON Schema, and one without. | ||
|
||
In v4, the library would export the schemas as: | ||
```js | ||
module.exports = { | ||
'2.0.0': require('./schemas/2.0.0.json'), | ||
... | ||
}; | ||
``` | ||
|
||
In v5, you need to access the schemas through `.schemas` instead. | ||
|
||
```js | ||
module.exports = { | ||
'schemas': { | ||
'2.0.0': require('./schemas/2.0.0.json'), | ||
... | ||
}, | ||
'schemasWithoutId': { | ||
'2.0.0': require('./schemas/2.0.0-without-$id.json'), | ||
... | ||
} | ||
}; | ||
``` | ||
|
||
And if you want the schemas without `$id`, use `schemasWithoutId`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Migrating to version 6 | ||
|
||
In version 6 and onwards, all pre-release AsyncAPI specification versions will be released as a regular feature request, before the AsyncAPI specification itself is released. | ||
|
||
The pre-release version will be released as if it was not a pre-release, for example for AsyncAPI 3.0, it will be released as normal: | ||
```js | ||
module.exports = { | ||
'schemas': { | ||
... | ||
'3.0.0': require('./schemas/3.0.0.json'), | ||
}, | ||
'schemasWithoutId': { | ||
... | ||
'3.0.0': require('./schemas/3.0.0-without-$id.json'), | ||
} | ||
}; | ||
``` | ||
|
||
However, while it's still a pre-release, the underlying schemas CAN contain breaking changes from version to version, up until the AsyncAPI specification is released. This means that one AsyncAPI document using v3 in the pre-release stage might be valid in `6.0.0`, but invalid in the `6.1.0`. This ONLY applies to pre-release schemas, and NOT regular ones that are set in stone. | ||
|
||
If you want to make sure you don't use a schema not released yet, you have to whitelist which versions you allow in your tool. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters