From 711981a4fa1fcc014f093211ae3258e8a8ccd116 Mon Sep 17 00:00:00 2001 From: Sebastien De Fauw Date: Wed, 16 Dec 2020 10:34:20 +0100 Subject: [PATCH] props_ordered does not work for nested fields --- marshmallow_jsonschema/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/marshmallow_jsonschema/base.py b/marshmallow_jsonschema/base.py index 6711955..435c121 100644 --- a/marshmallow_jsonschema/base.py +++ b/marshmallow_jsonschema/base.py @@ -287,7 +287,7 @@ def _from_nested_schema(self, obj, field): # If this is not a schema we've seen, and it's not this schema (checking this for recursive schemas), # put it in our list of schema defs if name not in self._nested_schema_classes and name != outer_name: - wrapped_nested = self.__class__(nested=True) + wrapped_nested = self.__class__(nested=True, props_ordered=self.props_ordered) wrapped_dumped = wrapped_nested.dump(nested_instance) wrapped_dumped["additionalProperties"] = _resolve_additional_properties(