-
Notifications
You must be signed in to change notification settings - Fork 2.3k
EditorPreviewAsyncAPI not rendered for AsyncAPI 3.x.x #5358
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
Comments
# [5.0.0-alpha.101](v5.0.0-alpha.100...v5.0.0-alpha.101) (2025-03-19) ### Bug Fixes * **editor-content-fixtures:** update Petstore to match SmartBear rules ([#5413](#5413)) ([6c097d2](6c097d2)) * **swagger-ui-adapter:** render AsyncAPI 3.x Descriptions ([#5358](#5358)) ([#5359](#5359)) ([3b2a512](3b2a512))
🎉 This issue has been resolved in version 5.0.0-alpha.101 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Can somebody confirm this is indeed solved in
|
@Rzepin can you confirm that this issue is still ongoing with release |
No, I can't. Issue faced by me was fixed in 5.0.0-alpha.101 Here's full working example: <!DOCTYPE html>
<html >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="SwaggerUIMultifold" />
<link rel="stylesheet" href="//unpkg.com/swagger-editor@5.0.0-alpha.101/dist/swagger-editor.css" />
</head>
<body style="margin:0; padding:0;">
<section id="swagger-ui"></section>
<script src="//unpkg.com/swagger-ui-dist@5.11.0/swagger-ui-bundle.js"></script>
<script src="//unpkg.com/swagger-ui-dist@5.11.0/swagger-ui-standalone-preset.js"></script>
<script>
ui = SwaggerUIBundle({});
// expose SwaggerUI React globally for SwaggerEditor to use
window.React = ui.React;
</script>
<script src="//unpkg.com/swagger-editor@5.0.0-alpha.101/dist/umd/swagger-editor.js"></script>
<script>
SwaggerUIBundle({
url: 'https://raw.githubusercontent.com/asyncapi/spec/refs/heads/master/examples/streetlights-kafka-asyncapi.yml',
dom_id: '#swagger-ui',
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset,
],
plugins: [
SwaggerEditor.plugins.EditorContentType,
SwaggerEditor.plugins.EditorPreviewAsyncAPI,
SwaggerEditor.plugins.EditorPreviewApiDesignSystems,
SwaggerEditor.plugins.SwaggerUIAdapter,
SwaggerUIBundle.plugins.DownloadUrl,
],
layout: 'StandaloneLayout',
});
</script>
</body>
</html> You can verify that above won't work after downgrading to 5.0.0-alpha.100 |
Q&A (please complete the following information)
Content & configuration
Example Swagger/OpenAPI definition:
e.g. https://raw.githubusercontent.com/asyncapi/spec/refs/heads/master/examples/streetlights-kafka-asyncapi.yml
Swagger-Editor configuration options:
Describe the bug you're encountering
BaseLayout
is renderingEditorPreviewAsyncAPI
using selector:selectIsContentTypeAsyncAPI2
altough component would be able to render AsyncAPI 3.x.x as well.To reproduce...
Expected behavior
Properly rendered definition with EditorPreviewAsyncAPI plugin.
Screenshots
Additional context or thoughts
Btw. current error details are a little bit misleading:
Maybe it should be addressed to be changed/improved. In my opinion it would be better to be less specific, but not suggest that only swagger/openapi is supported.
The text was updated successfully, but these errors were encountered: