Skip to content

Conversation

@chizhanov
Copy link
Contributor

@chizhanov chizhanov commented Jun 14, 2025

This PR solves the problem described in #18660.

I made this fix locally and on my openapi the issue was fixed and no new issues were found.

For testing you can use the code from the Issue or use this:

{
  "openapi": "3.1.0",
  "info": {
    "title": "Simple",
    "version": "0.0.1"
  },
  "paths": {},
  "components": {
    "schemas": {
      "TestEnum": {
        "type": "string",
        "enum": [
          "",
          "1",
          "2"
        ],
        "title": "TestEnum"
      },
      "TestItem": {
        "properties": {
          "test": {
            "type": "integer",
            "title": "test"
          },
          "testEmum": {
            "$ref": "#/components/schemas/TestEnum",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "test"
        ],
        "title": "TestItem"
      }
    }
  },
  "tags": []
}

@dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) @4brunu (2019/11) @yutaka0m (2020/03) @stefankoppier (2022/06) @e5l (2024/10)

@4brunu 4brunu merged commit 7f578d7 into OpenAPITools:master Jun 15, 2025
14 checks passed
@wing328 wing328 added this to the 7.14.0 milestone Jun 19, 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.

3 participants