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

fix: studio breaking when trying to generate code/document #804

Merged
merged 5 commits into from
Oct 11, 2023

Conversation

AceTheCreator
Copy link
Member

This PR fixes the following issue. #803

cc @fmvilas @Souvikns

@changeset-bot
Copy link

changeset-bot bot commented Oct 4, 2023

🦋 Changeset detected

Latest commit: 722e8f1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@asyncapi/studio Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented Oct 4, 2023

Deploy Preview for modest-rosalind-098b67 ready!

Name Link
🔨 Latest commit 722e8f1
🔍 Latest deploy log https://app.netlify.com/sites/modest-rosalind-098b67/deploys/652667d2ac65180008606f6e
😎 Deploy Preview https://deploy-preview-804--modest-rosalind-098b67.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Oct 4, 2023

Deploy Preview for asyncapi-studio-design-system ready!

Name Link
🔨 Latest commit 722e8f1
🔍 Latest deploy log https://app.netlify.com/sites/asyncapi-studio-design-system/deploys/652667d279096b0008f277d0
😎 Deploy Preview https://deploy-preview-804--asyncapi-studio-design-system.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -106,7 +106,7 @@ export const TemplateParametersSans: ForwardRefRenderFunction<TemplateParameters
const servers = document?.servers();
const availableServers: string[] = [];
Object.entries(servers || {}).forEach(([serverName, server]) => {
if (supportedProtocols.includes(server.protocol())) availableServers.push(serverName);
if (server.protocol && supportedProtocols.includes(server.protocol())) availableServers.push(serverName);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can it be that protocol is not a function? What is it instead? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, based on what I noticed during the iteration, some index of server in server.protocol is returning undefined

@fmvilas
Copy link
Member

fmvilas commented Oct 4, 2023

Also, if you plan to release a new version, please add a changeset: https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md

@AceTheCreator
Copy link
Member Author

Also, if you plan to release a new version, please add a changeset: https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md

Why should it be a new version if I'm just fixing a tiny bug 🤔

@KhudaDad414
Copy link
Member

@AceTheCreator it is a bug fix so it should release a patch version.

Copy link
Member

@KhudaDad414 KhudaDad414 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@AceTheCreator
Copy link
Member Author

@fmvilas, can you approve this?

@sonarcloud
Copy link

sonarcloud bot commented Oct 11, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@KhudaDad414
Copy link
Member

/rtm

@asyncapi-bot asyncapi-bot merged commit 9187c17 into asyncapi:master Oct 11, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants