Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[BUG] [Java] [html2] Response headers get '-' replaced with 'Minus' #6465

Closed
ilgrosso opened this issue May 28, 2020 · 3 comments · Fixed by #18685
Closed

[BUG] [Java] [html2] Response headers get '-' replaced with 'Minus' #6465

ilgrosso opened this issue May 28, 2020 · 3 comments · Fixed by #18685

Comments

@ilgrosso
Copy link

The following JSON excerpt:

"400" : {
            "description" : "An error occurred; HTTP status code can vary depending on the actual error: 400, 403, 404, 409, 412",
            "headers" : {
              "X-Application-Error-Code" : {
                "description" : "Error code",
                "schema" : {
                  "type" : "string"
                }
              },
              "X-Application-Error-Info" : {
                "description" : "Error message(s)",
                "schema" : {
                  "type" : "string"
                }
              }
            }

generates the following Response Headers, with html2:

image

@auto-labeler
Copy link

auto-labeler bot commented May 28, 2020

👍 Thanks for opening this issue!
🏷 I have applied any labels matching special text in your issue.

The team will review the labels and make any necessary changes.

@henkkasoft
Copy link

Any update for this?

@pbarnes-tibco
Copy link

this still occurs in 5.4.0 as well as 6.0.1. It can be worked around with a template change to the html2/index.mustache template, and specify the path to your template(s) with --templater-dir. In the 5.4.0 version of the template, it's line 491; change {{name}} here:

{{#headers}}
  <tr>
    <td>{{name}}</td>
    <td>{{#datatype}}{{dataType}}{{/datatype}}</td>
    <td>{{dataFormat}}</td>
    <td>{{description}}</td>
  </tr>
{{/headers}}

to {{baseName}}:

{{#headers}}
  <tr>
    <td>{{baseName}}</td>
    <td>{{#datatype}}{{dataType}}{{/datatype}}</td>
    <td>{{dataFormat}}</td>
    <td>{{description}}</td>
  </tr>
{{/headers}}

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants