Skip to content

[BUG][R] model.mustache incorrect links to R help pages #4428

@LiNk-NY

Description

@LiNk-NY

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • What's the version of OpenAPI Generator used?
  • Have you search for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Bounty to sponsor the fix (example)
Description

The mustache template does too much and it would help to remove the :{{complexType}} insert and leave the the spaces out of the curly brace after the square bracket so that you have:

#' @field {{baseName}} {{title}} {{^isPrimitiveType}} \link[{{packageName}}]{{{/isPrimitiveType}} {{#isContainer}} {{#isListContainer}}list({{#items}}{{dataType}}{{/items}}){{/isListContainer}}{{#isMapContainer}}named list({{#items}}{{dataType}}{{/items}}){{/isMapContainer}} {{/isContainer}}{{^isContainer}}{{dataType}}{{/isContainer}} {{^isPrimitiveType}}} {{/isPrimitiveType}} {{^required}}[optional]{{/required}}

In this block of code:

{{#vars}}
#' @field {{baseName}} {{title}} {{^isPrimitiveType}} \link[{{packageName}}:{{complexType}}]{ {{/isPrimitiveType}} {{#isContainer}} {{#isListContainer}}list({{#items}}{{dataType}}{{/items}}){{/isListContainer}}{{#isMapContainer}}named list({{#items}}{{dataType}}{{/items}}){{/isMapContainer}} {{/isContainer}}{{^isContainer}}{{dataType}}{{/isContainer}} {{^isPrimitiveType}} } {{/isPrimitiveType}} {{^required}}[optional]{{/required}}
#'
{{/vars}}

openapi-generator version

4.2.1-SNAPSHOT

OpenAPI declaration file content or url

https://raw.githubusercontent.com/HumanCellAtlas/matrix-service/master/config/matrix-api.yml

Command line used for generation

See this gist:
https://gist.github.com/LiNk-NY/3a35d4a693e87e5c84ba430680752b96

Steps to reproduce

See gist above.

Related issues/PRs

Tangential issue:
#3367

Suggest a fix

I have not tested this as I was unable to run it locally. I kept getting errors when using the
openapi-generator-cli-4.2.0.jar file.

-#' @field op   \link[hcamatrixapi:v1_ComparisonFilterOperator]{  V1ComparisonFilterOperator  }  [optional]
+#' @field op   \link[hcamatrixapi]{V1ComparisonFilterOperator}  [optional]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions