diff --git a/senpy/schemas/context.jsonld b/senpy/schemas/context.jsonld index 4b77adb..8ab7bfa 100644 --- a/senpy/schemas/context.jsonld +++ b/senpy/schemas/context.jsonld @@ -37,9 +37,6 @@ "@type": "@id", "@container": "@set" }, - "plugins": { - "@container": "@list" - }, "options": { "@container": "@set" }, diff --git a/senpy/schemas/plugins.json b/senpy/schemas/plugins.json index cd7c937..7cafd9b 100644 --- a/senpy/schemas/plugins.json +++ b/senpy/schemas/plugins.json @@ -10,8 +10,6 @@ "items": { "$ref": "plugin.json" } - }, - "@type": { } } } diff --git a/tests/test_models.py b/tests/test_models.py index 7e3f020..745a439 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -109,13 +109,15 @@ class ModelsTest(TestCase): } }}) c = p.jsonld() - assert "info" not in c - assert "repo" not in c - assert "extra_params" in c - logging.debug("Framed:") + assert '@type' in c + assert c['@type'] == 'plugin' + assert 'info' not in c + assert 'repo' not in c + assert 'extra_params' in c + logging.debug('Framed:') logging.debug(c) p.validate() - assert "es" in c['extra_params']['none']['options'] + assert 'es' in c['extra_params']['none']['options'] assert isinstance(c['extra_params']['none']['options'], list) def test_str(self): @@ -158,6 +160,13 @@ class ModelsTest(TestCase): g = rdflib.Graph().parse(data=t, format='turtle') assert len(g) == len(triples) + def test_plugin_list(self): + """The plugin list should be of type \"plugins\"""" + plugs = Plugins() + c = plugs.jsonld() + assert '@type' in c + assert c['@type'] == 'plugins' + def test_single_plugin(self): """A response with a single plugin should still return a list""" plugs = Plugins()