Skip to content

Instantly share code, notes, and snippets.

@max-weis
Created January 25, 2022 08:03
Show Gist options
  • Save max-weis/05e71d511c8aa5b3a824ffa8d0943d74 to your computer and use it in GitHub Desktop.
Save max-weis/05e71d511c8aa5b3a824ffa8d0943d74 to your computer and use it in GitHub Desktop.
AsyncAPI Webcomponents Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<!-- Remove 'webcomponentsjs' if no support for older browsers is required -->
<script src="https://unpkg.com/@webcomponents/[email protected]/webcomponents-bundle.js"></script>
<script src="https://unpkg.com/@asyncapi/[email protected]/lib/asyncapi-web-component.js" defer></script>
<asyncapi-component
schemaUrl="https://raw.githubusercontent.com/max-weis/streetlights-asyncapi-demo/master/src/main/resources/streetlights.yaml"
schemaFetchOptions='{"method":"GET","mode":"cors"}'
cssImportPath="https://unpkg.com/@asyncapi/[email protected]/lib/styles/fiori.css">
</asyncapi-component>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment