Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][JAVA] Unable to generate mailpit openapi spec #20607

Open
carolosf opened this issue Feb 6, 2025 · 0 comments
Open

[BUG][JAVA] Unable to generate mailpit openapi spec #20607

carolosf opened this issue Feb 6, 2025 · 0 comments

Comments

@carolosf
Copy link

carolosf commented Feb 6, 2025

When trying to generate this spec:
https://raw.githubusercontent.com/axllent/mailpit/refs/tags/v1.22.0/server/ui/api/v1/swagger.json

In this project:
https://github.com/carolosf/quarkus-mailpit/blob/openapi_spec_update/testing/pom.xml
Copy swagger.json over https://github.com/carolosf/quarkus-mailpit/blob/openapi_spec_update/testing/src/conf/openapi.json

Run mvn compile in the testing sub project.

OR using the latest snapshot
java -jar ~/Downloads/openapi-generator-cli-8.0.0-20240727.184357-6.jar generate -g java -i https://raw.githubusercontent.com/axllent/mailpit/refs/tags/v1.22.0/server/ui/api/v1/swagger.json -o /var/tmp/java-client-test --skip-validate-spec

[main] INFO  o.o.codegen.DefaultGenerator - Model MessageHeadersResponse not generated since it's an alias to map (without property) and `generateAliasAsModel` is set to false (default)
Exception in thread "main" java.lang.StackOverflowError
	at java.base/java.lang.StringLatin1.replace(StringLatin1.java:453)
	at java.base/java.lang.String.replace(String.java:3142)
	at org.openapitools.codegen.utils.ModelUtils.getSimpleRef(ModelUtils.java:405)
	at org.openapitools.codegen.utils.ModelUtils.unaliasSchema(ModelUtils.java:1351)
	at org.openapitools.codegen.utils.ModelUtils.unaliasSchema(ModelUtils.java:1397)
	at org.openapitools.codegen.utils.ModelUtils.unaliasSchema(ModelUtils.java:1397)
	at org.openapitools.codegen.utils.ModelUtils.unaliasSchema(ModelUtils.java:1397)
	at org.openapitools.codegen.utils.ModelUtils.unaliasSchema(ModelUtils.java:1397)
	at org.openapitools.codegen.utils.ModelUtils.unaliasSchema(ModelUtils.java:1397)
	at org.openapitools.codegen.utils.ModelUtils.unaliasSchema(ModelUtils.java:1397)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant