Skip to content

[Go] [Bug] Generated code case-ifies parameter name. #3462

@neilotoole

Description

@neilotoole
Description

My swagger file has a query param project_id. The generated code sends this as projectId.

Swagger-codegen version

master

Swagger declaration file content or url
post:
      summary: xxx
      description: |
      operationId: add_notification_target
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - name: project_id
          in: query
          description: XXX
          required: true
          type: integer
          format: int32

Results in Go code:

    queryParams.Add("projectId", a.Configuration.APIClient.ParameterToString(projectId, ""))
Suggest a Fix

We should not sanitize/caseify parameters.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions