OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.69k stars 6.55k forks source link

[BUG] Generated HTML in javadoc is invalid #19934

Open beikov opened 6 days ago

beikov commented 6 days ago

Bug Report Checklist

Description

The generator creates source files with javadoc that contains invalid HTML.


  /**
   * Add custom labels to a self-hosted runner for an organization
   * Adds custom labels to a self-hosted runner configured in an organization.  Authenticated users must have admin access to the organization to use this endpoint.  OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.
   * @param org The organization name. The name is not case sensitive. (required)
   * @param runnerId Unique identifier of the self-hosted runner. (required)
   * @param actionsAddCustomLabelsToSelfHostedRunnerForOrgRequest  (required)
   * @return ApiResponse<Object>
   * @throws ApiException if fails to make API call
   * @http.response.details
     <table summary="Response Details" border="1">
       <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
       <tr><td> 200 </td><td>  </td><td>  -  </td></tr>
       <tr><td> 404 </td><td>  </td><td>  -  </td></tr>
       <tr><td> 422 </td><td>  </td><td>  -  </td></tr>
     </table>
   * API method documentation
   * @see <a href="https://docs.github.com/rest/actions/self-hosted-runners#add-custom-labels-to-a-self-hosted-runner-for-an-organization">Add custom labels to a self-hosted runner for an organization Documentation</a>
   */
  public ApiResponse<Object> actionsAddCustomLabelsToSelfHostedRunnerForOrgWithHttpInfo(String org, Integer runnerId, ActionsAddCustomLabelsToSelfHostedRunnerForOrgRequest actionsAddCustomLabelsToSelfHostedRunnerForOrgRequest) throws ApiException { ... }

The unknown javadoc tag @http.response.details contains invalid HTML. The javadoc tool complains about the summary attribute. According to Mozilla documentation this attribute is deprecated and people should rather use the <caption> element.

openapi-generator version

7.10.0-SNAPSHOT

OpenAPI declaration file content or url

e.g. https://raw.githubusercontent.com/github/rest-api-description/108f3b249fe3c0f0889a40737552c8d373bbfdc4/descriptions-next/api.github.com/api.github.com.json

Generation Details

Use e.g. jersey3 and jackson.

Steps to reproduce

Just try to create the client from the spec.

Suggest a fix

Change the templates to generate tables with a summary in a <caption> tag instead of summary attribute.

jasonjyu commented 5 days ago

I would like to work this issue.