Repository: s-knibbs/dataclasses-jsonschema (python)

Issue:
Any type should generate an empty field schema
The following definition:

```py
@dataclass
class Parameter(JsonSchemaMixin):

    id: str
    type: ParameterTypeEnum
    value: Any
```

leads to schema like this:

```py
{'type': 'object', 'required': ['id', 'type', 'value'], 'properties': {'id': {'type': 'string'}, 'type': {'type': 'string', 'enum': ['string', 'double']}, 'value': {'type': 'object'}}}
```

But I would rather see:

```py
{'type': 'object', 'required': ['id', 'type', 'value'], 'properties': {'id': {'type': 'string'}, 'type': {'type': 'string', 'enum': ['string', 'double']}, 'value': {}}}
```

...where ```type``` for ```value``` is ommited, which means that ```value``` could be data of any type (string or number in this case). Is there a way how to achieve it? Many thanks.

Pull request description:
Now generate an empty schema for the `Any` type
Fixes #100 

Patch:
diff --git a/dataclasses_jsonschema/__init__.py b/dataclasses_jsonschema/__init__.py
index 8b79677..8d3e789 100644
--- a/dataclasses_jsonschema/__init__.py
+++ b/dataclasses_jsonschema/__init__.py
@@ -532,7 +532,7 @@ class JsonSchemaMixin:
 
     @classmethod
     def _get_field_schema(cls, field: Union[Field, Type], schema_type: SchemaType) -> Tuple[JsonDict, bool]:
-        field_schema: JsonDict = {'type': 'object'}
+        field_schema: JsonDict = {}
         required = True
 
         if isinstance(field, Field):


Test patch:
diff --git a/tests/test_core.py b/tests/test_core.py
index dc7041b..45b3532 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -4,7 +4,7 @@ from enum import Enum
 
 from dataclasses import dataclass, field
 from ipaddress import IPv4Address, IPv6Address
-from typing import List, NewType, Optional, Union, Set
+from typing import List, NewType, Optional, Union, Set, Any
 from typing_extensions import Final, Literal
 from uuid import UUID
 
@@ -747,3 +747,22 @@ def test_set_decode_encode():
     assert isinstance(expected_blog.to_dict()["tags"], list)
     assert len(expected_blog.to_dict()["tags"]) == 2
     assert BlogArticle.from_dict(expected_blog_dict) == expected_blog
+
+
+def test_any_type_schema():
+    @dataclass
+    class GraphNode(JsonSchemaMixin):
+        """A graph node"""
+        id: int
+        data: Any
+
+    expected_schema = compose_schema({
+        "type": "object",
+        "description": "A graph node",
+        "properties": {
+            "id": {"type": "integer"},
+            "data": {}
+        },
+        "required": ["id", "data"]
+    })
+    assert GraphNode.json_schema() == expected_schema