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

The html on the preview uses a newer version of the generator tool than the one used in the "generate code/docs" section. #1031

Closed
ghuser opened this issue Mar 21, 2024 · 5 comments · Fixed by asyncapi/html-template#574
Labels
bug Something isn't working

Comments

@ghuser
Copy link

ghuser commented Mar 21, 2024

Describe the bug

Recently I have reported avro-schema-parser#240 that was fixed, and I can see the fix being reflected to studio.asyncapi.com.

However when I click on "Generate code/docs" and select the "html website" (with option singleFile enabled) the generated code does not include the fix.

How to Reproduce

Paste the document below into studio.asyncapi.com and see that the required option is presented in all r1,r2,r3 properties. This implies that the fix described in avro-schema-parser#240 has been applied.

asyncapi: 2.6.0
info:
  title: AsyncAPI
  version: 1.0.0
  description: AsyncAPI
channels:
  example:
    publish:
      message:
        $ref: '#/components/messages/example_message'
components:
  messages:
    example_message:
      name: example_event
      schemaFormat: application/vnd.apache.avro;version=1.9.0
      payload:
        type: record
        name: ParentRecord
        fields:
          - name: r1
            type:
              type: enum
              name: MyEnum
              symbols:
                - A
                - B
                - C
          - name: r2
            type: MyEnum
          - name: r3
            type: MyEnum

Now try the option: "Generate code/docs" -> "html website" (with option singleFile enabled). If you preview the generated html you will see that only r1 is presented as required. This means that the fix described in avro-schema-parser#240 has not been applied.

Expected behavior

The html in preview and the generated html should be the same.

@KhudaDad414
Copy link
Member

I think the problem is that the html-template's parser-js is not updated. I've put up a PR and let's see if that fixes the issue.

@ghuser
Copy link
Author

ghuser commented Mar 26, 2024

@KhudaDad414 The issue is still present on the exported html (using the example provided in this ticket). Is this change expected to be applied during the night (e.g. with automated redeploy)?

@KhudaDad414
Copy link
Member

@ghuser it will applied after we merge this PR: #1038

@ghuser
Copy link
Author

ghuser commented Mar 29, 2024

@ghuser it will applied after we merge this PR: #1038

@KhudaDad414 Though I see that the PR is merged on master, the issue is still there. Preview works. Exported html (single file) does not.

@ghuser
Copy link
Author

ghuser commented Apr 4, 2024

This issue has not yet been resolved. Please test the input content provided on the original comment. You will see that on the exported version of the page the required label appears only on the first field. This does not happen on the preview page.

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
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants