$defs: transform: description: An individual transform type: object required: - id - type oneOf: - required: - code - required: - ref properties: id: description: | An identifier for this transform, using only alphanumeric characters and dashes (-). type: string pattern: '^[a-zA-Z][a-zA-Z0-9-]*$' description: description: Textual description for this transform. Markdown is accepted. type: string type: description: Type of transform $ref: '#/$defs/transformType' inputs: description: Inputs supported by this transform type: object properties: mediaTypes: description: List of input media types supported by this transform $ref: '#/$defs/nonEmptyMediaTypeList' outputs: description: Outputs generated by this transform type: object properties: mediaTypes: description: List of output media types generated by this transform $ref: '#/$defs/nonEmptyMediaTypeList' profiles: description: | List of profiles that the outputs of this transform will comply with (union). bblocks:// URIs can be used here. $ref: '#/$defs/nonEmptyStringList' code: description: Code or content for the transform $ref: '#/$defs/nonEmptyString' ref: description: Reference to the code or content for the transform $ref: '#/$defs/nonEmptyString' metadata: description: | Additional metadata to pass to the transform. Must be an object, the values of which can be anything. type: object allOf: - if: properties: type: const: python then: $ref: '#/$defs/pythonTransform' - if: properties: type: const: node then: $ref: '#/$defs/nodeTransform' pipOrNpmPackageList: description: One or more package specifiers, as accepted by pip/npm install. oneOf: - type: string - type: array items: type: string minItems: 1 pythonTransform: properties: metadata: properties: dependencies: properties: python: type: string description: > Minimum Python version required to run this transform, as a PEP 440 version specifier (e.g. ">=3.10"). The postprocessor will skip the transform if the running Python version does not satisfy this constraint. pip: description: One or more pip package specifiers to install before running this transform. $ref: '#/$defs/pipOrNpmPackageList' nodeTransform: properties: metadata: properties: dependencies: properties: node: type: string description: > Minimum Node.js version required to run this transform, as a semver range (e.g. ">=18"). The postprocessor will skip the transform if the running Node version does not satisfy this constraint. npm: description: One or more npm package names to install before running this transform. $ref: '#/$defs/pipOrNpmPackageList' transformList: description: List of transforms for the Building Block type: array items: $ref: '#/$defs/transform' transformType: description: Type of transform anyOf: - description: Supported by default enum: - shacl-af-rule - sparql-construct - sparql-update - json-ld-frame - jq - semantic-uplift - xslt - python - node - description: Other identifiers are also accepted $ref: '#/$defs/nonEmptyString' mediaType: oneOf: - $ref: '#/$defs/mimeTypeString' - type: object required: - mimeType properties: mimeType: description: A concrete media type (e.g. application/xml) $ref: '#/$defs/mimeTypeString' defaultExtension: description: Default file name extension $ref: '#/$defs/nonEmptyString' mimeTypeString: description: A concrete media type (e.g. application/xml) type: string pattern: '[^/]+/[^/]+' nonEmptyMediaTypeList: description: A list of concrete media types type: array minItems: 1 items: $ref: '#/$defs/mediaType' nonEmptyString: description: A string that is not empty (has some content apart from whitespace) type: string pattern: '[^\s]+' nonEmptyStringList: description: A non-empty array of non-empty string items type: array minItems: 1 items: $ref: '#/$defs/nonEmptyString' type: object properties: transforms: $ref: '#/$defs/transformList'