Closed mikera closed 4 months ago
Hey, could you share your Gradle/Maven config? It looks like misconfigured annotation processor.
Thanks for looking at it! Sounds like a plausible diagnosis :-)
The pom file is here: https://github.com/Convex-Dev/convex/blob/develop/convex-restapi/pom.xml
FWIW, I'm building on Windows using Eclipse and Maven 3.9.4
And here is what I believe is the relevant annotation processor plugin:
<build>
<plugins>
....
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version>
<configuration>
<source>11</source>
<target>11</target>
<annotationProcessorPaths>
<annotationProcessorPath>
<groupId>io.javalin.community.openapi</groupId>
<artifactId>openapi-annotation-processor</artifactId>
<version>${javalin.version}</version>
</annotationProcessorPath>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
I'm not entirely clear where the openapi json is supposed to be put by default?
The Javalin server isn't particularly complex, though it does have a static file handler and a few API endpoints set up as well as the OpenAPI plugin with ReDoc and Swagger.
Hey, sorry, I totally missed the notification as I have quite a lot of them 😔 Just cloned your project and it looks fine for me:
I think the issue here is probably Eclipse - I assume that you're probably launching your app via some sort of their custom app runner, where annotation processing is disabled by default, so I'd start looking there. I guess you can start from something like this:
Thanks for checking @dzikoysk ! Will see if I can figure out what Eclipse is doing....
Hi, I'm hoping to use javalin-openapi
6.0.1
to document / test a REST APIThis issue I am having is that whenever I go to the swagger page at
http://localhost:8080/swagger
all I get is an error message saying "No API Definition provided".If I go to
http://localhost:8080/openapi
all I get is response is some empty JSON{}
No doubt I am doing something wrong, but it is very unclear what the problem is?
I have a (working) Javalin endpoint annotated as follows:
Any help / pointers much appreciated!