Validate
Last updated
Was this helpful?
Last updated
Was this helpful?
The DDO validation within the DDO.js
library is performed based on SHACL schemas which enforce DDO fields types and structure based on DDO version.
NOTE: For more information regarding DDO structure, please consult new DDO specification here.
The above diagram depicts the high level flow of Ocean core stack interaction for DDO validation using DDO.js, which will be called by Ocean Node whenever a new DDO is to be published.
Based on the DDO version, ddo.js
will apply the corresponding SHACL schema to validate DDO fields against it.
Supported SHACL schemas can be found here.
NOTE: For DDO validation, indexedMetadata
will not be taken in consideration in this process.
Now let's use DDO V4 example, DDOExampleV4
into the following javascript code, assuming @oceanprotocol/ddo-js
has been installed as dependency before:
Execute script