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
  • #3546
Closed
Open
Issue created Aug 02, 2019 by Administrator@rootContributor5 of 5 checklist items completed5/5 checklist items

[BUG][GO-GIN-SERVER] Conflict route

Created by: boskiv

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?
Description

Server can't start after generation

[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:   export GIN_MODE=release
 - using code:  gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET    /v2/                      --> pet-server/go.Index (3 handlers)
[GIN-debug] POST   /v2/pet                   --> pet-server/go.AddPet (3 handlers)
[GIN-debug] DELETE /v2/pet/:petId            --> pet-server/go.DeletePet (3 handlers)
[GIN-debug] GET    /v2/pet/findByStatus      --> pet-server/go.FindPetsByStatus (3 handlers)
[GIN-debug] GET    /v2/pet/findByTags        --> pet-server/go.FindPetsByTags (3 handlers)
[GIN-debug] GET    /v2/pet/:petId            --> pet-server/go.GetPetById (3 handlers)
panic: wildcard route ':petId' conflicts with existing children in path '/v2/pet/:petId'
openapi-generator version
➜  personal openapi-generator version
4.0.3
OpenAPI declaration file content or url
➜  personal wget https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml
Command line used for generation
➜  personal openapi-generator generate -i petstore.yaml -g go-gin-server -o pet-server
Steps to reproduce
docker build -t pet-server:local .
docker run --rm pet-server:local
Assignee
Assign to
Time tracking