src/property.py
def _process(self):
        """
         This method loads all values from the dictionary into the class so type information can
         be queried when we generate the package. This includes:
          - determing what models to import
          - determining the enum classes to import
          - generating the type marshalling string for the `from_dict` method
          - providing more type hint details
        """
        type_class = self.raw_property_dict.get("$ref")
        self.description = self.raw_property_dict.get(
            "description", ""
        ).replace("\n", "").replace("<br>", "\n        ").replace(" \n", "\n").strip()

        if type_class and "enum" in self.raw_property_dict:
            self.enum_domain = self.raw_property_dict["enum"]
            self.json_type = "enum"
            self.type = type_class

        elif "type" in self.raw_property_dict and self.raw_property_dict["type"] == "array":
            self.json_type = "array"
            self.type = "list"

            items = self.raw_property_dict["items"]
            if "enum" in items:
                self.json_sub_type = "enum"
                self.enum_domain = items["$ref"]
                self.sub_type = items["$ref"]
                self.enum_domain = items["enum"]
            elif "$ref" in items and not get_py_type(items["$ref"]):
                self.json_sub_type = items["$ref"]
                self.sub_type = items["$ref"]
            else:
                self.json_sub_type = items["type"]
                self.sub_type = get_py_type(items["type"])

        elif type_class and type_class.startswith("Map"):
            self.json_type = "Map"
            self.type = "dict"
            key_label, value_label = type_class.replace("Map[", "").replace("]", "").split(",")
            self.json_sub_type = key_label, value_label

            if get_py_type(key_label):
                key_label = get_py_type(key_label)
            if get_py_type(value_label):
                value_label = get_py_type(value_label)

            self.sub_type = key_label, value_label

        elif type_class == "File":
            self.type = "file"
            self.json_type = "File"

        elif type_class == "Set" and "items" in self.raw_property_dict:
            items = self.raw_property_dict["items"]
            self.type = "set"
            self.json_type = "Set"
            if "enum" in items:
                self.json_sub_type = "enum"
                self.sub_type = items["$ref"]
                self.enum_domain = items["enum"]
            elif "$ref" in items and get_py_type(items["$ref"]):
                self.sub_type = get_py_type(items["$ref"])
                self.json_sub_type = items["$ref"]
            elif "$ref" in items:
                self.sub_type = items["$ref"]
                self.json_sub_type = items["$ref"]
            elif "type" in items:
                self.sub_type = get_py_type(items["type"])
                self.json_sub_type = items["type"]

        elif "type" in self.raw_property_dict:
            self.json_type = self.raw_property_dict["type"]
            self.type = self.raw_property_dict["type"]
            if get_py_type(self.raw_property_dict["type"]):
                self.type = get_py_type(self.raw_property_dict["type"])

        elif "$ref" in self.raw_property_dict and not get_py_type(self.raw_property_dict["$ref"]):
            self.json_type = self.raw_property_dict["$ref"]
            self.type = self.raw_property_dict["$ref"]

         This method loads all values from the dictionary into the class so type information can
         be queried when we generate the package. This includes:
          - determing what models to import
          - determining the enum classes to import
          - generating the type marshalling string for the `from_dict` method
          - providing more type hint details
        
This method loads all values from the dictionary into the class so type information can
be queried when we generate the package. This includes:
determing what models to import
determining the enum classes to import
generating the type marshalling string for the `from_dict` method
providing more type hint details
This method loads all values from the dictionary into the class so type information can be queried when we generate the package . This includes : determing what models to import determining the enum classes to import generating the type marshalling string for the ` from_dict ` method providing more type hint details
def _process(self):
        type_class = self.raw_property_dict.get("$ref")
        self.description = self.raw_property_dict.get(
            "description", ""
        ).replace("\n", "").replace("<br>", "\n        ").replace(" \n", "\n").strip()
        if type_class and "enum" in self.raw_property_dict:
            self.enum_domain = self.raw_property_dict["enum"]
            self.json_type = "enum"
            self.type = type_class
        elif "type" in self.raw_property_dict and self.raw_property_dict["type"] == "array":
            self.json_type = "array"
            self.type = "list"
            items = self.raw_property_dict["items"]
            if "enum" in items:
                self.json_sub_type = "enum"
                self.enum_domain = items["$ref"]
                self.sub_type = items["$ref"]
                self.enum_domain = items["enum"]
            elif "$ref" in items and not get_py_type(items["$ref"]):
                self.json_sub_type = items["$ref"]
                self.sub_type = items["$ref"]
            else:
                self.json_sub_type = items["type"]
                self.sub_type = get_py_type(items["type"])
        elif type_class and type_class.startswith("Map"):
            self.json_type = "Map"
            self.type = "dict"
            key_label, value_label = type_class.replace("Map[", "").replace("]", "").split(",")
            self.json_sub_type = key_label, value_label
            if get_py_type(key_label):
                key_label = get_py_type(key_label)
            if get_py_type(value_label):
                value_label = get_py_type(value_label)
            self.sub_type = key_label, value_label
        elif type_class == "File":
            self.type = "file"
            self.json_type = "File"
        elif type_class == "Set" and "items" in self.raw_property_dict:
            items = self.raw_property_dict["items"]
            self.type = "set"
            self.json_type = "Set"
            if "enum" in items:
                self.json_sub_type = "enum"
                self.sub_type = items["$ref"]
                self.enum_domain = items["enum"]
            elif "$ref" in items and get_py_type(items["$ref"]):
                self.sub_type = get_py_type(items["$ref"])
                self.json_sub_type = items["$ref"]
            elif "$ref" in items:
                self.sub_type = items["$ref"]
                self.json_sub_type = items["$ref"]
            elif "type" in items:
                self.sub_type = get_py_type(items["type"])
                self.json_sub_type = items["type"]
        elif "type" in self.raw_property_dict:
            self.json_type = self.raw_property_dict["type"]
            self.type = self.raw_property_dict["type"]
            if get_py_type(self.raw_property_dict["type"]):
                self.type = get_py_type(self.raw_property_dict["type"])
        elif "$ref" in self.raw_property_dict and not get_py_type(self.raw_property_dict["$ref"]):
            self.json_type = self.raw_property_dict["$ref"]
            self.type = self.raw_property_dict["$ref"]
