Home
Primary Interface
json_ld_test.get_manifest(manifest_type)
Load a specific test manifest
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
manifest_type
|
ManifestType
|
The type of manifest to load as a string, for example |
required |
Returns:
| Type | Description |
|---|---|
TestManifest
|
The requested manifest object. |
Examples:
>>> manifest = get_manifest("compact")
>>> manifest.name
'Compaction'
Source code in src/json_ld_test/load.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |
json_ld_test.get_test_file(test_name)
Load a specific test file by name
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
test_name
|
str
|
Name of the test file to load, including the type prefix, for example |
required |
Returns:
| Type | Description |
|---|---|
str
|
The content of the test file as a string. |
Examples:
>>> manifest = get_manifest("compact")
>>> some_test = manifest.sequence[0]
>>> get_test_file(some_test.input)
'{"@id": "http://example.org/test#example"}'
Source code in src/json_ld_test/load.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | |
json_ld_test.get_all_manifests()
Get each possible TestManifest
Returns:
| Type | Description |
|---|---|
Iterable[TestManifest]
|
An iterable of |
Examples:
>>> len(list(get_all_manifests()))
7
Source code in src/json_ld_test/load.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 | |
json_ld_test.get_all_tests()
Get each possible Test
Returns:
| Type | Description |
|---|---|
Iterable[Test]
|
An iterable of |
Examples:
>>> len(list(get_all_tests()))
1275
Source code in src/json_ld_test/load.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 | |
json_ld_test.get_manifest_types()
Get the types of manifests that are available in the package.
Returns:
| Type | Description |
|---|---|
Iterable[ManifestType]
|
An iterable of |
Examples:
>>> list(get_manifest_types())
['compact', 'expand', 'flatten', 'fromRdf', 'toRdf', 'html', 'remote-doc']
Source code in src/json_ld_test/load.py
21 22 23 24 25 26 27 28 29 30 31 32 33 | |
Classes and Types
json_ld_test.TestManifest
pydantic-model
Bases: Manifest
A manifest that contains a sequence of tests that all relate to a specific JSON-LD feature.
Show JSON schema:
{
"$defs": {
"NegativeEvaluationTest": {
"additionalProperties": false,
"description": "Describes a test case whose input is `input` and expects to raise an error with the message `expectErrorCode`.",
"properties": {
"name": {
"linkml_meta": {
"alias": "name",
"domain_of": [
"Manifest",
"Test"
]
},
"title": "Name",
"type": "string"
},
"purpose": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "purpose",
"domain_of": [
"Test"
]
},
"title": "Purpose"
},
"input": {
"linkml_meta": {
"alias": "input",
"domain_of": [
"Test"
]
},
"title": "Input",
"type": "string"
},
"option": {
"anyOf": [
{
"$ref": "#/$defs/Option"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "option",
"domain_of": [
"Test"
]
}
},
"context": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "context",
"domain_of": [
"Test"
]
},
"title": "Context"
},
"requires": {
"anyOf": [
{
"$ref": "#/$defs/Requires"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "requires",
"domain_of": [
"Test"
]
}
},
"expectErrorCode": {
"linkml_meta": {
"alias": "expectErrorCode",
"domain_of": [
"NegativeEvaluationTest"
]
},
"title": "Expecterrorcode",
"type": "string"
}
},
"required": [
"name",
"input",
"expectErrorCode"
],
"title": "NegativeEvaluationTest",
"type": "object"
},
"Option": {
"additionalProperties": false,
"description": "Captures all extra options that can be passed to a test.",
"properties": {
"specVersion": {
"anyOf": [
{
"$ref": "#/$defs/SpecVersion"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "specVersion",
"domain_of": [
"Option"
]
}
},
"processingMode": {
"anyOf": [
{
"$ref": "#/$defs/SpecVersion"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "processingMode",
"domain_of": [
"Option"
]
}
},
"base": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "base",
"domain_of": [
"Option"
]
},
"title": "Base"
},
"normative": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "normative",
"domain_of": [
"Option"
]
},
"title": "Normative"
},
"expandContext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "expandContext",
"domain_of": [
"Option"
]
},
"title": "Expandcontext"
},
"processorFeature": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "processorFeature",
"domain_of": [
"Option"
]
},
"title": "Processorfeature"
},
"extractAllScripts": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "extractAllScripts",
"domain_of": [
"Option"
]
},
"title": "Extractallscripts"
},
"contentType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "contentType",
"domain_of": [
"Option"
]
},
"title": "Contenttype"
},
"httpStatus": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "httpStatus",
"domain_of": [
"Option"
]
},
"title": "Httpstatus"
},
"redirectTo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "redirectTo",
"domain_of": [
"Option"
]
},
"title": "Redirectto"
},
"httpLink": {
"anyOf": [
{},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "httpLink",
"any_of": [
{
"multivalued": true
},
{
"multivalued": false
}
],
"domain_of": [
"Option"
]
},
"title": "Httplink"
},
"produceGeneralizedRdf": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "produceGeneralizedRdf",
"domain_of": [
"Option"
]
},
"title": "Producegeneralizedrdf"
},
"compactToRelative": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "compactToRelative",
"domain_of": [
"Option"
]
},
"title": "Compacttorelative"
},
"compactArrays": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "compactArrays",
"domain_of": [
"Option"
]
},
"title": "Compactarrays"
},
"useNativeTypes": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "useNativeTypes",
"domain_of": [
"Option"
]
},
"title": "Usenativetypes"
},
"rdfDirection": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "rdfDirection",
"domain_of": [
"Option"
]
},
"title": "Rdfdirection"
},
"useRdfType": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "useRdfType",
"domain_of": [
"Option"
]
},
"title": "Userdftype"
},
"useJCS": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "useJCS",
"domain_of": [
"Option"
]
},
"title": "Usejcs"
}
},
"title": "Option",
"type": "object"
},
"PositiveEvaluationTest": {
"additionalProperties": false,
"description": "Describes a test case whose input is `input` and expects the output to be `expect`.",
"properties": {
"name": {
"linkml_meta": {
"alias": "name",
"domain_of": [
"Manifest",
"Test"
]
},
"title": "Name",
"type": "string"
},
"purpose": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "purpose",
"domain_of": [
"Test"
]
},
"title": "Purpose"
},
"input": {
"linkml_meta": {
"alias": "input",
"domain_of": [
"Test"
]
},
"title": "Input",
"type": "string"
},
"option": {
"anyOf": [
{
"$ref": "#/$defs/Option"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "option",
"domain_of": [
"Test"
]
}
},
"context": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "context",
"domain_of": [
"Test"
]
},
"title": "Context"
},
"requires": {
"anyOf": [
{
"$ref": "#/$defs/Requires"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "requires",
"domain_of": [
"Test"
]
}
},
"expect": {
"linkml_meta": {
"alias": "expect",
"domain_of": [
"PositiveEvaluationTest"
]
},
"title": "Expect",
"type": "string"
}
},
"required": [
"name",
"input",
"expect"
],
"title": "PositiveEvaluationTest",
"type": "object"
},
"PositiveSyntaxTest": {
"additionalProperties": false,
"description": "Describes a test case that only has to be parsed successfully to pass.",
"properties": {
"name": {
"linkml_meta": {
"alias": "name",
"domain_of": [
"Manifest",
"Test"
]
},
"title": "Name",
"type": "string"
},
"purpose": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "purpose",
"domain_of": [
"Test"
]
},
"title": "Purpose"
},
"input": {
"linkml_meta": {
"alias": "input",
"domain_of": [
"Test"
]
},
"title": "Input",
"type": "string"
},
"option": {
"anyOf": [
{
"$ref": "#/$defs/Option"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "option",
"domain_of": [
"Test"
]
}
},
"context": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "context",
"domain_of": [
"Test"
]
},
"title": "Context"
},
"requires": {
"anyOf": [
{
"$ref": "#/$defs/Requires"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "requires",
"domain_of": [
"Test"
]
}
}
},
"required": [
"name",
"input"
],
"title": "PositiveSyntaxTest",
"type": "object"
},
"Requires": {
"enum": [
"I18nDatatype",
"CompoundLiteral",
"GeneralizedRdf"
],
"title": "Requires",
"type": "string"
},
"SpecVersion": {
"enum": [
"json-ld-1.0",
"json-ld-1.1"
],
"title": "SpecVersion",
"type": "string"
}
},
"additionalProperties": false,
"description": "A manifest that contains a sequence of tests that all relate to a specific JSON-LD feature.",
"properties": {
"name": {
"linkml_meta": {
"alias": "name",
"domain_of": [
"Manifest",
"Test"
]
},
"title": "Name",
"type": "string"
},
"description": {
"linkml_meta": {
"alias": "description",
"domain_of": [
"Manifest"
]
},
"title": "Description",
"type": "string"
},
"sequence": {
"items": {
"anyOf": [
{
"$ref": "#/$defs/NegativeEvaluationTest"
},
{
"$ref": "#/$defs/PositiveEvaluationTest"
},
{
"$ref": "#/$defs/PositiveSyntaxTest"
}
]
},
"linkml_meta": {
"alias": "sequence",
"any_of": [
{
"range": "PositiveEvaluationTest"
},
{
"range": "NegativeEvaluationTest"
},
{
"range": "PositiveSyntaxTest"
}
],
"domain_of": [
"Manifest"
]
},
"title": "Sequence",
"type": "array"
},
"baseIri": {
"linkml_meta": {
"alias": "baseIri",
"domain_of": [
"TestManifest"
]
},
"title": "Baseiri",
"type": "string"
}
},
"required": [
"name",
"description",
"sequence",
"baseIri"
],
"title": "TestManifest",
"type": "object"
}
Fields:
-
linkml_meta(LinkMLMeta) -
baseIri(str) -
name(str) -
description(str) -
sequence(List[Union[NegativeEvaluationTest, PositiveEvaluationTest, PositiveSyntaxTest]])
Source code in src/json_ld_test/models.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | |
json_ld_test.PositiveEvaluationTest
pydantic-model
Bases: Test
Describes a test case whose input is input and expects the output to be expect.
Show JSON schema:
{
"$defs": {
"Option": {
"additionalProperties": false,
"description": "Captures all extra options that can be passed to a test.",
"properties": {
"specVersion": {
"anyOf": [
{
"$ref": "#/$defs/SpecVersion"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "specVersion",
"domain_of": [
"Option"
]
}
},
"processingMode": {
"anyOf": [
{
"$ref": "#/$defs/SpecVersion"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "processingMode",
"domain_of": [
"Option"
]
}
},
"base": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "base",
"domain_of": [
"Option"
]
},
"title": "Base"
},
"normative": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "normative",
"domain_of": [
"Option"
]
},
"title": "Normative"
},
"expandContext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "expandContext",
"domain_of": [
"Option"
]
},
"title": "Expandcontext"
},
"processorFeature": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "processorFeature",
"domain_of": [
"Option"
]
},
"title": "Processorfeature"
},
"extractAllScripts": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "extractAllScripts",
"domain_of": [
"Option"
]
},
"title": "Extractallscripts"
},
"contentType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "contentType",
"domain_of": [
"Option"
]
},
"title": "Contenttype"
},
"httpStatus": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "httpStatus",
"domain_of": [
"Option"
]
},
"title": "Httpstatus"
},
"redirectTo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "redirectTo",
"domain_of": [
"Option"
]
},
"title": "Redirectto"
},
"httpLink": {
"anyOf": [
{},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "httpLink",
"any_of": [
{
"multivalued": true
},
{
"multivalued": false
}
],
"domain_of": [
"Option"
]
},
"title": "Httplink"
},
"produceGeneralizedRdf": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "produceGeneralizedRdf",
"domain_of": [
"Option"
]
},
"title": "Producegeneralizedrdf"
},
"compactToRelative": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "compactToRelative",
"domain_of": [
"Option"
]
},
"title": "Compacttorelative"
},
"compactArrays": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "compactArrays",
"domain_of": [
"Option"
]
},
"title": "Compactarrays"
},
"useNativeTypes": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "useNativeTypes",
"domain_of": [
"Option"
]
},
"title": "Usenativetypes"
},
"rdfDirection": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "rdfDirection",
"domain_of": [
"Option"
]
},
"title": "Rdfdirection"
},
"useRdfType": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "useRdfType",
"domain_of": [
"Option"
]
},
"title": "Userdftype"
},
"useJCS": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "useJCS",
"domain_of": [
"Option"
]
},
"title": "Usejcs"
}
},
"title": "Option",
"type": "object"
},
"Requires": {
"enum": [
"I18nDatatype",
"CompoundLiteral",
"GeneralizedRdf"
],
"title": "Requires",
"type": "string"
},
"SpecVersion": {
"enum": [
"json-ld-1.0",
"json-ld-1.1"
],
"title": "SpecVersion",
"type": "string"
}
},
"additionalProperties": false,
"description": "Describes a test case whose input is `input` and expects the output to be `expect`.",
"properties": {
"name": {
"linkml_meta": {
"alias": "name",
"domain_of": [
"Manifest",
"Test"
]
},
"title": "Name",
"type": "string"
},
"purpose": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "purpose",
"domain_of": [
"Test"
]
},
"title": "Purpose"
},
"input": {
"linkml_meta": {
"alias": "input",
"domain_of": [
"Test"
]
},
"title": "Input",
"type": "string"
},
"option": {
"anyOf": [
{
"$ref": "#/$defs/Option"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "option",
"domain_of": [
"Test"
]
}
},
"context": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "context",
"domain_of": [
"Test"
]
},
"title": "Context"
},
"requires": {
"anyOf": [
{
"$ref": "#/$defs/Requires"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "requires",
"domain_of": [
"Test"
]
}
},
"expect": {
"linkml_meta": {
"alias": "expect",
"domain_of": [
"PositiveEvaluationTest"
]
},
"title": "Expect",
"type": "string"
}
},
"required": [
"name",
"input",
"expect"
],
"title": "PositiveEvaluationTest",
"type": "object"
}
Fields:
-
linkml_meta(LinkMLMeta) -
expect(str) -
name(str) -
purpose(Optional[str]) -
input(str) -
option(Optional[Option]) -
context(Optional[str]) -
requires(Optional[Requires])
Source code in src/json_ld_test/models.py
153 154 155 156 157 158 159 160 161 162 163 164 165 | |
json_ld_test.NegativeEvaluationTest
pydantic-model
Bases: Test
Describes a test case whose input is input and expects to raise an error with the message expectErrorCode.
Show JSON schema:
{
"$defs": {
"Option": {
"additionalProperties": false,
"description": "Captures all extra options that can be passed to a test.",
"properties": {
"specVersion": {
"anyOf": [
{
"$ref": "#/$defs/SpecVersion"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "specVersion",
"domain_of": [
"Option"
]
}
},
"processingMode": {
"anyOf": [
{
"$ref": "#/$defs/SpecVersion"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "processingMode",
"domain_of": [
"Option"
]
}
},
"base": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "base",
"domain_of": [
"Option"
]
},
"title": "Base"
},
"normative": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "normative",
"domain_of": [
"Option"
]
},
"title": "Normative"
},
"expandContext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "expandContext",
"domain_of": [
"Option"
]
},
"title": "Expandcontext"
},
"processorFeature": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "processorFeature",
"domain_of": [
"Option"
]
},
"title": "Processorfeature"
},
"extractAllScripts": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "extractAllScripts",
"domain_of": [
"Option"
]
},
"title": "Extractallscripts"
},
"contentType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "contentType",
"domain_of": [
"Option"
]
},
"title": "Contenttype"
},
"httpStatus": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "httpStatus",
"domain_of": [
"Option"
]
},
"title": "Httpstatus"
},
"redirectTo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "redirectTo",
"domain_of": [
"Option"
]
},
"title": "Redirectto"
},
"httpLink": {
"anyOf": [
{},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "httpLink",
"any_of": [
{
"multivalued": true
},
{
"multivalued": false
}
],
"domain_of": [
"Option"
]
},
"title": "Httplink"
},
"produceGeneralizedRdf": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "produceGeneralizedRdf",
"domain_of": [
"Option"
]
},
"title": "Producegeneralizedrdf"
},
"compactToRelative": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "compactToRelative",
"domain_of": [
"Option"
]
},
"title": "Compacttorelative"
},
"compactArrays": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "compactArrays",
"domain_of": [
"Option"
]
},
"title": "Compactarrays"
},
"useNativeTypes": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "useNativeTypes",
"domain_of": [
"Option"
]
},
"title": "Usenativetypes"
},
"rdfDirection": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "rdfDirection",
"domain_of": [
"Option"
]
},
"title": "Rdfdirection"
},
"useRdfType": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "useRdfType",
"domain_of": [
"Option"
]
},
"title": "Userdftype"
},
"useJCS": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "useJCS",
"domain_of": [
"Option"
]
},
"title": "Usejcs"
}
},
"title": "Option",
"type": "object"
},
"Requires": {
"enum": [
"I18nDatatype",
"CompoundLiteral",
"GeneralizedRdf"
],
"title": "Requires",
"type": "string"
},
"SpecVersion": {
"enum": [
"json-ld-1.0",
"json-ld-1.1"
],
"title": "SpecVersion",
"type": "string"
}
},
"additionalProperties": false,
"description": "Describes a test case whose input is `input` and expects to raise an error with the message `expectErrorCode`.",
"properties": {
"name": {
"linkml_meta": {
"alias": "name",
"domain_of": [
"Manifest",
"Test"
]
},
"title": "Name",
"type": "string"
},
"purpose": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "purpose",
"domain_of": [
"Test"
]
},
"title": "Purpose"
},
"input": {
"linkml_meta": {
"alias": "input",
"domain_of": [
"Test"
]
},
"title": "Input",
"type": "string"
},
"option": {
"anyOf": [
{
"$ref": "#/$defs/Option"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "option",
"domain_of": [
"Test"
]
}
},
"context": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "context",
"domain_of": [
"Test"
]
},
"title": "Context"
},
"requires": {
"anyOf": [
{
"$ref": "#/$defs/Requires"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "requires",
"domain_of": [
"Test"
]
}
},
"expectErrorCode": {
"linkml_meta": {
"alias": "expectErrorCode",
"domain_of": [
"NegativeEvaluationTest"
]
},
"title": "Expecterrorcode",
"type": "string"
}
},
"required": [
"name",
"input",
"expectErrorCode"
],
"title": "NegativeEvaluationTest",
"type": "object"
}
Fields:
-
linkml_meta(LinkMLMeta) -
expectErrorCode(str) -
name(str) -
purpose(Optional[str]) -
input(str) -
option(Optional[Option]) -
context(Optional[str]) -
requires(Optional[Requires])
Source code in src/json_ld_test/models.py
182 183 184 185 186 187 188 189 190 191 192 193 194 | |
json_ld_test.PositiveSyntaxTest
pydantic-model
Bases: Test
Describes a test case that only has to be parsed successfully to pass.
Show JSON schema:
{
"$defs": {
"Option": {
"additionalProperties": false,
"description": "Captures all extra options that can be passed to a test.",
"properties": {
"specVersion": {
"anyOf": [
{
"$ref": "#/$defs/SpecVersion"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "specVersion",
"domain_of": [
"Option"
]
}
},
"processingMode": {
"anyOf": [
{
"$ref": "#/$defs/SpecVersion"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "processingMode",
"domain_of": [
"Option"
]
}
},
"base": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "base",
"domain_of": [
"Option"
]
},
"title": "Base"
},
"normative": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "normative",
"domain_of": [
"Option"
]
},
"title": "Normative"
},
"expandContext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "expandContext",
"domain_of": [
"Option"
]
},
"title": "Expandcontext"
},
"processorFeature": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "processorFeature",
"domain_of": [
"Option"
]
},
"title": "Processorfeature"
},
"extractAllScripts": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "extractAllScripts",
"domain_of": [
"Option"
]
},
"title": "Extractallscripts"
},
"contentType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "contentType",
"domain_of": [
"Option"
]
},
"title": "Contenttype"
},
"httpStatus": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "httpStatus",
"domain_of": [
"Option"
]
},
"title": "Httpstatus"
},
"redirectTo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "redirectTo",
"domain_of": [
"Option"
]
},
"title": "Redirectto"
},
"httpLink": {
"anyOf": [
{},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "httpLink",
"any_of": [
{
"multivalued": true
},
{
"multivalued": false
}
],
"domain_of": [
"Option"
]
},
"title": "Httplink"
},
"produceGeneralizedRdf": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "produceGeneralizedRdf",
"domain_of": [
"Option"
]
},
"title": "Producegeneralizedrdf"
},
"compactToRelative": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "compactToRelative",
"domain_of": [
"Option"
]
},
"title": "Compacttorelative"
},
"compactArrays": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "compactArrays",
"domain_of": [
"Option"
]
},
"title": "Compactarrays"
},
"useNativeTypes": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "useNativeTypes",
"domain_of": [
"Option"
]
},
"title": "Usenativetypes"
},
"rdfDirection": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "rdfDirection",
"domain_of": [
"Option"
]
},
"title": "Rdfdirection"
},
"useRdfType": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "useRdfType",
"domain_of": [
"Option"
]
},
"title": "Userdftype"
},
"useJCS": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "useJCS",
"domain_of": [
"Option"
]
},
"title": "Usejcs"
}
},
"title": "Option",
"type": "object"
},
"Requires": {
"enum": [
"I18nDatatype",
"CompoundLiteral",
"GeneralizedRdf"
],
"title": "Requires",
"type": "string"
},
"SpecVersion": {
"enum": [
"json-ld-1.0",
"json-ld-1.1"
],
"title": "SpecVersion",
"type": "string"
}
},
"additionalProperties": false,
"description": "Describes a test case that only has to be parsed successfully to pass.",
"properties": {
"name": {
"linkml_meta": {
"alias": "name",
"domain_of": [
"Manifest",
"Test"
]
},
"title": "Name",
"type": "string"
},
"purpose": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "purpose",
"domain_of": [
"Test"
]
},
"title": "Purpose"
},
"input": {
"linkml_meta": {
"alias": "input",
"domain_of": [
"Test"
]
},
"title": "Input",
"type": "string"
},
"option": {
"anyOf": [
{
"$ref": "#/$defs/Option"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "option",
"domain_of": [
"Test"
]
}
},
"context": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "context",
"domain_of": [
"Test"
]
},
"title": "Context"
},
"requires": {
"anyOf": [
{
"$ref": "#/$defs/Requires"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "requires",
"domain_of": [
"Test"
]
}
}
},
"required": [
"name",
"input"
],
"title": "PositiveSyntaxTest",
"type": "object"
}
Fields:
-
linkml_meta(LinkMLMeta) -
name(str) -
purpose(Optional[str]) -
input(str) -
option(Optional[Option]) -
context(Optional[str]) -
requires(Optional[Requires])
Source code in src/json_ld_test/models.py
168 169 170 171 172 173 174 175 176 177 178 179 | |
json_ld_test.Test
pydantic-model
Bases: ConfiguredBaseModel
Abstract parent class for all test cases.
Show JSON schema:
{
"$defs": {
"Option": {
"additionalProperties": false,
"description": "Captures all extra options that can be passed to a test.",
"properties": {
"specVersion": {
"anyOf": [
{
"$ref": "#/$defs/SpecVersion"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "specVersion",
"domain_of": [
"Option"
]
}
},
"processingMode": {
"anyOf": [
{
"$ref": "#/$defs/SpecVersion"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "processingMode",
"domain_of": [
"Option"
]
}
},
"base": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "base",
"domain_of": [
"Option"
]
},
"title": "Base"
},
"normative": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "normative",
"domain_of": [
"Option"
]
},
"title": "Normative"
},
"expandContext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "expandContext",
"domain_of": [
"Option"
]
},
"title": "Expandcontext"
},
"processorFeature": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "processorFeature",
"domain_of": [
"Option"
]
},
"title": "Processorfeature"
},
"extractAllScripts": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "extractAllScripts",
"domain_of": [
"Option"
]
},
"title": "Extractallscripts"
},
"contentType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "contentType",
"domain_of": [
"Option"
]
},
"title": "Contenttype"
},
"httpStatus": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "httpStatus",
"domain_of": [
"Option"
]
},
"title": "Httpstatus"
},
"redirectTo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "redirectTo",
"domain_of": [
"Option"
]
},
"title": "Redirectto"
},
"httpLink": {
"anyOf": [
{},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "httpLink",
"any_of": [
{
"multivalued": true
},
{
"multivalued": false
}
],
"domain_of": [
"Option"
]
},
"title": "Httplink"
},
"produceGeneralizedRdf": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "produceGeneralizedRdf",
"domain_of": [
"Option"
]
},
"title": "Producegeneralizedrdf"
},
"compactToRelative": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "compactToRelative",
"domain_of": [
"Option"
]
},
"title": "Compacttorelative"
},
"compactArrays": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "compactArrays",
"domain_of": [
"Option"
]
},
"title": "Compactarrays"
},
"useNativeTypes": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "useNativeTypes",
"domain_of": [
"Option"
]
},
"title": "Usenativetypes"
},
"rdfDirection": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "rdfDirection",
"domain_of": [
"Option"
]
},
"title": "Rdfdirection"
},
"useRdfType": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "useRdfType",
"domain_of": [
"Option"
]
},
"title": "Userdftype"
},
"useJCS": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "useJCS",
"domain_of": [
"Option"
]
},
"title": "Usejcs"
}
},
"title": "Option",
"type": "object"
},
"Requires": {
"enum": [
"I18nDatatype",
"CompoundLiteral",
"GeneralizedRdf"
],
"title": "Requires",
"type": "string"
},
"SpecVersion": {
"enum": [
"json-ld-1.0",
"json-ld-1.1"
],
"title": "SpecVersion",
"type": "string"
}
},
"additionalProperties": false,
"description": "Abstract parent class for all test cases.",
"properties": {
"name": {
"linkml_meta": {
"alias": "name",
"domain_of": [
"Manifest",
"Test"
]
},
"title": "Name",
"type": "string"
},
"purpose": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "purpose",
"domain_of": [
"Test"
]
},
"title": "Purpose"
},
"input": {
"linkml_meta": {
"alias": "input",
"domain_of": [
"Test"
]
},
"title": "Input",
"type": "string"
},
"option": {
"anyOf": [
{
"$ref": "#/$defs/Option"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "option",
"domain_of": [
"Test"
]
}
},
"context": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "context",
"domain_of": [
"Test"
]
},
"title": "Context"
},
"requires": {
"anyOf": [
{
"$ref": "#/$defs/Requires"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "requires",
"domain_of": [
"Test"
]
}
}
},
"required": [
"name",
"input"
],
"title": "Test",
"type": "object"
}
Fields:
-
linkml_meta(LinkMLMeta) -
name(str) -
purpose(Optional[str]) -
input(str) -
option(Optional[Option]) -
context(Optional[str]) -
requires(Optional[Requires])
Source code in src/json_ld_test/models.py
139 140 141 142 143 144 145 146 147 148 149 150 | |
json_ld_test.models.Option
pydantic-model
Bases: ConfiguredBaseModel
Captures all extra options that can be passed to a test.
Show JSON schema:
{
"$defs": {
"SpecVersion": {
"enum": [
"json-ld-1.0",
"json-ld-1.1"
],
"title": "SpecVersion",
"type": "string"
}
},
"additionalProperties": false,
"description": "Captures all extra options that can be passed to a test.",
"properties": {
"specVersion": {
"anyOf": [
{
"$ref": "#/$defs/SpecVersion"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "specVersion",
"domain_of": [
"Option"
]
}
},
"processingMode": {
"anyOf": [
{
"$ref": "#/$defs/SpecVersion"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "processingMode",
"domain_of": [
"Option"
]
}
},
"base": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "base",
"domain_of": [
"Option"
]
},
"title": "Base"
},
"normative": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "normative",
"domain_of": [
"Option"
]
},
"title": "Normative"
},
"expandContext": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "expandContext",
"domain_of": [
"Option"
]
},
"title": "Expandcontext"
},
"processorFeature": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "processorFeature",
"domain_of": [
"Option"
]
},
"title": "Processorfeature"
},
"extractAllScripts": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "extractAllScripts",
"domain_of": [
"Option"
]
},
"title": "Extractallscripts"
},
"contentType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "contentType",
"domain_of": [
"Option"
]
},
"title": "Contenttype"
},
"httpStatus": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "httpStatus",
"domain_of": [
"Option"
]
},
"title": "Httpstatus"
},
"redirectTo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "redirectTo",
"domain_of": [
"Option"
]
},
"title": "Redirectto"
},
"httpLink": {
"anyOf": [
{},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "httpLink",
"any_of": [
{
"multivalued": true
},
{
"multivalued": false
}
],
"domain_of": [
"Option"
]
},
"title": "Httplink"
},
"produceGeneralizedRdf": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "produceGeneralizedRdf",
"domain_of": [
"Option"
]
},
"title": "Producegeneralizedrdf"
},
"compactToRelative": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "compactToRelative",
"domain_of": [
"Option"
]
},
"title": "Compacttorelative"
},
"compactArrays": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "compactArrays",
"domain_of": [
"Option"
]
},
"title": "Compactarrays"
},
"useNativeTypes": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "useNativeTypes",
"domain_of": [
"Option"
]
},
"title": "Usenativetypes"
},
"rdfDirection": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "rdfDirection",
"domain_of": [
"Option"
]
},
"title": "Rdfdirection"
},
"useRdfType": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "useRdfType",
"domain_of": [
"Option"
]
},
"title": "Userdftype"
},
"useJCS": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"linkml_meta": {
"alias": "useJCS",
"domain_of": [
"Option"
]
},
"title": "Usejcs"
}
},
"title": "Option",
"type": "object"
}
Fields:
-
linkml_meta(LinkMLMeta) -
specVersion(Optional[SpecVersion]) -
processingMode(Optional[SpecVersion]) -
base(Optional[str]) -
normative(Optional[bool]) -
expandContext(Optional[str]) -
processorFeature(Optional[str]) -
extractAllScripts(Optional[bool]) -
contentType(Optional[str]) -
httpStatus(Optional[int]) -
redirectTo(Optional[str]) -
httpLink(Optional[Any]) -
produceGeneralizedRdf(Optional[bool]) -
compactToRelative(Optional[bool]) -
compactArrays(Optional[bool]) -
useNativeTypes(Optional[bool]) -
rdfDirection(Optional[str]) -
useRdfType(Optional[bool]) -
useJCS(Optional[bool])
Source code in src/json_ld_test/models.py
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | |
json_ld_test.models.Requires
Bases: str, Enum
Source code in src/json_ld_test/models.py
88 89 90 91 | |