Skip to content

feat: add enum support in marker type#337

Closed
AkashKumar7902 wants to merge 1 commit intokubernetes-sigs:mainfrom
AkashKumar7902:add-enum-support
Closed

feat: add enum support in marker type#337
AkashKumar7902 wants to merge 1 commit intokubernetes-sigs:mainfrom
AkashKumar7902:add-enum-support

Conversation

@AkashKumar7902
Copy link

Fixes: #304

Signed-off-by: Akash Kumar <meakash7902@gmail.com>
@AkashKumar7902
Copy link
Author

@a-hilaly PTAL!

Copy link
Member

@a-hilaly a-hilaly left a comment

Choose a reason for hiding this comment

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

Thank you @AkashKumar7902 ! left a few comments in-line

Comment on lines +218 to +219
default:
enumVal = []byte(v)
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if we should allow non integer/string values for now

Comment on lines +214 to +217
case "string":
enumVal = []byte(fmt.Sprintf("\"%s\"", v))
case "integer", "number":
enumVal = []byte(v)
Copy link
Member

Choose a reason for hiding this comment

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

Can we perform some validation here? thinking "strconv" to check whether the enumVal is indeed a number of integer

Copy link
Member

Choose a reason for hiding this comment

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

Can we add some unit tests for enums cases in this package?

@a-hilaly
Copy link
Member

ping @AkashKumar7902 are you still working onthis?

@AkashKumar7902
Copy link
Author

@a-hilaly I am caught up with some other work. You can assign this to someone else if this is an urgent deliverable.

@MunishMummadi
Copy link

@a-hilaly Can i pick this issue?

@a-hilaly
Copy link
Member

We have #424 addressing this. Closing.

@a-hilaly a-hilaly closed this Mar 22, 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.

Implement SimpleSchema enum support

3 participants