diff --git a/Makefile b/Makefile index c27b250dabb1fc32af8f3b6178869c5124c7c4e1..045f2d2a77f2dd0314f875264b1e6ea6f5c0688a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ PROJECT = yangson -VERSION = 1.3.6 +VERSION = 1.3.7 .PHONY = tags deps install-deps test tags: diff --git a/yangson/schemanode.py b/yangson/schemanode.py index 897e73e46fb654d55408096353807583a9ea569c..28b180855d430758f5d2deb4f60db6d5aa8a7467 100644 --- a/yangson/schemanode.py +++ b/yangson/schemanode.py @@ -151,6 +151,8 @@ class SchemaNode: def _node_digest(self) -> Dict[str, Any]: """Return dictionary of receiver's properties suitable for clients.""" res = { "kind": self._yang_class() } + if self.mandatory: + res["mandatory"] = True if self.description: res["description"] = self.description return res