Open Planche95 opened 3 years ago
I had just tested it on latest 6.0.0 snapshot and 5.2.0 snapshot locally and it is not fixed in none of those.
I have the same issue.
Using this schema
Error:
type: object
example:
timestamp: '2021-05-19T16:56:04.969+00:00'
status: 409
error: Conflict
message: Application already exits
path: /public/subscriptions
properties:
timestamp:
type: string
format: date-time
status:
type: integer
error:
type: string
message:
type: string
debugMessage:
type: string
path:
type: string
errors:
type: array
items:
anyOf:
- $ref: '#/components/schemas/ValidationError'
ValidationError:
title: ValidationError
type: object
description: ''
properties:
object:
type: string
field:
type: string
rejectedValue:
type: object
message:
type: string
and this configuration of the maven plugin:
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>5.1.0</version>
<executions>
<execution>
<id>Java Spring server stub generation</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/openapi/subscription.yaml</inputSpec>
<generatorName>spring</generatorName>
<generateApis>true</generateApis>
<generateModels>true</generateModels>
<generateModelDocumentation>false</generateModelDocumentation>
<generateModelTests>false</generateModelTests>
<generateSupportingFiles>true</generateSupportingFiles>
<configOptions>
<unhandledException>true</unhandledException>
<library>spring-cloud</library>
<openApiNullable>false</openApiNullable>
<dateLibrary>java8</dateLibrary>
</configOptions>
<output>${project.build.directory}/generated-sources/java-server</output>
</configuration>
</execution>
</executions>
</plugin>
I'm facing this problem with openapi-generator 5.2.1.
Bug Report Checklist
Description
When I'm trying to build code generated from the OpenApi spec file with "anyOf", it fails because of the lack of "AnyOfAWSPreferenceAzurePreference" class.
openapi-generator version
5.1.1
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
I'm using this script:
call it with:
sh generate-models.sh feature preferences Governance-Core-PreferencesAPI-Target-V1.0.yaml 1.0.0
Related issues/PRs
Suggest a fix