I have an OpenAPI Description with the following structure:
Schema1:
type: object
properties:
timestamp:
type: string
format: date-time
additionalProperties:
$ref: "#/components/schemas/Schema2"
When I generate classes via the openapi-generator-maven-plugin
with the option <generateAliasAsModel>true</generateAliasAsModel>
,
the additionalProperties
are generated as expected with Map<String, Schema2> additionalProperties
.
However, in my OAS description under /v3/api-docs,
additionalProperties
are not shown in the schema.
{
"Schema1": {
"type": "object",
"properties": {
"timestamp": {
"type": "string",
"format": "date-time"
}
}
}
}
I used the springdoc-openapi-starter-webmvc-ui
for the generation of the OAS docs.
Is there a way to fix that or is there an alternative instead of additionalProperties
for a map implementation?