duplicates_validator
trestle.core.duplicates_validator
¤
Validate by confirming no duplicate uuids.
Classes¤
DuplicatesValidator
¤
Bases: Validator
Validator to check for duplicate uuids and param_ids in the model.
Source code in trestle/core/duplicates_validator.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
Functions¤
model_is_valid(model, quiet, trestle_root=None)
¤
Test if the model is valid and contains no duplicate uuids or param_ids.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model
|
OscalBaseModel
|
An Oscal model that can be passed to the validator. |
required |
quiet
|
bool
|
Don't report msgs unless invalid. |
required |
Returns:
Type | Description |
---|---|
bool
|
True (valid) if the model does not contain duplicate uuid's. |
Source code in trestle/core/duplicates_validator.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
handler: python