Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #10568
Closed
Open
Issue created Oct 09, 2021 by Administrator@rootContributor5 of 6 checklist items completed5/6 checklist items

[BUG] Rust client generator doubles type as &str&str for type:string; format:uuid parameter

Created by: Dema

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

rust generator generates &str&str type for api call arguments when they are both type: string and format:uuid

openapi-generator version

latest master

OpenAPI declaration file content or url
swagger: "2.0"
info:
  version: API 1.0.0
  title: StrStrBug
basePath: /api
paths:
  /api/v1/item/{id}:
    get:
      tags:
        - my-controller
      summary: Get Item by Id.
      operationId: getByIdUsingGET
      produces:
        - "*/*"
      parameters:
        - name: id
          in: path
          description: id
          required: true
          type: string
          format: uuid
      responses:
        "200":
          description: OK
Generation Details
Steps to reproduce

java -jar openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i ./swagger.yml -g rust --library hyper -o api

Expected output is

fn get_by_id_using_get(&self, id: &str) -> Box<dyn Future<Item = (), Error = Error<serde_json::Value>>> {

Actual output is

fn get_by_id_using_get(&self, id: &str&str) -> Box<dyn Future<Item = (), Error = Error<serde_json::Value>>> {
Related issues/PRs
Suggest a fix

https://github.com/OpenAPITools/openapi-generator/pull/10569

Assignee
Assign to
Time tracking