Validation returns incorrect failures when called with the -t flag, at least for -t system-security-plan when the model has been split using trestle split
To Reproduce
Steps to reproduce the behavior:
Create a new system-security-plan trestle create -t system-security-plan -o validate-test
Edit ssp to put a valid profile href in
Verify that trestle validate -f system-security-plans/validate-test/system-security-plan.json and trestle validate -t system-security-plan -n validate-test correctly report that the model is valid
Split the model: trestle split -f system-security-plans/validate-test/system-security-plan.json -e "system-security-plan.metadata"
Verify that trestle validate -f system-security-plans/validate-test/system-security-plan.json still reports that the model is valid
Try to validate with trestle validate -t system-security-plan -n validate-test
It's popping that issue when assigning things to the pydantic.v1.main.SystemSecurityPlan stripped model, but I don't know why it's an issue for -t/-n and not for either -f or -a versions of the command.
Describe the bug
Validation returns incorrect failures when called with the
-t
flag, at least for-t system-security-plan
when the model has been split usingtrestle split
To Reproduce
Steps to reproduce the behavior:
trestle create -t system-security-plan -o validate-test
trestle validate -f system-security-plans/validate-test/system-security-plan.json
andtrestle validate -t system-security-plan -n validate-test
correctly report that the model is validtrestle split -f system-security-plans/validate-test/system-security-plan.json -e "system-security-plan.metadata"
trestle validate -f system-security-plans/validate-test/system-security-plan.json
still reports that the model is validtrestle validate -t system-security-plan -n validate-test
Expected behavior
The model is still valid
Actual behavior
Step 6 reports that the model has extra fields.
Screenshots / Logs.
Environment