Skip to content

fix: enum generation in v3.1 - #1983

Merged
sdghchj merged 1 commit into
swaggo:v2from
dmouraneto:oas3.1-fix-enum
Mar 20, 2025
Merged

sdghchj merged 1 commit into
swaggo:v2from
dmouraneto:oas3.1-fix-enum

Conversation

@dmouraneto

Copy link
Copy Markdown

Describe the PR
some enums was not being generate when setting flag --v3.1=true
e.g it was like this:

      "SomeEnum": {,
        "type": "string",
        "x-enum-varnames": [
          "SomeEnumA",
          "SomeEnumB"
        ]
      }

with this PR is like this:

      "SomeEnum": {
        "enum": [
          "confirmation_code",
          "transaction_confirmation"
        ],
        "type": "string",
        "x-enum-comments": {
          "SomeEnumA": "a",
          "SomeEnumB": "b"
        },
        "x-enum-varnames": [
          "SomeEnumA",
          "SomeEnumB"
        ]
      }

Relation issue
#1955

@sdghchj
sdghchj merged commit 8f85cee into swaggo:v2 Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

⌂ 换网址