robos:DataModel

Validation shape for robos:DataModel nodes in the services package group.

Details

   
Class robos:DataModel
Also matches robos:SchemaModel, robos:DomainEntity
Shape id urn:robos:shape:DataModelShape
Package Services & Contracts (robos.services) (services)
Classification Contracts & data models
Schema.org type schema:Class
Domain standard OpenAPI 3.1

Properties

Count is the minimum and maximum number of values (* means no maximum). The validator enforces both. The type column is documentation only; the validator does not check types.

Property Count Type Rule or description
dcterms:title 1..* xsd:string Data Model must have a title.
robos:modelName 1..* xsd:string Data Model must specify entity/model name.

Example node

The checked-in graph has no node of this class that passes the validator, so this is a placeholder built from the shape. It has every required property, with example values. It is not a node from the graph.

{
  "@id": "urn:robos:services:data-model-sample",
  "@type": [
    "robos:DataModel",
    "robos:SchemaModel",
    "robos:DomainEntity",
    "schema:Class",
    "oslc:Resource"
  ],
  "dcterms:title": "Sample Data Model",
  "dcterms:description": "Placeholder node for robos:DataModel.",
  "robos:package": "services",
  "robos:namespace": "robos.services",
  "robos:modelName": "SampleModel",
  "robos:schemaOrgType": "https://schema.org/Class",
  "robos:domainStandard": "https://spec.openapis.org/oas/v3.1.0",
  "robos:refersFrom": "https://schema.org/Class"
}

Validate the example

Save the example as node.json in the repository root, then run:

node -e "const { SHACLValidator } = require('./packages/robos-graph/lib/shacl-validator'); console.log(new SHACLValidator().validate([require('./node.json')]).conforms)"

The command prints true when the node meets every rule for its types.