cti-python-stix2/stix2
maybe-sybr bd897c9848 improv: Check reference prop types for all customs
Previously the requirement that properties ending in `_ref(s)` were
instances of an appropriate type capable of containing a STIX
`identifier` (the current interpretation of section 3.1 of the STIX 2.1
spec) was only enforced for custom observables. This change refactors
the property checks for custom objects to enforce this and the STIX 2.1
property name requirement (also from section 3.1) in a common helper,
therefore extending the enforcement of both requirements to all custom
object types created by downstream projects.

There is a special case carved out for STIX 2.0 observables which are
required to contain "object references" rather than identifiers. This
special logic is encoded in the reference property validation helper and
enabled by a kwarg which is passed exclusively by the custom observable
registration helper.
2021-07-22 14:55:14 +10:00
..
canonicalization Revert JSON canonicalization code 2021-02-18 12:21:52 -05:00
confidence
datastore Merge pull request #500 from emmanvg/add-fp-serialize 2021-03-19 21:13:30 -04:00
equivalence Update __init__.py 2021-03-12 16:49:23 -05:00
markings Merge branch 'master' of github.com:oasis-open/cti-python-stix2 into dev-extensions-proposal 2021-02-19 21:54:46 -05:00
test improv: Check reference prop types for all customs 2021-07-22 14:55:14 +10:00
v20 Remove relics of the old way customization was handled and 2021-06-25 22:10:31 -04:00
v21 Back out changes to the CustomMarking decorator and registration, 2021-07-08 22:18:28 -04:00
__init__.py Fix import sort order 2021-01-15 10:27:39 -05:00
base.py pre-commit stylistic fixes 2021-07-06 20:40:50 -04:00
custom.py Remove registration._get_extension_class() since it's redundant 2021-07-09 18:11:11 -04:00
environment.py Update stix2/environment.py 2021-03-10 09:52:24 -05:00
exceptions.py Add some missing docstrings on a few exception classes. 2021-01-28 23:02:23 -05:00
hashes.py Add proper customization enforcement for open vocabs. This adds 2021-03-31 16:20:28 -04:00
parsing.py Update guide docs, remove outdated comments 2021-04-14 16:39:56 -04:00
pattern_visitor.py Remove six dependency (backwards breaking) 2021-02-18 12:38:35 -05:00
patterns.py few leftover changes... 2021-02-19 22:15:11 -05:00
properties.py Bug fixes, hackage removal, and some pre-commit stylistic 2021-06-30 17:50:00 -04:00
registration.py improv: Check reference prop types for all customs 2021-07-22 14:55:14 +10:00
registry.py Improve customization detection in the face of 2021-06-30 20:20:29 -04:00
serialization.py pre-commit stylistic fixes 2021-07-06 20:40:50 -04:00
utils.py Clean up ReferenceProperty.clean(), to use new APIs which are 2021-03-31 20:01:27 -04:00
version.py Bump version: 2.1.0 → 3.0.0 2021-07-08 14:57:59 -04:00
versioning.py Initial revamp of customization enforcement and detection. 2021-03-31 15:21:55 -04:00
workbench.py Improve versioning.new_version() to better handle custom objects 2021-01-28 23:02:23 -05:00