[BUG] skipFormModel property is set to true by default
Created by: DenisIstomin
Description
According to the documentation, property skipFormModel
should be false
by default.
To skip models defined as the form parameters in "requestBody", please use skipFormModel (default to false) (this option is introduced at v3.2.2)
But model is generated only when this property is explicitly set to false
:
<globalProperties>
<skipFormModel>false</skipFormModel>
</globalProperties>
openapi-generator version
5.0.1
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>5.0.1</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/openapi.yaml</inputSpec>
<generatorName>java</generatorName>
<generateModelTests>false</generateModelTests>
<generateApis>false</generateApis>
<generateSupportingFiles>false</generateSupportingFiles>
<configOptions>
<dateLibrary>java8</dateLibrary>
<hideGenerationTimestamp>true</hideGenerationTimestamp>
<serializationLibrary>jackson</serializationLibrary>
<library>resttemplate</library>
<useBeanValidation>true</useBeanValidation>
<performBeanValidation>true</performBeanValidation>
<modelPackage>com.example</modelPackage>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
OpenAPI declaration file content or url
openapi: 3.0.0
info:
title: Title
version: 1.0.0
paths:
/operation:
post:
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
task:
$ref: '#/components/schemas/Entity'
fileContent:
type: string
format: binary
responses:
'200':
description: 'OK'
components:
schemas:
Entity:
type: object
properties:
Id:
type: string