Open derberg opened 2 months ago
Text labels: bounty/2024-Q3
, bounty/medium
, bounty/docs
First assignment to third-party contributors: 2024-06-21 00:00:00 UTC+12:00
End Of Life after: 2024-07-31 23:59:59 UTC-12:00
@asyncapi/bounty_team
@aeworxet @derberg I would like to work on this issue, Past doc PR: https://github.com/asyncapi/generator/pull/1061/files https://github.com/asyncapi/community/pull/1155/files Solution Step for the above issue:
To show List Channels of asyncapi document;
/*
* Here you can see example of complex operations.
* You can actually do whatever you want. It is important that the value returned from the function must be a string or a component.
*/
export function ListChannels({ channels, operationType = 'publish' }) {
const namesList = Object.entries(channels)
.map(([channelName, channel]) => {
if (
(operationType === 'publish' && channel.hasPublish()) ||
(operationType === 'subscribe' && channel.hasSubscribe())
) {
return `<li><strong>${channelName}</strong></li>`;
}
})
.filter(Boolean);
return `
<h2>
Channels that you can ${operationType} to
</h2>
<hr />
<br />
<div class="container mx-auto px-8">
<ul class="list-disc">${namesList.join('')}</ul>
</div>
`;
}
To show info, server of asyncapi document:
const ReadmeTemplate = ({ asyncapi }) => {
const { info, servers, } = asyncapi;
return (
<div>
<h1>{info.title}</h1>
<p>{info.description}</p>
<h2>Servers</h2>
<ul>
{Object.entries(servers).map(([name, server]) => (
<li key={name}>
<strong>{name}</strong>: {server.url} ({server.protocol})
</li>
))}
</ul>
</div>
);
};
This would be structure to show rendering of different component in React Engine thanks
@AayushSaini101 You are already assigned to https://github.com/asyncapi/community/issues/1268 and expected to work on https://github.com/asyncapi/cli/issues/337 (@Amzani will assign you when he comes back from vacation,) so the limit or two simultaneous issues is reached.
@Florence-Njeri as maintainer of docs in this repo will work on this issue
Complexity Level | Assignment Date (by GitHub) | Start Date (by BP Rules) | End Date (by BP Rules) | Draft PR Submission | Final PR Merge Start | Final PR Merge End |
---|---|---|---|---|---|---|
Medium | 2024-06-21 | 2024-07-01 | 2024-08-11 | 2024-07-14 | 2024-07-28 | 2024-08-11 |
What Dev Docs changes are you proposing?
File templates
and explain how to do the same in reactwe have at least comparizon from the perspective of "template for templates". So we see file templates in use in https://github.com/asyncapi/template-for-generator-templates/tree/nunjucks/template/schemas in times of nunjucks and then after conversion to react https://github.com/asyncapi/template-for-generator-templates/blob/master/template/schemas/schema.js
Code of Conduct