diff --git a/.github/workflows/issues-prs-notifications.yml b/.github/workflows/issues-prs-notifications.yml index 78ebe9601..b8b20c6ba 100644 --- a/.github/workflows/issues-prs-notifications.yml +++ b/.github/workflows/issues-prs-notifications.yml @@ -20,8 +20,6 @@ jobs: name: Notify slack on every new issue runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v3 - name: Convert markdown to slack markdown for issue uses: asyncapi/.github/.github/actions/slackify-markdown@master id: issuemarkdown @@ -40,8 +38,6 @@ jobs: name: Notify slack on every new pull request runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v3 - name: Convert markdown to slack markdown for pull request uses: asyncapi/.github/.github/actions/slackify-markdown@master id: prmarkdown @@ -60,8 +56,6 @@ jobs: name: Notify slack on every new pull request runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v3 - name: Convert markdown to slack markdown for pull request uses: asyncapi/.github/.github/actions/slackify-markdown@master id: discussionmarkdown diff --git a/package-lock.json b/package-lock.json index 1ce390de2..b59fc41d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/parser", - "version": "3.0.16", + "version": "3.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@asyncapi/parser", - "version": "3.0.16", + "version": "3.1.0", "license": "Apache-2.0", "dependencies": { "@asyncapi/specs": "^6.7.1", @@ -30,7 +30,7 @@ "node-fetch": "2.6.7" }, "devDependencies": { - "@asyncapi/avro-schema-parser": "^3.0.23", + "@asyncapi/avro-schema-parser": "^3.0.24", "@jest/types": "^29.0.2", "@swc/core": "^1.2.248", "@swc/jest": "^0.2.22", @@ -82,23 +82,23 @@ } }, "node_modules/@asyncapi/avro-schema-parser": { - "version": "3.0.23", - "resolved": "https://registry.npmjs.org/@asyncapi/avro-schema-parser/-/avro-schema-parser-3.0.23.tgz", - "integrity": "sha512-NVJg84ldlsIjngRfKejiqDoXx+e32b7oCkzGv9b1vVvaalUBjbw9HOpnLak6FXPigqEKJ4BesMVU4TnZXtGWNQ==", + "version": "3.0.24", + "resolved": "https://registry.npmjs.org/@asyncapi/avro-schema-parser/-/avro-schema-parser-3.0.24.tgz", + "integrity": "sha512-YMyr2S2heMrWHRyECknjHeejlZl5exUSv9nD1gTejAT13fSf0PqIRydZ9ZuoglCLBg55AeehypR2zLIBu/9kHQ==", "dev": true, "dependencies": { - "@asyncapi/parser": "^3.0.15", + "@asyncapi/parser": "^3.1.0", "@types/json-schema": "^7.0.11", "avsc": "^5.7.6" } }, "node_modules/@asyncapi/parser": { - "version": "3.0.15", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.15.tgz", - "integrity": "sha512-tP4O6c9jM8pKimg8kw3+/SdPAKJQWPmYozO6ZFJB5ziVtsr3Z8Qe06V13QcBOg4LzIWAwontyG5lZ5jnyvuDPQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.1.0.tgz", + "integrity": "sha512-rUd+fsPRE68o+F3gLqk7OaBj5J5VgBiLk9eJBGEXolNmKbVd45mxJm2aBpMkphQEmYHuBvxZyiNYlSCyr1D2fA==", "dev": true, "dependencies": { - "@asyncapi/specs": "^6.6.0", + "@asyncapi/specs": "^6.7.1", "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", "@stoplight/json": "^3.20.2", "@stoplight/json-ref-readers": "^1.2.2", @@ -3327,12 +3327,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -5558,9 +5558,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -11135,23 +11135,23 @@ } }, "@asyncapi/avro-schema-parser": { - "version": "3.0.23", - "resolved": "https://registry.npmjs.org/@asyncapi/avro-schema-parser/-/avro-schema-parser-3.0.23.tgz", - "integrity": "sha512-NVJg84ldlsIjngRfKejiqDoXx+e32b7oCkzGv9b1vVvaalUBjbw9HOpnLak6FXPigqEKJ4BesMVU4TnZXtGWNQ==", + "version": "3.0.24", + "resolved": "https://registry.npmjs.org/@asyncapi/avro-schema-parser/-/avro-schema-parser-3.0.24.tgz", + "integrity": "sha512-YMyr2S2heMrWHRyECknjHeejlZl5exUSv9nD1gTejAT13fSf0PqIRydZ9ZuoglCLBg55AeehypR2zLIBu/9kHQ==", "dev": true, "requires": { - "@asyncapi/parser": "^3.0.15", + "@asyncapi/parser": "^3.1.0", "@types/json-schema": "^7.0.11", "avsc": "^5.7.6" } }, "@asyncapi/parser": { - "version": "3.0.15", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.0.15.tgz", - "integrity": "sha512-tP4O6c9jM8pKimg8kw3+/SdPAKJQWPmYozO6ZFJB5ziVtsr3Z8Qe06V13QcBOg4LzIWAwontyG5lZ5jnyvuDPQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.1.0.tgz", + "integrity": "sha512-rUd+fsPRE68o+F3gLqk7OaBj5J5VgBiLk9eJBGEXolNmKbVd45mxJm2aBpMkphQEmYHuBvxZyiNYlSCyr1D2fA==", "dev": true, "requires": { - "@asyncapi/specs": "^6.6.0", + "@asyncapi/specs": "^6.7.1", "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", "@stoplight/json": "^3.20.2", "@stoplight/json-ref-readers": "^1.2.2", @@ -13644,12 +13644,12 @@ } }, "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, "brorand": { @@ -15420,9 +15420,9 @@ } }, "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "requires": { "to-regex-range": "^5.0.1" diff --git a/package.json b/package.json index 3a12c916f..92d8bfc21 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/parser", - "version": "3.0.16", + "version": "3.1.0", "description": "JavaScript AsyncAPI parser.", "bugs": { "url": "https://github.com/asyncapi/parser-js/issues" @@ -62,7 +62,7 @@ "node-fetch": "2.6.7" }, "devDependencies": { - "@asyncapi/avro-schema-parser": "^3.0.23", + "@asyncapi/avro-schema-parser": "^3.0.24", "@jest/types": "^29.0.2", "@swc/core": "^1.2.248", "@swc/jest": "^0.2.22", diff --git a/src/ruleset/v2/ruleset.ts b/src/ruleset/v2/ruleset.ts index bbd3a65af..7e80f89f6 100644 --- a/src/ruleset/v2/ruleset.ts +++ b/src/ruleset/v2/ruleset.ts @@ -192,6 +192,7 @@ export const v2CoreRuleset = { export const v2SchemasRuleset = (parser: Parser) => { return { description: 'Schemas AsyncAPI 2.x.x ruleset.', + formats: AsyncAPIFormats.filterByMajorVersions(['2']).formats(), rules: { 'asyncapi2-schemas': asyncApi2SchemaParserRule(parser), 'asyncapi2-schema-default': { diff --git a/test/validate.spec.ts b/test/validate.spec.ts index 60b85730a..5a5ab00ad 100644 --- a/test/validate.spec.ts +++ b/test/validate.spec.ts @@ -1,3 +1,4 @@ +import { AsyncAPIDocument } from '../src/models/v3/asyncapi'; import { Parser } from '../src/parser'; import { hasErrorDiagnostic, hasWarningDiagnostic } from '../src/utils'; @@ -91,7 +92,7 @@ describe('validate()', function() { } }; const { document, diagnostics } = await parser.parse(documentRaw, { validateOptions: { allowedSeverity: { warning: false } } }); - console.log(diagnostics); expect(diagnostics).toHaveLength(0); + expect(document).toBeInstanceOf(AsyncAPIDocument); }); });