OpenAPITools / OpenAPITools/openapi-generator

[BUG] Methods are without @param JSDOC in typescript-fetch

Open
#8,259 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Description

Method in generated Resources.ts via typescript-fetch does not have the same JSDocs, params are missing in non Raw version of function.

/**
     * Method operate on cached values.
     * @param {{ [key: string]: Array<string>; }} [body] Case sensitive.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof KeycloakResourceApiInterface
     */
    findAllUsersWithAllAttributesRaw(requestParameters: FindAllUsersWithAllAttributesRequest): Promise<runtime.ApiResponse<Array<UserInfo>>>;

    /**
     * Method operate on cached values.
     */
    findAllUsersWithAllAttributes(requestParameters: FindAllUsersWithAllAttributesRequest): Promise<Array<UserInfo>>;
openapi-generator version

opena-api-generator-cli 4.3.1 NPM

OpenAPI declaration file content or url
{
  "/api/utilities/keycloak/user-representations/findAllUsersWithAllAttributes": {
    "post": {
      "tags": ["KeycloakResource"],
      "description": "Method operate on cached values.",
      "operationId": "findAllUsersWithAllAttributes",
      "consumes": ["application/json", "application/xml"],
      "produces": ["application/json", "application/xml"],
      "parameters": [
        {
          "name": "body",
          "required": false,
          "in": "body",
          "schema": {
            "description": "Case sensitive.",
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "description": "Case sensitive."
        }
      ],
      "responses": {
        "201": {
          "schema": {
            "description": "Users with all roles.",
            "type": "array",
            "items": {
              "$ref": "#/definitions/UserInfo"
            }
          }
        },
        "description": "Users with all roles."
      }
    }
  }
}

Generation Details

Intelisense is not showing params in nonRaw function.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the supplied OpenAPI declaration and the typescript-fetch generator version 4.3.1, then inspect the generated Resources.ts. Compare JSDoc for the Raw and non-Raw methods; the work is done when parameter documentation appears in the non-Raw method and the generated output is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.