Skip to content

Commit

Permalink
feat: support AsyncAPI 2.5.0 (#647)
Browse files Browse the repository at this point in the history
  • Loading branch information
magicmatatjahu authored Sep 29, 2022
1 parent 00f6dc8 commit 836558c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 18 deletions.
34 changes: 19 additions & 15 deletions library/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"dependencies": {
"@asyncapi/avro-schema-parser": "^0.3.0",
"@asyncapi/openapi-schema-parser": "^2.0.0",
"@asyncapi/parser": "^1.15.0",
"@asyncapi/parser": "^1.17.0",
"highlight.js": "^10.7.2",
"isomorphic-dompurify": "^0.13.0",
"marked": "^4.0.14",
Expand Down
10 changes: 9 additions & 1 deletion library/src/containers/Servers/Server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { Server as ServerType } from '@asyncapi/parser';

import { Security } from './Security';
import { Markdown, Schema, Bindings } from '../../components';
import { Markdown, Schema, Bindings, Tags, Extensions } from '../../components';

import { useConfig } from '../../contexts';
import { CommonHelpers, SchemaHelpers } from '../../helpers';
Expand Down Expand Up @@ -85,6 +85,14 @@ export const Server: React.FunctionComponent<Props> = ({
/>
</div>
)}

<Extensions name="Server Extensions" item={server} />

{typeof server.hasTags === 'function' && server.hasTags() && (
<div className="mt-2">
<Tags tags={server.tags()} />
</div>
)}
</div>
</div>

Expand Down
4 changes: 3 additions & 1 deletion playground/src/specs/streetlights.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const streetlights = `asyncapi: '2.4.0'
export const streetlights = `asyncapi: '2.5.0'
id: 'urn:com:smartylighting:streetlights:server'
info:
title: Streetlights API
Expand Down Expand Up @@ -76,6 +76,8 @@ servers:
enum:
- '1883'
- '8883'
tags:
- name: 'env:production'
security:
- apiKey: []
- supportedOauthFlows:
Expand Down

0 comments on commit 836558c

Please sign in to comment.