Generate code to instantiate an item from a JSON object.
(cls, type)
| 203 | |
| 204 | @classmethod |
| 205 | def from_json(cls, type): |
| 206 | """Generate code to instantiate an item from a JSON object.""" |
| 207 | return cls(type.get("type"), type.get("$ref")) |
| 208 | |
| 209 | |
| 210 | @dataclass |