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

Stix2-Validator does not support json schema (draft-7) feature of "if-then" construct #172

Open
santosh-java opened this issue May 10, 2021 · 0 comments

Comments

@santosh-java
Copy link

Since the schemas are written in draft-07 of JSON Schema, I had created a custom object in our STIX representation for which I had come up with the custom schema for validating.

Attached the schema and one of the sample JSON instance which is not getting validated correctly.

Schema: x_signal_schema_ifthen.txt
Test Json Input:
Invalid_EDR_Signal.txt

Validation Output:
{
"messages": {
"errors": [
"x-signal--f9d5de15-7a32-94bd-7e62-e418b754fe6f: id: 'x-signal--f9d5de15-7a32-94bd-7e62-e418b754fe6f' does not match the id format ([object-type]--[UUID])"
]
}
}

Expected Validation Output should also show that the required property "x_hash_id" is not present along with the above 'id' error.

Question: Does the Stix2-Validator framework support 'if-then' construct? If not could you please let me know how one can achieve the value based check and have specific properties as required.

Thanks and Regards,
Santosh

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

No branches or pull requests

1 participant