Reputation: 4150
I am trying to generate api in a Spring project and I get:
[0:0]: unexpected error in Open-API generation
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
also I see IntelliJ complains in pom file for not finding dependencies like: surefire-junit-platform, junit-platform-surefire-provider, junit-jupiter-engine.
Is there a connection? How can I solve the Open API generation error?
Encoding file is ok
Upvotes: 1
Views: 6546
Reputation: 4150
So I found the reason for the string out of range. The error message is misleading because it refers to some issue in the api.yaml but the problem is in the path to the api.yaml (always a string for Java). I had the project folder with a space and this seems to cause all. So solution is to do not put space in name folder but an underscore.
Upvotes: 2