Cloud Platform SHACL Shapes
type: Ontology
imports: core-shapes#
license: http://creativecommons.org/licenses/by/4.0/
preferred namespace prefix: cpsh
description: Validation rules for the Cloud Platform Architecture metamodel.
created: 2026-05-03
version info: 0.1.0

MicroserviceShape
type: NodeShape
target class: Microservice
property:
  path: prefLabel
  min count: 1
  message: Every Microservice must have a name (skos:prefLabel).
property:
  path: resilienceLevel
  min count: 1
  in: critical
  in: high
  in: medium
  in: low
  message: Microservice must have a resilienceLevel: critical, high, medium, or low.
property:
  path: deploymentStrategy
  max count: 1
  in: blue-green
  in: canary
  in: rolling
  in: recreate
  message: deploymentStrategy must be: blue-green, canary, rolling, or recreate.
property:
  path: serviceTier
  max count: 1
  in: tier-1
  in: tier-2
  in: tier-3
  message: serviceTier must be: tier-1, tier-2, or tier-3.

ContainerShape
type: NodeShape
target class: Container
property:
  path: containerImage
  min count: 1
  message: Every Container must have a containerImage.
property:
  path: replicaCount
  min count: 1
  datatype: integer
  min inclusive: 1
  message: replicaCount must be a positive integer.

PublishingShape
type: NodeShape
target class: Publishing
property:
  path: source
  class: Microservice
  message: Publishing source must be a Microservice.
property:
  path: target
  class: EventTopic
  message: Publishing target must be an EventTopic.

SubscriptionShape
type: NodeShape
target class: Subscription
property:
  path: source
  class: Microservice
  message: Subscription source must be a Microservice.
property:
  path: target
  class: EventTopic
  message: Subscription target must be an EventTopic.

DeploymentShape
type: NodeShape
target class: Deployment
property:
  path: source
  class: Container
  message: Deployment source must be a Container.
property:
  path: target
  class: KubernetesCluster
  message: Deployment target must be a KubernetesCluster.

CriticalServiceTierShape
type: NodeShape
target class: Microservice
severity: Warning
sparql:
  message: Critical microservices should have tier-1 SLA.
  select: SELECT $this WHERE { $this <https://meta.linked.archi/examples/cloudplatform/onto#resilienceLevel> "critical" . $this <https://meta.linked.archi/examples/cloudplatform/onto#serviceTier> ?tier . FILTER(?tier != "tier-1") }

MicroserviceDeploymentShape
type: NodeShape
target class: Microservice
severity: Warning
sparql:
  message: Microservice has no container deployment.
  select: SELECT $this WHERE { $this a <https://meta.linked.archi/examples/cloudplatform/onto#Microservice> . FILTER NOT EXISTS { ?container <https://meta.linked.archi/archimate4/onto#assignedTo> $this . ?container a <https://meta.linked.archi/examples/cloudplatform/onto#Container> . } }