Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
167 lines (165 sloc) 4.3 KB
#%Dialect 1.0
dialect: Validation Profile
version: 1.0
usage: Dialect to describe validations over RAML documents
external:
schema-org: http://schema.org/
shacl: http://www.w3.org/ns/shacl#
validation: http://a.ml/vocabularies/amf-validation#
nodeMappings:
functionConstraintNode:
classTerm: shacl.JSConstraint
mapping:
message:
propertyTerm: shacl.message
range: string
code:
propertyTerm: validation.jsCode
#pattern: ^function\.+\\*\.+\$
range: string
libraries:
propertyTerm: shacl.jsLibrary
range: string
allowMultiple: true
functionName:
propertyTerm: shacl.jsFunctionName
range: string
propertyConstraintNode:
classTerm: shacl.PropertyShape
mapping:
message:
propertyTerm: shacl.message
range: string
name:
propertyTerm: validation.ramlPropertyId
mandatory: true
range: string
pattern:
propertyTerm: shacl.pattern
range: string
maxCount:
propertyTerm: shacl.maxCount
range: number
minCount:
propertyTerm: shacl.minCount
range: number
minExclusive:
propertyTerm: shacl.minExclusive
range: number
maxExclusive:
propertyTerm: shacl.maxExclusive
range: number
minInclusive:
propertyTerm: shacl.minInclusive
range: number
maxInclusive:
propertyTerm: shacl.maxInclusive
range: number
in:
propertyTerm: shacl.in
range: string
allowMultiple: true
functionValidationNode:
classTerm: validation.FunctionValidation
mapping:
name:
propertyTerm: schema-org.name
range: string
message:
propertyTerm: shacl.message
range: string
targetClass:
propertyTerm: validation.ramlClassId
range: string
allowMultiple: true
functionConstraint:
propertyTerm: shacl.js
mandatory: true
range: functionConstraintNode
shapeValidationNode:
classTerm: validation.ShapeValidation
mapping:
name:
propertyTerm: schema-org.name
range: string
message:
propertyTerm: shacl.message
range: string
targetClass:
propertyTerm: validation.ramlClassId
range: string
allowMultiple: true
propertyConstraints:
propertyTerm: shacl.property
mandatory: true
range: propertyConstraintNode
asMap: true
hash: validation.ramlPropertyId
queryValidationNode:
classTerm: validation.QueryValidation
mapping:
name:
propertyTerm: schema-org.name
range: string
message:
propertyTerm: shacl.message
range: string
targetClass:
propertyTerm: validation.ramlClassId
range: string
allowMultiple: true
propertyConstraints:
propertyTerm: shacl.property
range: propertyConstraintNode
asMap: true
hash: validation.ramlPropertyId
targetQuery:
propertyTerm: validation.targetQuery
mandatory: true
range: string
profileNode:
classTerm: validation.Profile
mapping:
profile:
propertyTerm: schema-org.name
mandatory: true
range: string
description:
propertyTerm: schema-org.description
range: string
extends:
propertyTerm: validation.extendsProfile
range: string
violation:
propertyTerm: validation.setSeverityViolation
range: string
allowMultiple: true
info:
propertyTerm: validation.setSeverityInfo
range: string
allowMultiple: true
warning:
propertyTerm: validation.setSeverityWarning
range: string
allowMultiple: true
disabled:
propertyTerm: validation.disableValidation
range: string
allowMultiple: true
validations:
propertyTerm: validation.validations
range:
- shapeValidationNode
- queryValidationNode
- functionValidationNode
asMap: true
hash: schema-org.name
documents:
root:
encodes: profileNode
module:
declares:
validations: queryValidationNode
fragments:
encodes:
Validation: queryValidationNode