oasis-open / cti-stix-validator

OASIS TC Open Repository: Validator for STIX 2.0 JSON normative requirements and best practices
https://stix2-validator.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
50 stars 41 forks source link

Support later versions of STIX 2 #42

Closed clenk closed 5 years ago

clenk commented 7 years ago

We need to figure out how to support later versions of STIX 2 in the validator. It should probably default to the latest published version of the spec, with an option to set the version to validate against. People may want to validate against multiple versions of the spec if they are supporting multiple versions at once. Each version of the validator could have a maximum supported STIX version, or we could do something with subpackages like https://github.com/oasis-open/cti-python-stix2/issues/79. I'm leaning towards the latter.

gtback commented 7 years ago

I think you can have multiple git submodules that refer to the same repo (at different commits) for multiple copies of the JSON schemas. In terms of supporting multiple versions, the validator should:

clenk commented 7 years ago

At first I was confused by "multiple submodules for the same repo" - now I understand you mean git submodules, not python submodules.

gtback commented 7 years ago

I updated my comment above to be a bit more clear 😀

gtback commented 6 years ago

@clenk: Do you think it's important to figure this out before we release a 1.0, in case it causes significant internal refactoring of the public API?

clenk commented 6 years ago

Yes, to be on the safe side I think so. I've been meaning to work on this for a while but haven't found the time.

EDIT: the "version-specific" stuff will mostly just be "which functions to call"

gtback commented 6 years ago

We'll need a major version bump anyway when we switch from validating STIX 2.0 by default to validating STIX 2.1 by default, so there's no reason this needs to be done prior to 1.0.