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

Allow configuration via JSON file #16

Closed
philippd opened this issue Jun 4, 2014 · 1 comment
Closed

Allow configuration via JSON file #16

philippd opened this issue Jun 4, 2014 · 1 comment
Assignees
Labels
Milestone

Comments

@philippd
Copy link
Collaborator

philippd commented Jun 4, 2014

The configuration of the scanned packages and custom validators would be easier to maintain and share between the CLI (used for example for Maven) and the servlet setup if it could be provided in a JSON file.

The default file that valdr reads could be a valdr.json file that's in the root of the classpath to make configuration even easier.

Example:

{
  packages: ['package.a', 'package.b'],
  validators: ['annotations.ConstraintA', 'annotations.ConstraintB']
}
@marcelstoer marcelstoer added this to the 1.1 milestone Jun 7, 2014
@marcelstoer
Copy link
Collaborator

What about config options that are not shared between CLI and Servlet (e.g. corsAllowOriginPattern and -o)? Should they also be added to the config file? I guess yes...don't see a real problem with that.

Should the config file replace the existing individual parameters or be offered as an alternative? I'd prefer the first even though it'd be a breaking change.

@marcelstoer marcelstoer self-assigned this Jun 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants