Skip to content

Conversation

@jack-berg
Copy link
Member

Realized we don't consistently model enum value types when reviewing this spec PR.

Ideally, we would have case insensitive enums, but JSON schema doesn't support those without resorting to using regex patterns.

Choosing snake case because we already have modeling guidance saying that property names are snake case.

@jack-berg jack-berg requested a review from a team as a code owner December 2, 2025 21:56
Copy link
Contributor

@MrAlias MrAlias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the values be case-insensitive? Do we want to distinguish between info and INFO?

@jack-berg
Copy link
Member Author

JSON schema doesn't support case insensitive enum values @MrAlias. I would be in favor of case insensitivity if we could express it reasonably

1 similar comment
@jack-berg
Copy link
Member Author

JSON schema doesn't support case insensitive enum values @MrAlias. I would be in favor of case insensitivity if we could express it reasonably

@MrAlias
Copy link
Contributor

MrAlias commented Dec 4, 2025

In that case, can we use uppercase snake case to match existing definitions like the log severity?

@jack-berg
Copy link
Member Author

See #449.

Notably:

Advantage of upper snake case is that enums stick out very clearly.
Disadvantage is that more types are impacted:

  • lower_snake_case impacts 2 types, both of which are experimental
  • UPPER_SNAKE_CASE impacts 7 types, one of which is experimental, 6 of which are on stack to stabilize

@codeboten
Copy link
Contributor

i prefer the lower case to upper case option

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you can address the conflicts and update the description for the enum, i think we can move this forward

@MrAlias
Copy link
Contributor

MrAlias commented Dec 8, 2025

I don't have a strong preference on casing. Just more used to the upper-case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants