-
Notifications
You must be signed in to change notification settings - Fork 25
bugfix: add domain sanitation #82
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
bugfix: add domain sanitation #82
Conversation
adds sanitization of the domain so that legal java packages can be created. Adds a flag to disable to the logic if necessary fixes operator-framework#81 Signed-off-by: Bryce Palmer <[email protected]>
Instead of deactivating the sanitation, it might be better to only sanitize the package name and leave the domain name intact. Presumably, the domain name shouldn't change, only the package name. |
That makes sense. I will make some changes to reflect this. Thanks @metacosm for pointing this out! |
Signed-off-by: Bryce Palmer <[email protected]>
As of commit 8b73706 this should now only sanitize the package name and leave the domain unchanged |
@@ -62,19 +62,19 @@ func (s *apiScaffolder) Scaffold() error { | |||
var createAPITemplates []machinery.Builder | |||
createAPITemplates = append(createAPITemplates, | |||
&model.Model{ | |||
Package: util.ReverseDomain(s.config.GetDomain()), | |||
Package: util.ReverseDomain(util.SanitizeDomain(s.config.GetDomain())), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not relevant to the current PR but maybe it'd make sense to compute these (and the class name) only once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
adds sanitization of the domain so that legal java packages can be created. Adds a flag to
disable to the logic if necessary
fixes #81
Signed-off-by: Bryce Palmer [email protected]