Skip to content

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 "compact".

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
def get_manifest(manifest_type: ManifestType) -> TestManifest:
    """
    Load a specific test manifest

    Args: 
        manifest_type: The type of manifest to load as a string, for example `"compact"`.
        See `ManifestType`.

    Returns:
        The requested manifest object.

    Examples:
        >>> manifest = get_manifest("compact")
        >>> manifest.name
        'Compaction'
    """
    content = (anchor / f"{manifest_type}-manifest.jsonld").read_text()
    return cast(TestManifest, JSONLoader().load(content, TestManifest))

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 compact/0001-context.jsonld. You typically should only ever need to use Test object fields such as input, context, and expect for this argument.

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
def get_test_file(test_name: str) -> str:
    """
    Load a specific test file by name

    Args:
        test_name: Name of the test file to load, including the type prefix, for example `compact/0001-context.jsonld`.
            You typically should only ever need to use `Test` object fields such as `input`, `context`, and `expect` for this argument.

    Returns:
        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"}'
    """
    return (anchor / test_name).read_text()

json_ld_test.get_all_manifests()

Get each possible TestManifest

Returns:

Type Description
Iterable[TestManifest]

An iterable of TestManifest objects. Call list() on this to get a list of all manifests.

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
def get_all_manifests() -> Iterable[TestManifest]:
    """
    Get each possible TestManifest

    Returns:
        An iterable of `TestManifest` objects. Call `list()` on this to get a list of all manifests.

    Examples:
        >>> len(list(get_all_manifests()))
        7
    """
    # Get the manifests for each type
    for t in get_manifest_types():
        yield get_manifest(t)

json_ld_test.get_all_tests()

Get each possible Test

Returns:

Type Description
Iterable[Test]

