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

feat: asyncapi specification visualization integration #2898

Merged
merged 40 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
4ad6eb7
.
AceTheCreator Jan 31, 2024
f5bab9e
Merge branch 'master' of https://github.com/AceTheCreator/website
AceTheCreator Mar 15, 2024
8d29596
Merge branch 'master' of https://github.com/AceTheCreator/website
AceTheCreator Apr 18, 2024
1930b68
adding schyma package
AceTheCreator Apr 22, 2024
6200f53
Merge branch 'master' of https://github.com/AceTheCreator/website
AceTheCreator Apr 22, 2024
a05f1f2
adding schyma for schema visualization
AceTheCreator Apr 22, 2024
8575e33
schema update
AceTheCreator Apr 22, 2024
fc1800e
Merge branch 'master' into schyma-package
quetzalliwrites May 9, 2024
a5f9b81
bumped schyma version
AceTheCreator May 17, 2024
b0c68e0
added visualizer to docs layout
AceTheCreator May 17, 2024
6d1bf78
properly rendering visualizer
AceTheCreator May 17, 2024
ebd212f
Merge branch 'master' into schyma-package
AceTheCreator May 17, 2024
d360965
Merge branch 'master' into schyma-package
quetzalliwrites May 18, 2024
95fef31
Merge branch 'master' into schyma-package
quetzalliwrites May 21, 2024
20e3cdf
added dos menu to explorer view
AceTheCreator May 21, 2024
d05540a
added explorer to bucket list
AceTheCreator May 21, 2024
30689b0
bumped schema version
AceTheCreator May 21, 2024
1dba92d
fix
AceTheCreator May 21, 2024
4a6d316
Merge branch 'master' into schyma-package
AceTheCreator May 22, 2024
1d65720
Merge branch 'master' of https://github.com/AceTheCreator/website int…
AceTheCreator May 29, 2024
f595309
updating branch to meet master branch
AceTheCreator May 29, 2024
3cb53ec
removed unused code
AceTheCreator May 29, 2024
6e2d4a1
fix type failure when passing schema
AceTheCreator May 29, 2024
f00a2b4
.
AceTheCreator May 29, 2024
5412403
fixed lint error
AceTheCreator May 29, 2024
f5954b6
Merge branch 'master' into schyma-package
AceTheCreator Jun 4, 2024
b48560d
added docsnavwrapper component
AceTheCreator Jun 12, 2024
5f6322a
Merge branch 'master' into schyma-package
AceTheCreator Jun 12, 2024
06845d3
Merge branch 'schyma-package' of https://github.com/AceTheCreator/web…
AceTheCreator Jun 12, 2024
b5f7874
fixed lint error
AceTheCreator Jun 12, 2024
07246c9
Trigger Lighthouse
akshatnema Jun 14, 2024
6dc4f9c
Merge branch 'master' into schyma-package
AceTheCreator Jun 18, 2024
e1c30cc
Merge branch 'master' into schyma-package
AceTheCreator Jun 21, 2024
46a1060
added metatag to the visualizer component
AceTheCreator Jun 21, 2024
ed128d6
type name change
AceTheCreator Jun 21, 2024
20edc50
Merge branch 'master' of https://github.com/AceTheCreator/website int…
AceTheCreator Jul 8, 2024
a59c172
added suggested
AceTheCreator Jul 8, 2024
838f249
.
AceTheCreator Jul 8, 2024
0cd60c6
Merge branch 'master' into schyma-package
akshatnema Jul 9, 2024
7c9a1ae
Merge branch 'master' into schyma-package
akshatnema Jul 9, 2024
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 components/MDX.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import Figure from '../components/Figure'
import Profile from '../components/Profile'
import GeneratorInstallation from '../components/GeneratorInstallation'
import NewsletterSubscribe from '../components/NewsletterSubscribe'
import { DocsCards } from '../components/docs/DocsCards'
import { DocsCards } from '../components/docs/DocsCards';
import Visualizer from "./docs/Visualizer";

let mermaidInitialized = false;
initializeMermaid();
Expand Down Expand Up @@ -75,6 +76,7 @@ export function getMDXComponents() {
Column,
Figure,
DocsCards,
Visualizer,
GeneratorInstallation,
NewsletterSubscribe,
TwitterTimelineEmbed,
Expand Down
12 changes: 12 additions & 0 deletions components/docs/Visualizer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react'
import Schyma from 'schyma';
import 'schyma/dist/esm/style.css'
import schema from '../../config/3.0.0.json';

function Visualizer() {
return (
<Schyma title="AsyncAPI" description="The AsyncAPI Specification defines a set of fields that can be used in an AsyncAPI document to describe an application's API. The document may reference other files for additional details or shared fields, but it is typically a single, primary document that encapsulates the API description." schema={schema} />
)
}

export default Visualizer
24 changes: 23 additions & 1 deletion components/layout/DocsLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ export default function DocsLayout({ post, navItems = {}, children }) {

const [showMenu, setShowMenu] = useState(false);
const navigation = posts['docsTree'];

if (router.pathname.includes('v3.0.0-explorer')) {
return <article className="">
{children}
</article>
}
return (
<DocsContext.Provider value={{ post, navItems }}>
<div className="bg-white px-4 sm:px-6 lg:px-8 w-full xl:max-w-7xl xl:mx-auto">
Expand Down Expand Up @@ -180,6 +184,24 @@ export default function DocsLayout({ post, navItems = {}, children }) {
</Link>
.
</div>
<div>
<span className="text-sm font-sans antialiased text-gray-800">
Want to interactively navigate the new v3.0.0?&nbsp;
</span>
<span className="text-sm font-sans antialiased text-gray-800">
Check&nbsp;
<Link href="/spec-json-schema">
<a
target="_blank"
rel="noopener noreferrer"
className={`cursor-pointer font-body text-sm leading-6 underline font-medium text-secondary-500 hover:text-secondary-600 focus:outline-none focus:text-gray-900 transition ease-in-out duration-150`}
>
Version 3 visualizer
</a>
</Link>
.
</span>
</div>
<div>
<span className="text-sm font-sans antialiased text-gray-800">
Interested in release notes of other versions of the
Expand Down
2 changes: 1 addition & 1 deletion components/navigation/EventPostItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function EventPostItem({ post, className, id }) {
type = 'WORKSHOP';
}

const defaultCover = '/img/homepage/confBlurBg.webp';
const defaultCover = 'https://github.com/asyncapi/community/assets/40604284/01c2b8de-fa5c-44dd-81a5-70cb96df4813';
let active = true;
let postDate = moment(post.date); // Convert post.date to a moment object if necessary

Expand Down
Loading
Loading