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

Remove enum validation for embedded app name #102

Closed
wants to merge 3 commits into from

Conversation

greghaynes
Copy link
Contributor

@greghaynes greghaynes commented Dec 6, 2023

Without this, not specifying embeeded app name errors because it does not adhere to the enum validation. I validated that changing the order does not work as well.

Without this, not specifying embeeded app name errors because it does not adhere to the enum validation.

Signed-off-by: Gregory Haynes <[email protected]>
@greghaynes greghaynes force-pushed the fix-appname-optional branch from 19b48e4 to eba8ba5 Compare December 6, 2023 04:03
@greghaynes greghaynes requested a review from nabuskey December 6, 2023 04:04
making optional doesnt have any effect - unset values result in validation failure.

Signed-off-by: Gregory Haynes <[email protected]>
@greghaynes greghaynes changed the title Embedded app name optional needs to precede enum Remove enum validation for embedded app name Dec 6, 2023
Signed-off-by: Gregory Haynes <[email protected]>
@greghaynes greghaynes force-pushed the fix-appname-optional branch from 5d676bb to d6d36a3 Compare December 6, 2023 06:06
Copy link
Collaborator

@nabuskey nabuskey left a comment

Choose a reason for hiding this comment

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

We can remove enum but I thought it's a nice way to tell what apps are embedded instead of digging through the controller logic here:

func GetEmbeddedRawInstallResources(name string) ([][]byte, error) {

I think I should have specified the omitempty json tag when I implemented this. This was corrected in the custom package PR here: https://github.com/cnoe-io/idpbuilder/pull/100/files. It does work from my testing.

@greghaynes
Copy link
Contributor Author

oh interesting, I'll try that out - I thought omitempty was only for reading though (dont display an empty field)? I'm totally fine with enum as long as we can make it work, as is I am unable to set EmbeddedAppName to "" though, so as long as we enable this I'm happy.

@nabuskey
Copy link
Collaborator

Closing this since it should be resolved in the PR: #100

@nabuskey nabuskey closed this Dec 12, 2023
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