Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Resolve #65: Add support for layer options in layer.yaml #68
Conversation
marcoceppi
added this to the
NEXT milestone
Dec 7, 2015
johnsca
added
the
charm-build
label
Dec 7, 2015
bcsaller
reviewed
Dec 7, 2015
| + def lint(self): | ||
| + if 'options' not in self.data: | ||
| + return True | ||
| + validator = extend_with_default(jsonschema.Draft4Validator)(self.schema) |
bcsaller
Dec 7, 2015
Contributor
It looks like in this case 'lint' is preforming a now needed mutation of the object which is a bit odd conceptually in that other tactics would be expected to do something similar. Can we do this in 'read' which should be related to loading the version of that data we expect to use in processing (maybe read should be 'load' or 'process' or 'parse' but that is another papercut).
johnsca
Dec 8, 2015
Member
@bcsaller I agree that it's not ideal to do modification of the target values during validation, but that's unfortunately what the jsonschema library recommended. Ideally, the default setting behavior would be handled just after combine but I'm not clear on how to implement that without a lot of manual processing of the schema.
johnsca commentedDec 5, 2015
For #65. Add support for jsonschema defined and validated options in
layer.yamlfor configuring included layers.