[BUG][PYTHON] 3.1 property with `additionalProperties` without `type` isn't deserialized
Author: brettkail-wkCreated Sep 29, 2026Updated Sep 29, 2026
LabelsIssue: Bug
Description
With the python generator, an openapi: 3.1.0 schema with a property that has additionalProperties but no type: object serializes correctly but is ignored during deserialization. The same schema works for other 3.1 generators (e.g., java, typescript-fetch) and for the python generator when using openapi: 3.0.0.
As a workaround, explicit type: object fixes the issue.
openapi-generator version
7.25.0
OpenAPI declaration file content or url
openapi: 3.1.0
info:
version: 1.0.0
title: 'Example'
paths: {}
components:
schemas:
Example:
properties:
map:
#type: object
additionalProperties:
type: stringGeneration Details
java -jar openapi-generator-cli-7.25.0.jar generate -i example.yaml -o example -g pythonSteps to reproduce
Run generator, and observe the from_dict excludes the field. After installing requirements.txt:
$ python -c 'from openapi_client.models.example import Example; print(Example(map={"k": "v"}).to_json())'
{"map": {"k": "v"}}
$ python -c 'from openapi_client.models.example import Example; print(Example.from_json("{\"map\": {\"k\": \"v\"}}"))'
map=NoneRelated issues/PRs
Suggest a fix
I see that updateParameterForMap sets isMap = true, but updatePropertyForMap doesn't.
Source: OpenAPITools/openapi-generator