+
diff --git a/library/src/containers/AsyncApi/Standalone.tsx b/library/src/containers/AsyncApi/Standalone.tsx
index 9c5cc3c8e..b4ac3665a 100644
--- a/library/src/containers/AsyncApi/Standalone.tsx
+++ b/library/src/containers/AsyncApi/Standalone.tsx
@@ -84,13 +84,7 @@ class AsyncApiComponent extends Component
{
);
}
- return (
-
- );
+ return ;
}
private updateState(schema: PropsSchema) {
diff --git a/library/src/containers/Error/Error.tsx b/library/src/containers/Error/Error.tsx
index eba833efa..e22618ea3 100644
--- a/library/src/containers/Error/Error.tsx
+++ b/library/src/containers/Error/Error.tsx
@@ -15,7 +15,10 @@ const renderErrors = (errors: ValidationError[]): React.ReactNode => {
}
return (
- {`line ${singleError?.location?.startLine + singleError?.location?.startOffset}:`}
+ {(singleError?.location?.startLine ??
+ singleError?.location?.startOffset) && (
+ {`line ${singleError?.location?.startLine + singleError?.location?.startOffset}:`}
+ )}
{singleError.title}
diff --git a/library/src/types.ts b/library/src/types.ts
index c1d52ae4c..9f58864e2 100644
--- a/library/src/types.ts
+++ b/library/src/types.ts
@@ -44,7 +44,7 @@ export interface MessageExample {
export interface ValidationError {
title: string;
- location: {
+ location?: {
jsonPointer: string;
startLine: number;
startColumn: number;
diff --git a/package-lock.json b/package-lock.json
index 2037cabe7..957d2b2ac 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -36,17 +36,18 @@
},
"library": {
"name": "@asyncapi/react-component",
- "version": "2.4.3",
+ "version": "2.5.0",
"license": "Apache-2.0",
"dependencies": {
"@asyncapi/avro-schema-parser": "^3.0.24",
"@asyncapi/openapi-schema-parser": "^3.0.24",
"@asyncapi/parser": "^3.3.0",
- "@asyncapi/protobuf-schema-parser": "^3.2.14",
+ "@asyncapi/protobuf-schema-parser": "^3.3.0",
"highlight.js": "^10.7.2",
"isomorphic-dompurify": "^2.14.0",
"marked": "^4.0.14",
"openapi-sampler": "^1.2.1",
+ "react-error-boundary": "^4.1.2",
"use-resize-observer": "^9.1.0"
},
"devDependencies": {
@@ -190,9 +191,10 @@
}
},
"node_modules/@asyncapi/parser": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.3.0.tgz",
- "integrity": "sha512-IqBeDU/YxiHP/ySPYR5ayT/EE2ad9V75v8lhcA2ZowRDKh1YvNJaDwTpJjmRuggg8328uSDc9x/YEy6KgRgcgw==",
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-3.4.0.tgz",
+ "integrity": "sha512-Sxn74oHiZSU6+cVeZy62iPZMFMvKp4jupMFHelSICCMw1qELmUHPvuZSr+ZHDmNGgHcEpzJM5HN02kR7T4g+PQ==",
+ "license": "Apache-2.0",
"dependencies": {
"@asyncapi/specs": "^6.8.0",
"@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0",
@@ -211,18 +213,22 @@
"ajv-formats": "^2.1.1",
"avsc": "^5.7.5",
"js-yaml": "^4.1.0",
- "jsonpath-plus": "^7.2.0",
+ "jsonpath-plus": "^10.0.0",
"node-fetch": "2.6.7"
}
},
"node_modules/@asyncapi/protobuf-schema-parser": {
- "version": "3.2.14",
- "resolved": "https://registry.npmjs.org/@asyncapi/protobuf-schema-parser/-/protobuf-schema-parser-3.2.14.tgz",
- "integrity": "sha512-7v64Jxhz2IBfaQECUhfwuLRMFQTysvmqtvT+Esgd9NooIPRnkEzgCbBnC25oGjzSB6Sju28G406lQpO15HHaEw==",
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/@asyncapi/protobuf-schema-parser/-/protobuf-schema-parser-3.3.0.tgz",
+ "integrity": "sha512-KQYt/FQQxHj6s6clObl1zzWqsZSH1McK9xw9egoELCY1knN/mzDR++A5cKXQAf8FqKVuw410Gbvkw51e1N8m3w==",
+ "license": "Apache-2.0",
"dependencies": {
- "@asyncapi/parser": "^3.1.0",
- "@types/protocol-buffers-schema": "^3.4.1",
- "protobufjs": "^7.2.6"
+ "@asyncapi/parser": "^3.4.0",
+ "@types/protocol-buffers-schema": "^3.4.3",
+ "protobufjs": "^7.4.0"
+ },
+ "engines": {
+ "node": ">=18"
}
},
"node_modules/@asyncapi/react-component": {
@@ -3071,10 +3077,23 @@
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
+ "node_modules/@jsep-plugin/assignment": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/@jsep-plugin/assignment/-/assignment-1.3.0.tgz",
+ "integrity": "sha512-VVgV+CXrhbMI3aSusQyclHkenWSAm95WaiKrMxRFam3JSUiIaQjoMIw2sEs/OX4XifnqeQUN4DYbJjlA8EfktQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 10.16.0"
+ },
+ "peerDependencies": {
+ "jsep": "^0.4.0||^1.0.0"
+ }
+ },
"node_modules/@jsep-plugin/regex": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.0.3.tgz",
- "integrity": "sha512-XfZgry4DwEZvSFtS/6Y+R48D7qJYJK6R9/yJFyUFHCIUMEEHuJ4X95TDgJp5QkmzfLYvapMPzskV5HpIDrREug==",
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.0.4.tgz",
+ "integrity": "sha512-q7qL4Mgjs1vByCaTnDFcBnV9HS7GVPJX5vyVoCgZHNSC9rjwIlmbXG5sUuorR5ndfHAIlJ8pVStxvjXHbNvtUg==",
+ "license": "MIT",
"engines": {
"node": ">= 10.16.0"
},
@@ -4436,27 +4455,32 @@
"node_modules/@protobufjs/aspromise": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
- "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ=="
+ "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==",
+ "license": "BSD-3-Clause"
},
"node_modules/@protobufjs/base64": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz",
- "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg=="
+ "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==",
+ "license": "BSD-3-Clause"
},
"node_modules/@protobufjs/codegen": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz",
- "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg=="
+ "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==",
+ "license": "BSD-3-Clause"
},
"node_modules/@protobufjs/eventemitter": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz",
- "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q=="
+ "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==",
+ "license": "BSD-3-Clause"
},
"node_modules/@protobufjs/fetch": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz",
"integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==",
+ "license": "BSD-3-Clause",
"dependencies": {
"@protobufjs/aspromise": "^1.1.1",
"@protobufjs/inquire": "^1.1.0"
@@ -4465,27 +4489,32 @@
"node_modules/@protobufjs/float": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz",
- "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ=="
+ "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==",
+ "license": "BSD-3-Clause"
},
"node_modules/@protobufjs/inquire": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz",
- "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q=="
+ "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==",
+ "license": "BSD-3-Clause"
},
"node_modules/@protobufjs/path": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz",
- "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA=="
+ "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==",
+ "license": "BSD-3-Clause"
},
"node_modules/@protobufjs/pool": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz",
- "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw=="
+ "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==",
+ "license": "BSD-3-Clause"
},
"node_modules/@protobufjs/utf8": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
- "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw=="
+ "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==",
+ "license": "BSD-3-Clause"
},
"node_modules/@rushstack/eslint-patch": {
"version": "1.7.2",
@@ -15550,9 +15579,10 @@
}
},
"node_modules/jsep": {
- "version": "1.3.8",
- "resolved": "https://registry.npmjs.org/jsep/-/jsep-1.3.8.tgz",
- "integrity": "sha512-qofGylTGgYj9gZFsHuyWAN4jr35eJ66qJCK4eKDnldohuUoQFbU3iZn2zjvEbd9wOAhP9Wx5DsAAduTyE1PSWQ==",
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/jsep/-/jsep-1.4.0.tgz",
+ "integrity": "sha512-B7qPcEVE3NVkmSJbaYxvv4cHkVW7DQsZz13pUMrfS8z8Q/BuShN+gcTXrUlPiGqM2/t/EEaI030bpxMqY8gMlw==",
+ "license": "MIT",
"engines": {
"node": ">= 10.16.0"
}
@@ -15660,11 +15690,21 @@
]
},
"node_modules/jsonpath-plus": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-7.2.0.tgz",
- "integrity": "sha512-zBfiUPM5nD0YZSBT/o/fbCUlCcepMIdP0CJZxM1+KgA4f2T206f6VAg9e7mX35+KlMaIc5qXW34f3BnwJ3w+RA==",
+ "version": "10.2.0",
+ "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.2.0.tgz",
+ "integrity": "sha512-T9V+8iNYKFL2n2rF+w02LBOT2JjDnTjioaNFrxRy0Bv1y/hNsqR/EBK7Ojy2ythRHwmz2cRIls+9JitQGZC/sw==",
+ "license": "MIT",
+ "dependencies": {
+ "@jsep-plugin/assignment": "^1.3.0",
+ "@jsep-plugin/regex": "^1.0.4",
+ "jsep": "^1.4.0"
+ },
+ "bin": {
+ "jsonpath": "bin/jsonpath-cli.js",
+ "jsonpath-plus": "bin/jsonpath-cli.js"
+ },
"engines": {
- "node": ">=12.0.0"
+ "node": ">=18.0.0"
}
},
"node_modules/jsonpointer": {
@@ -16814,7 +16854,8 @@
"node_modules/long": {
"version": "5.2.3",
"resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz",
- "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q=="
+ "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==",
+ "license": "Apache-2.0"
},
"node_modules/loose-envify": {
"version": "1.4.0",
@@ -21686,10 +21727,11 @@
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
},
"node_modules/protobufjs": {
- "version": "7.2.6",
- "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.6.tgz",
- "integrity": "sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw==",
+ "version": "7.4.0",
+ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.4.0.tgz",
+ "integrity": "sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==",
"hasInstallScript": true,
+ "license": "BSD-3-Clause",
"dependencies": {
"@protobufjs/aspromise": "^1.1.2",
"@protobufjs/base64": "^1.1.2",
@@ -21709,13 +21751,20 @@
}
},
"node_modules/protobufjs/node_modules/@types/node": {
- "version": "20.11.27",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.27.tgz",
- "integrity": "sha512-qyUZfMnCg1KEz57r7pzFtSGt49f6RPkPBis3Vo4PbS7roQEDn22hiHzl/Lo1q4i4hDEgBJmBF/NTNg2XR0HbFg==",
+ "version": "22.10.1",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.1.tgz",
+ "integrity": "sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==",
+ "license": "MIT",
"dependencies": {
- "undici-types": "~5.26.4"
+ "undici-types": "~6.20.0"
}
},
+ "node_modules/protobufjs/node_modules/undici-types": {
+ "version": "6.20.0",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz",
+ "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==",
+ "license": "MIT"
+ },
"node_modules/protocols": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/protocols/-/protocols-2.0.1.tgz",
@@ -22001,6 +22050,18 @@
"loose-envify": "^1.1.0"
}
},
+ "node_modules/react-error-boundary": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-4.1.2.tgz",
+ "integrity": "sha512-GQDxZ5Jd+Aq/qUxbCm1UtzmL/s++V7zKgE8yMktJiCQXCCFZnMZh9ng+6/Ne6PjNSXH0L9CjeOEREfRnq6Duag==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.12.5"
+ },
+ "peerDependencies": {
+ "react": ">=16.13.1"
+ }
+ },
"node_modules/react-is": {
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
@@ -26234,7 +26295,8 @@
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
- "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="
+ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
+ "dev": true
},
"node_modules/unicode-canonical-property-names-ecmascript": {
"version": "2.0.0",
@@ -27671,10 +27733,10 @@
},
"web-component": {
"name": "@asyncapi/web-component",
- "version": "2.4.3",
+ "version": "2.5.0",
"license": "Apache-2.0",
"dependencies": {
- "@asyncapi/react-component": "^2.4.3",
+ "@asyncapi/react-component": "^2.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"web-react-components": "^1.4.2"
diff --git a/web-component/package.json b/web-component/package.json
index b0f0f1420..cff0a6813 100644
--- a/web-component/package.json
+++ b/web-component/package.json
@@ -1,6 +1,6 @@
{
"name": "@asyncapi/web-component",
- "version": "2.4.3",
+ "version": "2.5.0",
"private": false,
"description": "A web component for AsyncAPI specification. Based on @asyncapi/react-component.",
"repository": {
@@ -44,7 +44,7 @@
"install:reactcomp": "chmod +x ./bump-react-comp.sh && ./bump-react-comp.sh"
},
"dependencies": {
- "@asyncapi/react-component": "^2.4.3",
+ "@asyncapi/react-component": "^2.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"web-react-components": "^1.4.2"