Skip to content

[BUG] BigDecimal not imported in 7.0.0 #16166

@OlliL

Description

@OlliL
Description

Client generation from that API:

		"parameters": [
			{
				"name": "amount",
				"in": "path",
				"required": true,
				"schema": {
					"type": "number"
				}
			},

full 'get' definition: https://github.com/OlliL/moneyjinn-server/blob/master/moneyjinn-server/src/main/resources/openapi/moneyflow/paths/SearchMoneyflowsByAmount.json

Is generated as:

  public SearchMoneyflowsByAmountResponse searchMoneyflowsByAmount(BigDecimal amount, String dateFromStr, String dateTilStr) throws ApiException {
    return this.searchMoneyflowsByAmount(amount, dateFromStr, dateTilStr, Collections.emptyMap());
  }

But: BigDecimal is not imported! The file can't be compiled:

MoneyflowControllerApi.java:[288,68] cannot find symbol
  symbol:   class BigDecimal
  location: class org.laladev.moneyjinn.hbci.backend.api.MoneyflowControllerApi
MoneyflowControllerApi.java:[303,68] cannot find symbol
  symbol:   class BigDecimal
  location: class org.laladev.moneyjinn.hbci.backend.api.MoneyflowControllerApi
openapi-generator version

7.0.0-beta generates this error.
6.6.0 works fine!

generator configuration
<configuration>
	<inputSpec>${project.basedir}/../moneyjinn-server/src/main/resources/openapi.json</inputSpec>
	<generatorName>java</generatorName>
	<apiPackage>org.laladev.moneyjinn.hbci.backend.api</apiPackage>
	<modelPackage>org.laladev.moneyjinn.hbci.backend.model</modelPackage>
	<skipOperationExample>true</skipOperationExample>
	<configOptions>
		<library>apache-httpclient</library>
		<sourceFolder>src/gen/java/main</sourceFolder>
		<useJakartaEe>true</useJakartaEe>
		<openApiNullable>false</openApiNullable>
		<useTags>true</useTags>
	</configOptions>
</configuration>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions