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
  • #8010
Closed
Open
Issue created Nov 24, 2020 by Administrator@rootContributor5 of 6 checklist items completed5/6 checklist items

[BUG][Go] A path with multiple tags fails to compile with a redeclaration error

Created by: segevfiner

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

The generated Go code for an OpenAPI file with multiple tags for a single path fails to compile with a redeclaration error (redeclared in this block)

openapi-generator version

v4.2.6 and feeeedd34d4f3a83501825d025502874f669a6bc (Docker image openapitools/openapi-generator-cli@sha256:4396b434b09f03c9cb9a20ff39f1406f13a9b224a25e77a41679cd993eb5c968)

OpenAPI declaration file content or url
openapi: '3.0.3'

info:
  title: Multiple Tags
  version: 0.1.0

paths:
  /test:
    get:
      description: Test
      operationId: Test
      tags:
      - a
      - b
      responses:
        '200':
          description: OK
Generation Details
docker run --rm \
  -v ${PWD}:/local openapitools/openapi-generator-cli@sha256:4396b434b09f03c9cb9a20ff39f1406f13a9b224a25e77a41679cd993eb5c968 generate \
  -i /local/openapi.yaml \
  -g go \
  -o /local/out/go
Steps to reproduce
  1. Generate the provided schema for go.
  2. Try to build it.
Related issues/PRs
Suggest a fix
Assignee
Assign to
Time tracking