diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index d30d8db..18cb18c 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -6,6 +6,9 @@ Changelog
 
 Features:
 
+- *Backwards-incompatible* Marshmallow ``fields.Raw`` and ``fields.Field`` are
+  now represented by OpenAPI `Any Type <https://swagger.io/docs/specification/data-models/data-types/#any>`_.
+  (:pr:`495`)
 - Add support for generating user defined OpenAPI properties for custom field
   classes via an ``add_attribute_function`` method. (:pr:`478`)
 - *Backwards-incompatible*: The ``schema_name_resolver`` function now receives
diff --git a/src/apispec/ext/marshmallow/field_converter.py b/src/apispec/ext/marshmallow/field_converter.py
index 1340ca3..8069eb3 100644
--- a/src/apispec/ext/marshmallow/field_converter.py
+++ b/src/apispec/ext/marshmallow/field_converter.py
@@ -37,9 +37,8 @@ DEFAULT_FIELD_MAPPING = {
     marshmallow.fields.Email: ("string", "email"),
     marshmallow.fields.URL: ("string", "url"),
     marshmallow.fields.Dict: ("object", None),
-    # Assume base Field and Raw are strings
-    marshmallow.fields.Field: ("string", None),
-    marshmallow.fields.Raw: ("string", None),
+    marshmallow.fields.Field: (None, None),
+    marshmallow.fields.Raw: (None, None),
     marshmallow.fields.List: ("array", None),
 }
 
@@ -183,8 +182,9 @@ class FieldConverterMixin:
             )
             type_, fmt = "string", None
 
-        ret = {"type": type_}
-
+        ret = {}
+        if type_:
+            ret["type"] = type_
         if fmt:
             ret["format"] = fmt
 