def _process ( self ) : type_class = self . raw_property_dict . get ( "$ref" ) self . description = self . raw_property_dict . get ( "description" , "" ) . replace ( "\n" , "" ) . replace ( "<br>" , "\n        " ) . replace ( " \n" , "\n" ) . strip ( ) if type_class and "enum" in self . raw_property_dict : self . enum_domain = self . raw_property_dict [ "enum" ] self . json_type = "enum" self . type = type_class elif "type" in self . raw_property_dict and self . raw_property_dict [ "type" ] == "array" : self . json_type = "array" self . type = "list" items = self . raw_property_dict [ "items" ] if "enum" in items : self . json_sub_type = "enum" self . enum_domain = items [ "$ref" ] self . sub_type = items [ "$ref" ] self . enum_domain = items [ "enum" ] elif "$ref" in items and not get_py_type ( items [ "$ref" ] ) : self . json_sub_type = items [ "$ref" ] self . sub_type = items [ "$ref" ] else : self . json_sub_type = items [ "type" ] self . sub_type = get_py_type ( items [ "type" ] ) elif type_class and type_class . startswith ( "Map" ) : self . json_type = "Map" self . type = "dict" key_label , value_label = type_class . replace ( "Map[" , "" ) . replace ( "]" , "" ) . split ( "," ) self . json_sub_type = key_label , value_label if get_py_type ( key_label ) : key_label = get_py_type ( key_label ) if get_py_type ( value_label ) : value_label = get_py_type ( value_label ) self . sub_type = key_label , value_label elif type_class == "File" : self . type = "file" self . json_type = "File" elif type_class == "Set" and "items" in self . raw_property_dict : items = self . raw_property_dict [ "items" ] self . type = "set" self . json_type = "Set" if "enum" in items : self . json_sub_type = "enum" self . sub_type = items [ "$ref" ] self . enum_domain = items [ "enum" ] elif "$ref" in items and get_py_type ( items [ "$ref" ] ) : self . sub_type = get_py_type ( items [ "$ref" ] ) self . json_sub_type = items [ "$ref" ] elif "$ref" in items : self . sub_type = items [ "$ref" ] self . json_sub_type = items [ "$ref" ] elif "type" in items : self . sub_type = get_py_type ( items [ "type" ] ) self . json_sub_type = items [ "type" ] elif "type" in self . raw_property_dict : self . json_type = self . raw_property_dict [ "type" ] self . type = self . raw_property_dict [ "type" ] if get_py_type ( self . raw_property_dict [ "type" ] ) : self . type = get_py_type ( self . raw_property_dict [ "type" ] ) elif "$ref" in self . raw_property_dict and not get_py_type ( self . raw_property_dict [ "$ref" ] ) : self . json_type = self . raw_property_dict [ "$ref" ] self . type = self . raw_property_dict [ "$ref" ]
This method loads all values from the dictionary into the class so type information can
be queried when we generate the package.
This method loads all values from the dictionary into the class so type information can be queried when we generate the package .
"""
         This method loads all values from the dictionary into the class so type information can
         be queried when we generate the package. This includes:
          - determing what models to import
          - determining the enum classes to import
          - generating the type marshalling string for the `from_dict` method
          - providing more type hint details
        """
self