Skip to main content
Version: v5.0

Schemas overview

While RelatedItems are schema-less, platform v5.0 introduces the option to create Schemas. Schemas serve the following purposes:

  • AI integration: Provide context for the platform AI service to generate related queries
  • Data consistency: Define expected structures for RelatedItem objects, improving data consistency without strict enforcement

Involved types#

Creating RelatedItem schemas involve the following Item Service resources:

TypeRelevance
SchemaDefines a schema that RelatedItems can adhere to.
SchemaDefinitionA first-class resource that contains the Schemas for each collection's RelatedItems in a namespace
NamespaceCan contain one SchemaDefinition
NamedUserCollectionYou can add or update a Schema to the SchemaDefinition when you create a NamedUserCollection. NamedUserCollections must reference an existing Schema's _typeName field or create a new one.
RelatedItemCan follow the Schemas in the SchemaDefinition based on the Schema referenced in its NamedUserCollection