@@ -413,7 +413,6 @@ class FieldConverterMixin:
         :rtype: dict
         """
         if isinstance(field, marshmallow.fields.Nested):
-            del ret["type"]
             schema_dict = self.resolve_nested_schema(field.schema)
             if ret and "$ref" in schema_dict:
                 ret.update({"allOf": [schema_dict]})

Representing openapi's "Any Type"
I am trying to use `marshmallow.fields.Raw` to represent a "arbitrary json" field. Currently I do not see a way to represent a field in marshmallow that will produce a openapi property that is empty when passed through apispec.

The code in `apispec.marshmallow.openapi.OpenAPIConverter.field2type_and_format` (see https://github.com/marshmallow-code/apispec/blob/dev/apispec/ext/marshmallow/openapi.py#L159-L173) unconditionally sets the key `type` in the property object. However it seems that it is legal in openapi to have an empty schema (without the `type` key) which permits any type (see the "Any Type" section at the bottom of https://swagger.io/docs/specification/data-models/data-types/)

Please advise if this is possible with the current codebase or if I will need to implement a custom solution. Thanks.
diff --git a/tests/test_ext_marshmallow_field.py b/tests/test_ext_marshmallow_field.py
index dd520d4..63d9514 100644
--- a/tests/test_ext_marshmallow_field.py
+++ b/tests/test_ext_marshmallow_field.py
@@ -34,9 +34,6 @@ def test_field2choices_preserving_order(openapi):
         (fields.Time, "string"),
         (fields.Email, "string"),
         (fields.URL, "string"),
-        # Assume base Field and Raw are strings
-        (fields.Field, "string"),
-        (fields.Raw, "string"),
         # Custom fields inherit types from their parents
         (CustomStringField, "string"),
         (CustomIntegerField, "integer"),
@@ -48,6 +45,13 @@ def test_field2property_type(FieldClass, jsontype, spec_fixture):
     assert res["type"] == jsontype
 
 
+@pytest.mark.parametrize("FieldClass", [fields.Field, fields.Raw])
+def test_field2property_no_type_(FieldClass, spec_fixture):
+    field = FieldClass()
+    res = spec_fixture.openapi.field2property(field)
+    assert "type" not in res
+
+
 @pytest.mark.parametrize("ListClass", [fields.List, CustomList])
 def test_formatted_field_translates_to_array(ListClass, spec_fixture):
     field = ListClass(fields.String)

pip install -e .[dev]
parse_log_pytest
pytest
pytest
3.9
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
-e git+https://github.com/marshmallow-code/apispec.git@7016ebc7550780a54277f40959b1686774be08f9#egg=apispec
aspy.yaml==1.3.0
attrs==25.3.0
cachetools==5.5.2
certifi==2025.1.31
cfgv==3.4.0
chardet==5.2.0
charset-normalizer==3.4.1
colorama==0.4.6
distlib==0.3.9
entrypoints==0.3
exceptiongroup @ file:///croot/exceptiongroup_1706031385326/work
filelock==3.18.0
flake8==3.7.8
flake8-bugbear==19.8.0
identify==2.6.9
idna==3.10
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
jsonschema==4.17.3
jsonschema-spec==0.1.6
lazy-object-proxy==1.10.0
marshmallow==3.26.1
mccabe==0.6.1
mock==5.2.0
nodeenv==1.9.1
openapi-schema-validator==0.4.4
openapi-spec-validator==0.5.7
packaging @ file:///croot/packaging_1734472117206/work
pathable==0.4.4
platformdirs==4.3.7
pluggy @ file:///croot/pluggy_1733169602837/work
prance==23.6.21.0
pre-commit==1.21.0
pycodestyle==2.5.0
pyflakes==2.1.1
pyproject-api==1.9.0
pyrsistent==0.20.0
pytest @ file:///croot/pytest_1738938843180/work
PyYAML==6.0.2
requests==2.32.3
rfc3339-validator==0.1.4
ruamel.yaml==0.18.10
ruamel.yaml.clib==0.2.12
six==1.17.0
toml==0.10.2
tomli==2.2.1
tox==4.25.0
typing_extensions==4.13.0
urllib3==2.3.0
virtualenv==20.29.3

name: apispec
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - exceptiongroup=1.2.0=py39h06a4308_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - packaging=24.2=py39h06a4308_0
  - pip=25.0=py39h06a4308_0
  - pluggy=1.5.0=py39h06a4308_0
  - pytest=8.3.4=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - aspy-yaml==1.3.0
      - attrs==25.3.0
      - cachetools==5.5.2
      - certifi==2025.1.31
      - cfgv==3.4.0
      - chardet==5.2.0
      - charset-normalizer==3.4.1
      - colorama==0.4.6
      - distlib==0.3.9
      - entrypoints==0.3
      - filelock==3.18.0
      - flake8==3.7.8
      - flake8-bugbear==19.8.0
      - identify==2.6.9
      - idna==3.10
      - jsonschema==4.17.3
      - jsonschema-spec==0.1.6
      - lazy-object-proxy==1.10.0
      - marshmallow==3.26.1
      - mccabe==0.6.1
      - mock==5.2.0
      - nodeenv==1.9.1
      - openapi-schema-validator==0.4.4
      - openapi-spec-validator==0.5.7
      - pathable==0.4.4
      - platformdirs==4.3.7
      - prance==23.6.21.0
      - pre-commit==1.21.0
      - pycodestyle==2.5.0
      - pyflakes==2.1.1
      - pyproject-api==1.9.0
      - pyrsistent==0.20.0
      - pyyaml==6.0.2
      - requests==2.32.3
      - rfc3339-validator==0.1.4
      - ruamel-yaml==0.18.10
      - ruamel-yaml-clib==0.2.12
      - six==1.17.0
      - toml==0.10.2
      - tomli==2.2.1
      - tox==4.25.0
      - typing-extensions==4.13.0
      - urllib3==2.3.0
      - virtualenv==20.29.3
prefix: /opt/conda/envs/apispec

tests/test_ext_marshmallow_field.py::test_field2property_no_type_[2.0-Field] tests/test_ext_marshmallow_field.py::test_field2property_no_type_[2.0-Raw] tests/test_ext_marshmallow_field.py::test_field2property_no_type_[3.0.0-Field] tests/test_ext_marshmallow_field.py::test_field2property_no_type_[3.0.0-Raw]
tests/test_ext_marshmallow_field.py::test_field2choices_preserving_order[2.0] tests/test_ext_marshmallow_field.py::test_field2choices_preserving_order[3.0.0] tests/test_ext_marshmallow_field.py::test_field2property_type[2.0-Integer-integer] tests/test_ext_marshmallow_field.py::test_field2property_type[2.0-Number-number] tests/test_ext_marshmallow_field.py::test_field2property_type[2.0-Float-number] tests/test_ext_marshmallow_field.py::test_field2property_type[2.0-String-string0] tests/test_ext_marshmallow_field.py::test_field2property_type[2.0-String-string1] tests/test_ext_marshmallow_field.py::test_field2property_type[2.0-Boolean-boolean0] tests/test_ext_marshmallow_field.py::test_field2property_type[2.0-Boolean-boolean1] tests/test_ext_marshmallow_field.py::test_field2property_type[2.0-UUID-string] tests/test_ext_marshmallow_field.py::test_field2property_type[2.0-DateTime-string] tests/test_ext_marshmallow_field.py::test_field2property_type[2.0-Date-string] tests/test_ext_marshmallow_field.py::test_field2property_type[2.0-Time-string] tests/test_ext_marshmallow_field.py::test_field2property_type[2.0-Email-string] tests/test_ext_marshmallow_field.py::test_field2property_type[2.0-Url-string] tests/test_ext_marshmallow_field.py::test_field2property_type[2.0-CustomStringField-string] tests/test_ext_marshmallow_field.py::test_field2property_type[2.0-CustomIntegerField-integer] tests/test_ext_marshmallow_field.py::test_field2property_type[3.0.0-Integer-integer] tests/test_ext_marshmallow_field.py::test_field2property_type[3.0.0-Number-number] tests/test_ext_marshmallow_field.py::test_field2property_type[3.0.0-Float-number] tests/test_ext_marshmallow_field.py::test_field2property_type[3.0.0-String-string0] tests/test_ext_marshmallow_field.py::test_field2property_type[3.0.0-String-string1] tests/test_ext_marshmallow_field.py::test_field2property_type[3.0.0-Boolean-boolean0] tests/test_ext_marshmallow_field.py::test_field2property_type[3.0.0-Boolean-boolean1] tests/test_ext_marshmallow_field.py::test_field2property_type[3.0.0-UUID-string] tests/test_ext_marshmallow_field.py::test_field2property_type[3.0.0-DateTime-string] tests/test_ext_marshmallow_field.py::test_field2property_type[3.0.0-Date-string] tests/test_ext_marshmallow_field.py::test_field2property_type[3.0.0-Time-string] tests/test_ext_marshmallow_field.py::test_field2property_type[3.0.0-Email-string] tests/test_ext_marshmallow_field.py::test_field2property_type[3.0.0-Url-string] tests/test_ext_marshmallow_field.py::test_field2property_type[3.0.0-CustomStringField-string] tests/test_ext_marshmallow_field.py::test_field2property_type[3.0.0-CustomIntegerField-integer] tests/test_ext_marshmallow_field.py::test_formatted_field_translates_to_array[2.0-List] tests/test_ext_marshmallow_field.py::test_formatted_field_translates_to_array[2.0-CustomList] tests/test_ext_marshmallow_field.py::test_formatted_field_translates_to_array[3.0.0-List] tests/test_ext_marshmallow_field.py::test_formatted_field_translates_to_array[3.0.0-CustomList] tests/test_ext_marshmallow_field.py::test_field2property_formats[2.0-Integer-int32] tests/test_ext_marshmallow_field.py::test_field2property_formats[2.0-Float-float] tests/test_ext_marshmallow_field.py::test_field2property_formats[2.0-UUID-uuid] tests/test_ext_marshmallow_field.py::test_field2property_formats[2.0-DateTime-date-time] tests/test_ext_marshmallow_field.py::test_field2property_formats[2.0-Date-date] tests/test_ext_marshmallow_field.py::test_field2property_formats[2.0-Email-email] tests/test_ext_marshmallow_field.py::test_field2property_formats[2.0-Url-url] tests/test_ext_marshmallow_field.py::test_field2property_formats[3.0.0-Integer-int32] tests/test_ext_marshmallow_field.py::test_field2property_formats[3.0.0-Float-float] tests/test_ext_marshmallow_field.py::test_field2property_formats[3.0.0-UUID-uuid] tests/test_ext_marshmallow_field.py::test_field2property_formats[3.0.0-DateTime-date-time] tests/test_ext_marshmallow_field.py::test_field2property_formats[3.0.0-Date-date] tests/test_ext_marshmallow_field.py::test_field2property_formats[3.0.0-Email-email] tests/test_ext_marshmallow_field.py::test_field2property_formats[3.0.0-Url-url] tests/test_ext_marshmallow_field.py::test_field_with_description[2.0] tests/test_ext_marshmallow_field.py::test_field_with_description[3.0.0] tests/test_ext_marshmallow_field.py::test_field_with_missing[2.0] tests/test_ext_marshmallow_field.py::test_field_with_missing[3.0.0] tests/test_ext_marshmallow_field.py::test_boolean_field_with_false_missing[2.0] tests/test_ext_marshmallow_field.py::test_boolean_field_with_false_missing[3.0.0] tests/test_ext_marshmallow_field.py::test_datetime_field_with_missing[2.0] tests/test_ext_marshmallow_field.py::test_datetime_field_with_missing[3.0.0] tests/test_ext_marshmallow_field.py::test_field_with_missing_callable[2.0] tests/test_ext_marshmallow_field.py::test_field_with_missing_callable[3.0.0] tests/test_ext_marshmallow_field.py::test_field_with_doc_default[2.0] tests/test_ext_marshmallow_field.py::test_field_with_doc_default[3.0.0] tests/test_ext_marshmallow_field.py::test_field_with_doc_default_and_missing[2.0] tests/test_ext_marshmallow_field.py::test_field_with_doc_default_and_missing[3.0.0] tests/test_ext_marshmallow_field.py::test_field_with_choices[2.0] tests/test_ext_marshmallow_field.py::test_field_with_choices[3.0.0] tests/test_ext_marshmallow_field.py::test_field_with_equal[2.0] tests/test_ext_marshmallow_field.py::test_field_with_equal[3.0.0] tests/test_ext_marshmallow_field.py::test_only_allows_valid_properties_in_metadata[2.0] tests/test_ext_marshmallow_field.py::test_only_allows_valid_properties_in_metadata[3.0.0] tests/test_ext_marshmallow_field.py::test_field_with_choices_multiple[2.0] tests/test_ext_marshmallow_field.py::test_field_with_choices_multiple[3.0.0] tests/test_ext_marshmallow_field.py::test_field_with_additional_metadata[2.0] tests/test_ext_marshmallow_field.py::test_field_with_additional_metadata[3.0.0] tests/test_ext_marshmallow_field.py::test_field_with_allow_none[2.0] tests/test_ext_marshmallow_field.py::test_field_with_allow_none[3.0.0] tests/test_ext_marshmallow_field.py::test_field_with_str_regex[2.0] tests/test_ext_marshmallow_field.py::test_field_with_str_regex[3.0.0] tests/test_ext_marshmallow_field.py::test_field_with_pattern_obj_regex[2.0] tests/test_ext_marshmallow_field.py::test_field_with_pattern_obj_regex[3.0.0] tests/test_ext_marshmallow_field.py::test_field_with_no_pattern[2.0] tests/test_ext_marshmallow_field.py::test_field_with_no_pattern[3.0.0] tests/test_ext_marshmallow_field.py::test_field_with_multiple_patterns[2.0] tests/test_ext_marshmallow_field.py::test_field_with_multiple_patterns[3.0.0] tests/test_ext_marshmallow_field.py::test_field2property_nested_spec_metadatas[2.0] tests/test_ext_marshmallow_field.py::test_field2property_nested_spec_metadatas[3.0.0] tests/test_ext_marshmallow_field.py::test_field2property_nested_spec[2.0] tests/test_ext_marshmallow_field.py::test_field2property_nested_spec[3.0.0] tests/test_ext_marshmallow_field.py::test_field2property_nested_many_spec[2.0] tests/test_ext_marshmallow_field.py::test_field2property_nested_many_spec[3.0.0] tests/test_ext_marshmallow_field.py::test_field2property_nested_ref[2.0] tests/test_ext_marshmallow_field.py::test_field2property_nested_ref[3.0.0] tests/test_ext_marshmallow_field.py::test_field2property_nested_many[2.0] tests/test_ext_marshmallow_field.py::test_field2property_nested_many[3.0.0] tests/test_ext_marshmallow_field.py::test_nested_field_with_property[2.0] tests/test_ext_marshmallow_field.py::test_nested_field_with_property[3.0.0] tests/test_ext_marshmallow_field.py::test_custom_properties_for_custom_fields
CHANGELOG.rst src/apispec/ext/marshmallow/field_converter.py
CHANGELOG.rst src/apispec/ext/marshmallow/field_converter.py