OpenAPITools / OpenAPITools/openapi-generator

[BUG][JAVA] Crash generating Spring server from OpenBanking swagger

Open
#3,770 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug Server: Spring Swagger-Parser
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Description

I'm trying to generate a SpringBoot server using an OpenBanking swagger and I get the following error:

java.lang.RuntimeException: Could not process model 'CreditInterest'.Please make sure that your schema is correct!
I think the schema is correct, it is just very complex.

openapi-generator version

4.1.1

OpenAPI declaration file content or url

https://raw.githubusercontent.com/OpenBankingUK/read-write-api-specs/master/dist/account-info-openapi.yaml

Command line used for generation

java -jar openapi-generator-cli.jar generate -i account-info-openapi.3.yaml -g spring -o openapi-generator-openbanking3-test

Steps to reproduce

Download the swagger file and try to generate a spring server with -g spring

Related issues/PRs

N/A

Suggest a fix

The CreditInterest object has several nested objects. I'm trying to pinpoint what exactly make the generate fails

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by downloading the OpenBanking declaration from the linked URL and rerun the Java command with generator version 4.1.1 and the spring target. Trace processing of the CreditInterest model and its nested objects to identify where generation fails. Done means the Spring server generation completes for this declaration without the reported RuntimeException.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, openapi, spring
Domain
api, backend, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.