Fix documentation links for v20
parent
60c3aa0167
commit
2dc8a97a51
|
@ -1,5 +0,0 @@
|
|||
common
|
||||
============
|
||||
|
||||
.. automodule:: stix2.common
|
||||
:members:
|
|
@ -1,5 +0,0 @@
|
|||
observables
|
||||
=================
|
||||
|
||||
.. automodule:: stix2.observables
|
||||
:members:
|
|
@ -1,5 +0,0 @@
|
|||
sdo
|
||||
=========
|
||||
|
||||
.. automodule:: stix2.sdo
|
||||
:members:
|
|
@ -1,5 +0,0 @@
|
|||
sro
|
||||
=========
|
||||
|
||||
.. automodule:: stix2.sro
|
||||
:members:
|
|
@ -0,0 +1,5 @@
|
|||
common
|
||||
================
|
||||
|
||||
.. automodule:: stix2.v20.common
|
||||
:members:
|
|
@ -0,0 +1,5 @@
|
|||
observables
|
||||
=====================
|
||||
|
||||
.. automodule:: stix2.v20.observables
|
||||
:members:
|
|
@ -0,0 +1,5 @@
|
|||
sdo
|
||||
=============
|
||||
|
||||
.. automodule:: stix2.v20.sdo
|
||||
:members:
|
|
@ -0,0 +1,5 @@
|
|||
sro
|
||||
=============
|
||||
|
||||
.. automodule:: stix2.v20.sro
|
||||
:members:
|
|
@ -4,4 +4,9 @@ API Reference
|
|||
This section of documentation contains information on all of the classes and
|
||||
functions in the ``stix2`` API, as given by the package's docstrings.
|
||||
|
||||
.. note::
|
||||
All the classes and functions detailed in the pages below are importable
|
||||
directly from `stix2`. See also:
|
||||
:ref:`How imports will work <guide/ts_support.ipynb#How-imports-will-work>`.
|
||||
|
||||
.. automodule:: stix2
|
||||
|
|
|
@ -502,7 +502,7 @@
|
|||
"source": [
|
||||
"As with indicators, the ``type``, ``id``, ``created``, and ``modified`` properties will be set automatically if not provided. For Malware objects, the ``labels`` and ``name`` properties must be provided.\n",
|
||||
"\n",
|
||||
"You can see the full list of SDO classes [here](../api/stix2.sdo.rst)."
|
||||
"You can see the full list of SDO classes [here](../api/stix2.v20.sdo.rst)."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -357,7 +357,7 @@
|
|||
"source": [
|
||||
"### Custom STIX Object Types\n",
|
||||
"\n",
|
||||
"To create a custom STIX object type, define a class with the @[CustomObject](../api/stix2.sdo.rst#stix2.sdo.CustomObject) decorator. It takes the type name and a list of property tuples, each tuple consisting of the property name and a property instance. Any special validation of the properties can be added by supplying an ``__init__`` function.\n",
|
||||
"To create a custom STIX object type, define a class with the @[CustomObject](../api/stix2.v20.sdo.rst#stix2.v20.sdo.CustomObject) decorator. It takes the type name and a list of property tuples, each tuple consisting of the property name and a property instance. Any special validation of the properties can be added by supplying an ``__init__`` function.\n",
|
||||
"\n",
|
||||
"Let's say zoo animals have become a serious cyber threat and we want to model them in STIX using a custom object type. Let's use a ``species`` property to store the kind of animal, and make that property required. We also want a property to store the class of animal, such as \"mammal\" or \"bird\" but only want to allow specific values in it. We can add some logic to validate this property in ``__init__``."
|
||||
]
|
||||
|
@ -588,7 +588,7 @@
|
|||
"source": [
|
||||
"### Custom Cyber Observable Types\n",
|
||||
"\n",
|
||||
"Similar to custom STIX object types, use a decorator to create [custom Cyber Observable](../api/stix2.observables.rst#stix2.observables.CustomObservable) types. Just as before, ``__init__()`` can hold additional validation, but it is not necessary."
|
||||
"Similar to custom STIX object types, use a decorator to create [custom Cyber Observable](../api/stix2.v20.observables.rst#stix2.v20.observables.CustomObservable) types. Just as before, ``__init__()`` can hold additional validation, but it is not necessary."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -754,7 +754,7 @@
|
|||
"source": [
|
||||
"### Custom Cyber Observable Extensions\n",
|
||||
"\n",
|
||||
"Finally, custom extensions to existing Cyber Observable types can also be created. Just use the @[CustomExtension](../api/stix2.observables.rst#stix2.observables.CustomExtension) decorator. Note that you must provide the Cyber Observable class to which the extension applies. Again, any extra validation of the properties can be implemented by providing an ``__init__()`` but it is not required. Let's say we want to make an extension to the ``File`` Cyber Observable Object:"
|
||||
"Finally, custom extensions to existing Cyber Observable types can also be created. Just use the @[CustomExtension](../api/stix2.v20.observables.rst#stix2.v20.observables.CustomExtension) decorator. Note that you must provide the Cyber Observable class to which the extension applies. Again, any extra validation of the properties can be implemented by providing an ``__init__()`` but it is not required. Let's say we want to make an extension to the ``File`` Cyber Observable Object:"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -364,7 +364,7 @@
|
|||
"source": [
|
||||
"### How will custom content work\n",
|
||||
"\n",
|
||||
"[CustomObject](../api/stix2.sdo.rst#stix2.sdo.CustomObject), [CustomObservable](../api/stix2.observables.rst#stix2.observables.CustomObservable), [CustomMarking](../api/stix2.common.rst#stix2.common.CustomMarking) and [CustomExtension](../api/stix2.observables.rst#stix2.observables.CustomExtension) must be registered explicitly by STIX version. This is a design decision since properties or requirements may change as the STIX Technical Specification advances.\n",
|
||||
"[CustomObject](../api/stix2.v20.sdo.rst#stix2.v20.sdo.CustomObject), [CustomObservable](../api/stix2.v20.observables.rst#stix2.v20.observables.CustomObservable), [CustomMarking](../api/stix2.v20.common.rst#stix2.v20.common.CustomMarking) and [CustomExtension](../api/stix2.v20.observables.rst#stix2.v20.observables.CustomExtension) must be registered explicitly by STIX version. This is a design decision since properties or requirements may change as the STIX Technical Specification advances.\n",
|
||||
"\n",
|
||||
"You can perform this by:"
|
||||
]
|
||||
|
|
|
@ -3,17 +3,17 @@
|
|||
.. autosummary::
|
||||
:toctree: api
|
||||
|
||||
common
|
||||
v20.common
|
||||
core
|
||||
environment
|
||||
exceptions
|
||||
markings
|
||||
observables
|
||||
v20.observables
|
||||
patterns
|
||||
properties
|
||||
sdo
|
||||
v20.sdo
|
||||
sources
|
||||
sro
|
||||
v20.sro
|
||||
utils
|
||||
"""
|
||||
|
||||
|
|
Loading…
Reference in New Issue