Skip to content

Commit

Permalink
update template
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslagoni committed Sep 11, 2023
1 parent 0ca3c9d commit 3e73a9c
Show file tree
Hide file tree
Showing 5 changed files with 11,458 additions and 472 deletions.
17 changes: 6 additions & 11 deletions components/Operations.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function Operations({ asyncapi }) {
}
} else if (operation.isReceive()) {
if (operation.reply() !== undefined) {
type = 'response';
type = 'reply';
} else {
type = 'subscribe';
}
Expand Down Expand Up @@ -84,8 +84,8 @@ function Operation({ asyncapi, type, operation, channelName, channel }) { // NOS
case 'publish':
renderedType = 'PUB';
break;
case 'response':
renderedType = 'RESPONSE';
case 'reply':
renderedType = 'REPLY';
break;
case 'subscribe':
renderedType = 'SUB';
Expand Down Expand Up @@ -213,7 +213,6 @@ function OperationReply({ operation }) {
if (reply === undefined) {
return null;
}
const replyId = reply.id();
const explicitChannel = reply.channel();

let type;
Expand All @@ -229,9 +228,7 @@ function OperationReply({ operation }) {
{`${type} information`}
</Header>

{replyId && <ListItem>Operation reply ID: `{replyId}`</ListItem>}

{explicitChannel && <ListItem>{type} should be done to channel: `{reply.channel().address()}`</ListItem>}
{explicitChannel && <ListItem>{type} should be done to channel: `{explicitChannel.address()}`</ListItem>}

<OperationReplyAddress name="Operation reply address" reply={reply} />

Expand All @@ -258,7 +255,6 @@ function OperationReplyAddress({ reply }) {
if (address === undefined) {
return null;
}
const addressId = address.id();
const location = address.location();

return (
Expand All @@ -267,15 +263,14 @@ function OperationReplyAddress({ reply }) {
{'Operation reply address information'}
</Header>

{addressId && <ListItem>Operation reply address ID: `{addressId}`</ListItem>}
<ListItem>Operation reply address location: `{location}`</ListItem>

{address.hasDescription() && (
<Text newLines={2}>
{address.description()}
</Text>
)}

<ListItem>Operation reply address location: `{location}`</ListItem>

<Extensions name="Operation reply address extensions" item={address} />
</Text>
);
Expand Down
Loading

0 comments on commit 3e73a9c

Please sign in to comment.