Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prepare next-major-spec for release #421

Merged
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ func Do() {

If you are currently using version 2, check out [migration guideline to version 3](./migrations/migrate-to-version-3.md).
If you are currently using version 3, check out [migration guideline to version 4](./migrations/migrate-to-version-4.md).
If you are currently using version 4, check out [migration guideline to version 5](./migrations/migrate-to-version-5.md).
If you are currently using version 5, check out [migration guideline to version 6](./migrations/migrate-to-version-6.md).

## Repository structure

Expand Down Expand Up @@ -183,7 +185,7 @@ Whenever a Breaking Change is introduced, the following steps should be taken in

## SchemaStore compatibility testing

AsyncAPI JSON Schema is referenced in [SchemaStore](https://www.schemastore.org/json/). In many IDEs, like VSCode, some extensions integrate with SchemaStore, like [YAML](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml). This way we enable autocompletion, validation and tooltips that helps writing AsyncAPI documents.
AsyncAPI JSON Schema is referenced in [SchemaStore](https://www.schemastore.org/json/). In many IDEs, like VSCode, some extensions integrate with SchemaStore, like [YAML](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml). This way we enable autocompletion, validation and tooltips that help write AsyncAPI documents.

Whenever you make changes in AsyncAPI JSON Schema, you should always manually verify that the schema is still supported by [YAML](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) and that it will be able to fetch and dereference it.

Expand Down
28 changes: 28 additions & 0 deletions migrations/migrate-to-version-5.md
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`.
3 changes: 3 additions & 0 deletions migrations/migrate-to-version-6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Migrating to version 6

In version 6 and onwards, all bindings will now be validated along side the specification. This means that documents that was valid before might not be valid anymore if the bindings in their document is incorrect.
jonaslagoni marked this conversation as resolved.
Show resolved Hide resolved
14 changes: 14 additions & 0 deletions schemas/all.schema-store.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,20 @@
"$ref": "http://asyncapi.com/schema-store/2.6.0-without-$id.json"
}
]
},
{
"allOf": [
{
"properties": {
"asyncapi": {
"const": "3.0.0"
}
}
},
{
"$ref": "http://asyncapi.com/schema-store/3.0.0-without-$id.json"
}
jonaslagoni marked this conversation as resolved.
Show resolved Hide resolved
]
}
]
}