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

HTML generation of message with protobuf schema does not work #518

Closed
mfroberg opened this issue Jan 31, 2024 · 3 comments
Closed

HTML generation of message with protobuf schema does not work #518

mfroberg opened this issue Jan 31, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@mfroberg
Copy link

Describe the bug

I have an Async API v3 document where the message schema is Protobuf. The generator fails to produce an HTML output and terminates with an error.

How to Reproduce

Use the following Async-api document

asyncapi: 3.0.0
info:
  title: 'Hello, Glee!'
  version: 0.1.0
servers:
  websockets:
    host: '0.0.0.0:3000'
    protocol: ws
channels:
  hello:
    address: hello
    messages:
      hello:
        $ref: '#/components/messages/hello'
operations:
  onHello:
    action: receive
    channel:
      $ref: '#/channels/hello'
components:
  messages:
    hello:
      payload:
        schemaFormat: application/vnd.google.protobuf;version=3
        schema: |
          message Hello {
            optional string name = 1;
          }

Running AsyncAPI CLI v1.4.11 ...

asyncapi generate fromTemplate https://github.com/asyncapi/html-template ./asyncapi-protobuf.yaml

... produces the following error:

SyntaxError: Unexpected token '<', "
<!DOCTYPE "... is not valid JSON

Expected behavior

Is to produce an HTML file representation similar to Async API Studio.

Please let me know if you need any more information. Thanks!

@mfroberg mfroberg added the bug Something isn't working label Jan 31, 2024
Copy link

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@derberg
Copy link
Member

derberg commented Mar 26, 2024

@mfroberg can you please try again with CLI 1.7.3 ?
also please best use htmp-template published to npm, so instead of https://github.com/asyncapi/html-template refer to template as @asyncapi/html-template and best, to use its specific versions to avoid surprises with new versions @asyncapi/[email protected]

@derberg
Copy link
Member

derberg commented Apr 10, 2024

looks like solved, no response

feel free to open new issue (hard to followup with notifications for closed issues) if there are some problems

@derberg derberg closed this as completed Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants