Skip to content

Enumeration Type Generation Exception #2079

@Wuchieh

Description

@Wuchieh

Error Description
Enum types failed to generate correctly

Reproduction Steps

  1. Clone https://github.com/Wuchieh/swaggo-issus-0927
  2. go mod tidy
  3. go generate // Generate documentation files
  4. go run .

Expected Behavior
At localhost:8080/swagger/v2/frontend/index.html, utils.Lang should appear as an enum type, not a string.

Screenshot

Image Image Image

Swaggo Version
v1.16.4 (v1.16.6)

Go Version
go1.25.1 linux/amd64

Desktop Environment (Please provide the following details):

  • Operating System: Ubuntu 24.04
  • Browser: Chrome
  • Version: 140.0.7339.208

Translated with DeepL.com (free version)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions