From b43704ba4e81cd5044d5103a862f4da01d9babfa Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Thu, 30 Nov 2023 10:01:53 -1000 Subject: [PATCH] add migration --- README.md | 2 +- docs/migrations/v2-to-v3.md | 26 ++++++++++++++++++++++++++ package-lock.json | 14 +++++++------- package.json | 2 +- 4 files changed, 35 insertions(+), 9 deletions(-) create mode 100644 docs/migrations/v2-to-v3.md diff --git a/README.md b/README.md index d07c9462b..1e322c366 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Updated bundle for the browser is always attached to the GitHub Release. > This package has rewrote the Model API (old one) to [Intent API](https://github.com/asyncapi/parser-api). If you still need to use the old API, read the [Convert to the old API](#convert-to-the-old-api) section. > **Note** -> Read the [migration guide from v1 to v2](./docs/migrations/v1-to-v2.md). +> Read the [migration guide from v2 to v3](./docs/migrations/v2-to-v3.md). diff --git a/docs/migrations/v2-to-v3.md b/docs/migrations/v2-to-v3.md new file mode 100644 index 000000000..0441cb270 --- /dev/null +++ b/docs/migrations/v2-to-v3.md @@ -0,0 +1,26 @@ +# Migrating from v2 to v3 + +The ONLY thing that changes between v2 and v3 is that we now use [parser API v3](https://github.com/asyncapi/parser-api/commit/954a59e41ccdb70de51eb43901f61b79198fbb51) where v2 used [parser API v1](https://github.com/asyncapi/parser-api/commit/7dab1eeb796f8c8c079e5d0c4d671d55a60bc8ca). + +## Parser API v1 to v3 +There are only very few changes, for message and message traits. + +## Message + +```diff +- - messageId(): `string` | `undefined` +- - schemaFormat(): `string` ++ - schemaFormat(): `string` | `undefined` +``` + +Since `messageId` have been removed, you need to use `id` instead. + +## MessageTrait + +```diff +- - messageId(): `string` | `undefined` +- - schemaFormat(): `string` ++ - schemaFormat(): `string` | `undefined` +``` + +Since `messageId` have been removed, you need to use `id` instead. diff --git a/package-lock.json b/package-lock.json index b14f5bf55..b1e200187 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "3.0.0-next-major-spec.15", "license": "Apache-2.0", "dependencies": { - "@asyncapi/specs": "^6.0.0-next-major-spec.9", + "@asyncapi/specs": "^6.0.0", "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", "@stoplight/json": "^3.20.2", "@stoplight/json-ref-readers": "^1.2.2", @@ -129,9 +129,9 @@ } }, "node_modules/@asyncapi/specs": { - "version": "6.0.0-next-major-spec.9", - "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-6.0.0-next-major-spec.9.tgz", - "integrity": "sha512-fmOITQoYMw3I2Vai7u/vT0q4yHMBkeXTPByHhrqCaxnwX59Yb2vsMmukHjq478qqCP/U/TmzVvGpEy0JBMaelw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-6.0.0.tgz", + "integrity": "sha512-/HikjNcrTR/OgZmXWHYkdLdoJQUm80zcM5dnr1dx2R92WRmMQ0wweEJyFXCZwwyzoRkPHMD3RU4h3ppM8pYHRQ==", "dependencies": { "@types/json-schema": "^7.0.11" } @@ -11193,9 +11193,9 @@ } }, "@asyncapi/specs": { - "version": "6.0.0-next-major-spec.9", - "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-6.0.0-next-major-spec.9.tgz", - "integrity": "sha512-fmOITQoYMw3I2Vai7u/vT0q4yHMBkeXTPByHhrqCaxnwX59Yb2vsMmukHjq478qqCP/U/TmzVvGpEy0JBMaelw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-6.0.0.tgz", + "integrity": "sha512-/HikjNcrTR/OgZmXWHYkdLdoJQUm80zcM5dnr1dx2R92WRmMQ0wweEJyFXCZwwyzoRkPHMD3RU4h3ppM8pYHRQ==", "requires": { "@types/json-schema": "^7.0.11" } diff --git a/package.json b/package.json index 49093732e..0b6dc70a7 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "prepublishOnly": "npm run generate:assets" }, "dependencies": { - "@asyncapi/specs": "^6.0.0-next-major-spec.9", + "@asyncapi/specs": "^6.0.0", "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", "@stoplight/json": "^3.20.2", "@stoplight/json-ref-readers": "^1.2.2",