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 .
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.
NOTE: For DDO validation, indexedMetadata
will not be taken in consideration in this process.
Execute script
Supported SHACL schemas can be found .
Now let's use , DDOExampleV4
into the following javascript code, assuming @oceanprotocol/ddo-js
has been installed as dependency before: