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

Validate property types #51

Open
jwadolowski opened this issue Oct 4, 2017 · 2 comments
Open

Validate property types #51

jwadolowski opened this issue Oct 4, 2017 · 2 comments

Comments

@jwadolowski
Copy link
Owner

It'd be great if cq_osgi_config could warn the user and correct simple mistakes in property types.

Use cases:

  • true (boolean) is expected, but 'true' (string) was used
  • string was used instead of 1 element array
    • WRONG: 'htmllibmanager.processor.js' => 'min:gcc'
    • RIGHT: 'htmllibmanager.processor.js' => ['min:gcc']

Correction should be optional and controlled via cq_osgi_config property.

@ghost
Copy link

ghost commented Oct 4, 2017

not sure if allowing mistakes is a good idea, instead leaving a comprehensive error message which helps the user to easily fix his mistake sounds better to my opinion.

@jwadolowski
Copy link
Owner Author

Allowing mistakes is definitely not a good idea. On the other hand converting 'true' to true is not a big deal and maybe warning should be enough.

Either way, types have to be validated to avoid idempotence violations.

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

No branches or pull requests

1 participant