Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oneOf + const enums do not use empty string title #4448

Open
4 tasks done
nickgros opened this issue Jan 13, 2025 · 0 comments
Open
4 tasks done

oneOf + const enums do not use empty string title #4448

nickgros opened this issue Jan 13, 2025 · 0 comments
Labels
any-one-all-of Related to fixing anyOf, oneOf or allOf bug help wanted

Comments

@nickgros
Copy link
Contributor

Prerequisites

What theme are you using?

core

Version

5.x

Current Behavior

We can define an enum with oneOf:

{
      "oneOf": [
        {
          "const": "empty",
          "title": ""
        },
        {
          "const": "active"
        }
      ]
}

But if the title is an empty string, the const value is used.

Expected Behavior

The empty string option is used instead of falling back to the const value.

Steps To Reproduce

Playground link

Environment

No response

Anything else?

No response

@nickgros nickgros added bug needs triage Initial label given, to be assigned correct labels and assigned labels Jan 13, 2025
@nickgros nickgros added help wanted any-one-all-of Related to fixing anyOf, oneOf or allOf and removed needs triage Initial label given, to be assigned correct labels and assigned labels Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
any-one-all-of Related to fixing anyOf, oneOf or allOf bug help wanted
Projects
None yet
Development

No branches or pull requests

1 participant