An iterable of Test objects. Call list() on this to get a list of all tests.

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
def get_all_tests() -> Iterable[Test]:
    """
    Get each possible Test

    Returns:
        An iterable of `Test` objects. Call `list()` on this to get a list of all tests.

    Examples:
        >>> len(list(get_all_tests()))
        1275
    """
    # Get all the tests from the manifests
    for m in get_all_manifests():
        yield from m.sequence

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 ManifestType objects, which are strings. Call list() on this to get a list of all manifest types.

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
def get_manifest_types() -> Iterable[ManifestType]:
    """
    Get the types of manifests that are available in the package.

    Returns:
        An iterable of `ManifestType` objects, which are strings. Call `list()` on this to get a list of all manifest types.

    Examples:
        >>> list(get_manifest_types())
        ['compact', 'expand', 'flatten', 'fromRdf', 'toRdf', 'html', 'remote-doc']
    """
    # Extract the manifest options from the Literal ManifestType
    return ManifestType.__args__

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:

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
class TestManifest(Manifest):
    """
    A manifest that contains a sequence of tests that all relate to a specific JSON-LD feature.

    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'from_schema': 'https://w3c.github.io/json-ld-api/tests',
         'slot_usage': {'sequence': {'any_of': [{'range': 'PositiveEvaluationTest'},
                                                {'range': 'NegativeEvaluationTest'},
                                                {'range': 'PositiveSyntaxTest'}],
                                     'name': 'sequence'}}})

    baseIri: str = Field(..., json_schema_extra = { "linkml_meta": {'alias': 'baseIri', 'domain_of': ['TestManifest']} })
    name: str = Field(..., json_schema_extra = { "linkml_meta": {'alias': 'name', 'domain_of': ['Manifest', 'Test']} })
    description: str = Field(..., json_schema_extra = { "linkml_meta": {'alias': 'description', 'domain_of': ['Manifest']} })
    sequence: List[Union[NegativeEvaluationTest, PositiveEvaluationTest, PositiveSyntaxTest]] = Field(..., json_schema_extra = { "linkml_meta": {'alias': 'sequence',
         'any_of': [{'range': 'PositiveEvaluationTest'},
                    {'range': 'NegativeEvaluationTest'},
                    {'range': 'PositiveSyntaxTest'}],
         'domain_of': ['Manifest']} })

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
class PositiveEvaluationTest(Test):
    """
    Describes a test case whose input is `input` and expects the output to be `expect`.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'from_schema': 'https://w3c.github.io/json-ld-api/tests'})

    expect: str = Field(..., json_schema_extra = { "linkml_meta": {'alias': 'expect', 'domain_of': ['PositiveEvaluationTest']} })
    name: str = Field(..., json_schema_extra = { "linkml_meta": {'alias': 'name', 'domain_of': ['Manifest', 'Test']} })
    purpose: Optional[str] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'purpose', 'domain_of': ['Test']} })
    input: str = Field(..., json_schema_extra = { "linkml_meta": {'alias': 'input', 'domain_of': ['Test']} })
    option: Optional[Option] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'option', 'domain_of': ['Test']} })
    context: Optional[str] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'context', 'domain_of': ['Test']} })
    requires: Optional[Requires] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'requires', 'domain_of': ['Test']} })

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
class NegativeEvaluationTest(Test):
    """
    Describes a test case whose input is `input` and expects to raise an error with the message `expectErrorCode`.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'from_schema': 'https://w3c.github.io/json-ld-api/tests'})

    expectErrorCode: str = Field(..., json_schema_extra = { "linkml_meta": {'alias': 'expectErrorCode', 'domain_of': ['NegativeEvaluationTest']} })
    name: str = Field(..., json_schema_extra = { "linkml_meta": {'alias': 'name', 'domain_of': ['Manifest', 'Test']} })
    purpose: Optional[str] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'purpose', 'domain_of': ['Test']} })
    input: str = Field(..., json_schema_extra = { "linkml_meta": {'alias': 'input', 'domain_of': ['Test']} })
    option: Optional[Option] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'option', 'domain_of': ['Test']} })
    context: Optional[str] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'context', 'domain_of': ['Test']} })
    requires: Optional[Requires] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'requires', 'domain_of': ['Test']} })

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
class PositiveSyntaxTest(Test):
    """
    Describes a test case that only has to be parsed successfully to pass.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'from_schema': 'https://w3c.github.io/json-ld-api/tests'})

    name: str = Field(..., json_schema_extra = { "linkml_meta": {'alias': 'name', 'domain_of': ['Manifest', 'Test']} })
    purpose: Optional[str] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'purpose', 'domain_of': ['Test']} })
    input: str = Field(..., json_schema_extra = { "linkml_meta": {'alias': 'input', 'domain_of': ['Test']} })
    option: Optional[Option] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'option', 'domain_of': ['Test']} })
    context: Optional[str] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'context', 'domain_of': ['Test']} })
    requires: Optional[Requires] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'requires', 'domain_of': ['Test']} })

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
class Test(ConfiguredBaseModel):
    """
    Abstract parent class for all test cases.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'abstract': True, 'from_schema': 'https://w3c.github.io/json-ld-api/tests'})

    name: str = Field(..., json_schema_extra = { "linkml_meta": {'alias': 'name', 'domain_of': ['Manifest', 'Test']} })
    purpose: Optional[str] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'purpose', 'domain_of': ['Test']} })
    input: str = Field(..., json_schema_extra = { "linkml_meta": {'alias': 'input', 'domain_of': ['Test']} })
    option: Optional[Option] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'option', 'domain_of': ['Test']} })
    context: Optional[str] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'context', 'domain_of': ['Test']} })
    requires: Optional[Requires] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'requires', 'domain_of': ['Test']} })

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
class Option(ConfiguredBaseModel):
    """
    Captures all extra options that can be passed to a test.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'from_schema': 'https://w3c.github.io/json-ld-api/tests'})

    specVersion: Optional[SpecVersion] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'specVersion', 'domain_of': ['Option']} })
    processingMode: Optional[SpecVersion] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'processingMode', 'domain_of': ['Option']} })
    base: Optional[str] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'base', 'domain_of': ['Option']} })
    normative: Optional[bool] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'normative', 'domain_of': ['Option']} })
    expandContext: Optional[str] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'expandContext', 'domain_of': ['Option']} })
    processorFeature: Optional[str] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'processorFeature', 'domain_of': ['Option']} })
    extractAllScripts: Optional[bool] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'extractAllScripts', 'domain_of': ['Option']} })
    contentType: Optional[str] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'contentType', 'domain_of': ['Option']} })
    httpStatus: Optional[int] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'httpStatus', 'domain_of': ['Option']} })
    redirectTo: Optional[str] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'redirectTo', 'domain_of': ['Option']} })
    httpLink: Optional[Any] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'httpLink',
         'any_of': [{'multivalued': True}, {'multivalued': False}],
         'domain_of': ['Option']} })
    produceGeneralizedRdf: Optional[bool] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'produceGeneralizedRdf', 'domain_of': ['Option']} })
    compactToRelative: Optional[bool] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'compactToRelative', 'domain_of': ['Option']} })
    compactArrays: Optional[bool] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'compactArrays', 'domain_of': ['Option']} })
    useNativeTypes: Optional[bool] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'useNativeTypes', 'domain_of': ['Option']} })
    rdfDirection: Optional[str] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'rdfDirection', 'domain_of': ['Option']} })
    useRdfType: Optional[bool] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'useRdfType', 'domain_of': ['Option']} })
    useJCS: Optional[bool] = Field(None, json_schema_extra = { "linkml_meta": {'alias': 'useJCS', 'domain_of': ['Option']} })

json_ld_test.models.Requires

Bases: str, Enum

Source code in src/json_ld_test/models.py
88
89
90
91
class Requires(str, Enum):
    I18nDatatype = "I18nDatatype"
    CompoundLiteral = "CompoundLiteral"
    GeneralizedRdf = "GeneralizedRdf"

json_ld_test.load.ManifestType: TypeAlias = Literal['compact', 'expand', 'flatten', 'fromRdf', 'toRdf', 'html', 'remote-doc'] module-attribute