Dict() should resolve to {"type": "object", "additionalProperties": {}}Dict will output the schema of the values field as additionalProperties, you can see that in the example below with Dict(values=Integer) -> additionalProperties: {type: integer} and Dict(values=Raw) -> additionalProperties: {} (OpenAPI's "any" type).
To my understanding, leaving values to its default of None will allow any value input, and is effectively the same as Dict(values=Raw()). So it would make more sense to output the same schema (additionalProperties: {}), but instead it omits additionalProperties entirely. This means only an empty object complies with the spec, which is obviously not the desired behavior of Dict().
python
from apispec import APISpec
from apispec.ext.marshmallow import MarshmallowPlugin
from marshmallow import Schema, fields
spec = APISpec(
title="Test",
version="1.0.0",
openapi_version="3.0.2",
plugins=[MarshmallowPlugin()],
)
class TestSchema(Schema):
id = fields.Int()
plain = fields.Dict()
raw = fields.Dict(values=fields.Raw)
integer = fields.Dict(values=fields.Integer)
spec.components.schema("Test", schema=TestSchema)
print(spec.to_yaml())