IDS Metadata and Identifiers

$id

Make sure it follows the same convention as other IDS. Each JSON schema should have a $id on the root level that looks like

"$id": "https://ids.tetrascience.com/common/instrument-a/v1.0.0/schema.json"

This can be done in ts-ids-core using the SchemaExtraMetadataType as demonstrated here

$schema

Since JSON Schema is itself a JSON file, it’s not always easy to tell when something is JSON Schema or just an arbitrary chunk of JSON. The $schema keyword is used to declare that something is JSON Schema. We include it in every schema.json as a top-level metadata field.

"$schema": "http://json-schema.org/draft-07/schema#"

This can be done in ts-ids-core using the SchemaExtraMetadataType as demonstrated here

@idsNamespace, @idsType, @idsVersion

It is important for the schema.json and the IDS JSON itself to indicate what the IDS namespace, type, and version are. This provides a unique identifier for what schema an IDS JSON instance should conform to and how it should served on the platform.

  • @idsType refers to the schema name, such as qpcr-thermofisher-viia7. This often describes a specific instrument or an instrument family if multiple instrument’s data can be modeled with a single IDS.

  • @idsNamespace defines a realm within the TetraScience platform where only those who have the appropriate permissions can use the artifacts in that realm. For more information on the namespace to choose for your IDS, see the product documentation.

  • @idsVersion is the version of a given IDS and follows semantic versioning, please see the IDS versioning rules to understand how to version your IDS. It is important follow the correct versioning rules as the platfrom relies on the version to index data into Elasticsearch and serve the data with the correct Athena tables.

These fields are included when using IdsSchema or TetraDataSchema - see Quickstart for an example of defining these fields.

Example
{
  "type": "object",
  "required": ["@idsNamespace", "@idsType", "@idsVersion"],
  "properties": {
    "@idsNamespace": {
      "type": "string",
      "const": "common"
    },
    "@idsType": {
      "type": "string",
      "const": "example"
    },
    "@idsVersion": {
      "type": "string",
      "const": "v1.0.0"
    }
  }
}