diff --git a/src/acsets/acsets.py b/src/acsets/acsets.py index b0b9475..1d5736c 100644 --- a/src/acsets/acsets.py +++ b/src/acsets/acsets.py @@ -313,6 +313,8 @@ def make_schema(self, uri: Optional[str] = None): """ # TODO add description schema = self.model.schema() + for part in schema["definitions"].values(): + part["additionalProperties"] = False schema["$schema"] = "http://json-schema.org/draft-07/schema#" if uri is not None: schema["$id"] = uri diff --git a/src/acsets/schemas/jsonschema/LabelledPetriNet.json b/src/acsets/schemas/jsonschema/LabelledPetriNet.json index 0719c64..65db173 100644 --- a/src/acsets/schemas/jsonschema/LabelledPetriNet.json +++ b/src/acsets/schemas/jsonschema/LabelledPetriNet.json @@ -3,6 +3,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "I": { + "additionalProperties": false, "properties": { "is": { "title": "Is", @@ -17,6 +18,7 @@ "type": "object" }, "O": { + "additionalProperties": false, "properties": { "os": { "title": "Os", @@ -31,6 +33,7 @@ "type": "object" }, "S": { + "additionalProperties": false, "properties": { "sname": { "title": "Sname", @@ -41,6 +44,7 @@ "type": "object" }, "T": { + "additionalProperties": false, "properties": { "tname": { "title": "Tname", diff --git a/src/acsets/schemas/jsonschema/LabelledReactionNet.json b/src/acsets/schemas/jsonschema/LabelledReactionNet.json index 122ca8a..d6bb129 100644 --- a/src/acsets/schemas/jsonschema/LabelledReactionNet.json +++ b/src/acsets/schemas/jsonschema/LabelledReactionNet.json @@ -3,6 +3,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "I": { + "additionalProperties": false, "properties": { "is": { "title": "Is", @@ -17,6 +18,7 @@ "type": "object" }, "O": { + "additionalProperties": false, "properties": { "os": { "title": "Os", @@ -31,6 +33,7 @@ "type": "object" }, "S": { + "additionalProperties": false, "properties": { "concentration": { "title": "Concentration", @@ -45,6 +48,7 @@ "type": "object" }, "T": { + "additionalProperties": false, "properties": { "rate": { "title": "Rate", diff --git a/src/acsets/schemas/jsonschema/PetriNet.json b/src/acsets/schemas/jsonschema/PetriNet.json index 19e6888..8949336 100644 --- a/src/acsets/schemas/jsonschema/PetriNet.json +++ b/src/acsets/schemas/jsonschema/PetriNet.json @@ -3,6 +3,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "I": { + "additionalProperties": false, "properties": { "is": { "title": "Is", @@ -17,6 +18,7 @@ "type": "object" }, "O": { + "additionalProperties": false, "properties": { "os": { "title": "Os", @@ -31,11 +33,13 @@ "type": "object" }, "S": { + "additionalProperties": false, "properties": {}, "title": "S", "type": "object" }, "T": { + "additionalProperties": false, "properties": {}, "title": "T", "type": "object" diff --git a/src/acsets/schemas/jsonschema/PropertyLabelledPetriNet.json b/src/acsets/schemas/jsonschema/PropertyLabelledPetriNet.json index cc62e24..ba38b2e 100644 --- a/src/acsets/schemas/jsonschema/PropertyLabelledPetriNet.json +++ b/src/acsets/schemas/jsonschema/PropertyLabelledPetriNet.json @@ -3,6 +3,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "I": { + "additionalProperties": false, "properties": { "is": { "title": "Is", @@ -17,6 +18,7 @@ "type": "object" }, "O": { + "additionalProperties": false, "properties": { "os": { "title": "Os", @@ -31,6 +33,7 @@ "type": "object" }, "S": { + "additionalProperties": false, "properties": { "sname": { "title": "Sname", @@ -45,6 +48,7 @@ "type": "object" }, "T": { + "additionalProperties": false, "properties": { "tname": { "title": "Tname", diff --git a/src/acsets/schemas/jsonschema/PropertyLabelledReactionNet.json b/src/acsets/schemas/jsonschema/PropertyLabelledReactionNet.json index 0a5d837..f753ba4 100644 --- a/src/acsets/schemas/jsonschema/PropertyLabelledReactionNet.json +++ b/src/acsets/schemas/jsonschema/PropertyLabelledReactionNet.json @@ -3,6 +3,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "I": { + "additionalProperties": false, "properties": { "is": { "title": "Is", @@ -17,6 +18,7 @@ "type": "object" }, "O": { + "additionalProperties": false, "properties": { "os": { "title": "Os", @@ -31,6 +33,7 @@ "type": "object" }, "S": { + "additionalProperties": false, "properties": { "concentration": { "title": "Concentration", @@ -49,6 +52,7 @@ "type": "object" }, "T": { + "additionalProperties": false, "properties": { "rate": { "title": "Rate", diff --git a/src/acsets/schemas/jsonschema/PropertyPetriNet.json b/src/acsets/schemas/jsonschema/PropertyPetriNet.json index ea9b646..da31660 100644 --- a/src/acsets/schemas/jsonschema/PropertyPetriNet.json +++ b/src/acsets/schemas/jsonschema/PropertyPetriNet.json @@ -3,6 +3,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "I": { + "additionalProperties": false, "properties": { "is": { "title": "Is", @@ -17,6 +18,7 @@ "type": "object" }, "O": { + "additionalProperties": false, "properties": { "os": { "title": "Os", @@ -31,6 +33,7 @@ "type": "object" }, "S": { + "additionalProperties": false, "properties": { "sprop": { "title": "Sprop", @@ -41,6 +44,7 @@ "type": "object" }, "T": { + "additionalProperties": false, "properties": { "tprop": { "title": "Tprop", diff --git a/src/acsets/schemas/jsonschema/PropertyReactionNet.json b/src/acsets/schemas/jsonschema/PropertyReactionNet.json index d7825cb..76d1992 100644 --- a/src/acsets/schemas/jsonschema/PropertyReactionNet.json +++ b/src/acsets/schemas/jsonschema/PropertyReactionNet.json @@ -3,6 +3,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "I": { + "additionalProperties": false, "properties": { "is": { "title": "Is", @@ -17,6 +18,7 @@ "type": "object" }, "O": { + "additionalProperties": false, "properties": { "os": { "title": "Os", @@ -31,6 +33,7 @@ "type": "object" }, "S": { + "additionalProperties": false, "properties": { "concentration": { "title": "Concentration", @@ -45,6 +48,7 @@ "type": "object" }, "T": { + "additionalProperties": false, "properties": { "rate": { "title": "Rate", diff --git a/src/acsets/schemas/jsonschema/ReactionNet.json b/src/acsets/schemas/jsonschema/ReactionNet.json index 3239b14..b0c2897 100644 --- a/src/acsets/schemas/jsonschema/ReactionNet.json +++ b/src/acsets/schemas/jsonschema/ReactionNet.json @@ -3,6 +3,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "I": { + "additionalProperties": false, "properties": { "is": { "title": "Is", @@ -17,6 +18,7 @@ "type": "object" }, "O": { + "additionalProperties": false, "properties": { "os": { "title": "Os", @@ -31,6 +33,7 @@ "type": "object" }, "S": { + "additionalProperties": false, "properties": { "concentration": { "title": "Concentration", @@ -41,6 +44,7 @@ "type": "object" }, "T": { + "additionalProperties": false, "properties": { "rate": { "title": "Rate", diff --git a/src/acsets/schemas/jsonschema/SummationDecapode.json b/src/acsets/schemas/jsonschema/SummationDecapode.json index b1a8689..6a2154a 100644 --- a/src/acsets/schemas/jsonschema/SummationDecapode.json +++ b/src/acsets/schemas/jsonschema/SummationDecapode.json @@ -3,6 +3,7 @@ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "Op1": { + "additionalProperties": false, "properties": { "op1": { "title": "Op1", @@ -21,6 +22,7 @@ "type": "object" }, "Op2": { + "additionalProperties": false, "properties": { "op2": { "title": "Op2", @@ -43,6 +45,7 @@ "type": "object" }, "Summand": { + "additionalProperties": false, "properties": { "summand": { "title": "Summand", @@ -57,6 +60,7 @@ "type": "object" }, "TVar": { + "additionalProperties": false, "properties": { "incl": { "title": "Incl", @@ -67,6 +71,7 @@ "type": "object" }, "Var": { + "additionalProperties": false, "properties": { "name": { "title": "Name", @@ -81,6 +86,7 @@ "type": "object" }, "_": { + "additionalProperties": false, "properties": { "sum": { "title": "Sum",