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

Generated config .adoc file is poorly formatted when a config blueprint item Javadoc contains HTML #8793

Open
tjquinno opened this issue May 23, 2024 · 1 comment
Assignees
Labels
4.x Version 4.x bug Something isn't working config-metadata P3
Projects

Comments

@tjquinno
Copy link
Member

tjquinno commented May 23, 2024

Environment Details

  • Helidon Version: 4.x
  • Helidon SE or Helidon MP
  • JDK version:
  • OS:
  • Docker version (if applicable):

Problem Description

If an @Option.Configured item has HTML in its JavaDoc, the config table in the generated .adoc file contains the same HTML without any formatting directives to render it correctly.

A possible brute-force fix (as well as suggestions for better fixes) is described here https://discuss.asciidoctor.org/how-to-include-a-snippet-of-html-tp5293p5294.html

Briefly, if the .adoc generator could detect the HTML it could perhaps insert the AsciiDoctor [pass] directive in front of the HTML before copying it to the generated .adoc file. (That's a possible brute force fix. There might be better ones.)

For example, the generated text for AccessLogConfigBlueprint contains the following under description. The HTML is not rendered.

The format for log entries (similar to the Apache LogFormat). <table class="config"> <caption>Log format elements</caption> <tr> <td>%h</td> <td>IP address of the remote host</td> <td>HostLogEntry</td> </tr> <tr> <td>%l</td> <td>The client identity. This is always undefined in Helidon.</td> <td>UserIdLogEntry</td> </tr> <tr> <td>%u</td> <td>User ID as asserted by Helidon Security.</td> <td>UserLogEntry</td> </tr> <tr> <td>%t</td> <td>The timestamp</td> <td>TimestampLogEntry</td> </tr> <tr> <td>%r</td> <td>The request line ("GET /favicon.ico HTTP/1.0")</td> <td>RequestLineLogEntry</td> </tr> <tr> <td>%s</td> <td>The status code returned to the client</td> <td>StatusLogEntry</td> </tr> <tr> <td>%b</td> <td>The entity size in bytes</td> <td>SizeLogEntry</td> </tr> <tr> <td>%D</td> <td>The time taken in microseconds (start of request until last byte written)</td> <td>TimeTakenLogEntry</td> </tr> <tr> <td>%T</td> <td>The time taken in seconds (start of request until last byte written), integer</td> <td>TimeTakenLogEntry</td> </tr> <tr> <td>%{header-name}i</td> <td>Value of header header-name</td> <td>HeaderLogEntry</td> </tr> </table>

Steps to reproduce

Navigate to this doc page https://helidon.io/docs/v4/se/webserver#_configuration_options_3 and look at the description for the format key.

@tjquinno tjquinno added bug Something isn't working 4.x Version 4.x config-metadata labels May 23, 2024
@tjquinno tjquinno added this to Triage in Backlog via automation May 23, 2024
@tjquinno tjquinno changed the title Config metadata poorly formatted when config blueprint item Javadoc contains HTML Generated config .adoc file is poorly formatted when a config blueprint item Javadoc contains HTML May 23, 2024
@m0mus m0mus added the P3 label May 30, 2024
@m0mus m0mus moved this from Triage to Sprint Scope in Backlog May 30, 2024
@tomas-langer
Copy link
Member

Code responsible for generating the documentation is not part of Helidon repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x bug Something isn't working config-metadata P3
Projects
Backlog
  
Sprint Scope
Development

No branches or pull requests

4 participants