(self, data, **_)
return root
Wrap this with the root schema definitions.
Wrap this with the root schema definitions.
Wrap this with the root schema definitions .
def wrap(self, data, **_) -> typing.Dict[str, typing.Any]:
        """Wrap this with the root schema definitions."""
        if self.nested:  # no need to wrap, will be in outer defs
            return data

        cls = self.obj.__class__
        name = cls.__name__

        data["additionalProperties"] = _resolve_additional_properties(cls)

        self._nested_schema_classes[name] = data
        root = {
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": self._nested_schema_classes,
            "$ref": "#/definitions/{name}".format(name=name),
        }
        return root
def wrap ( self , data , * * _ ) -> typing . Dict [ str , typing . Any ] : if self . nested : # no need to wrap, will be in outer defs return data cls = self . obj . __class__ name = cls . __name__ data [ "additionalProperties" ] = _resolve_additional_properties ( cls ) self . _nested_schema_classes [ name ] = data root = { "$schema" : "http://json-schema.org/draft-07/schema#" , "definitions" : self . _nested_schema_classes , "$ref" : "#/definitions/{name}" . format ( name = name ) , } return root