javalin / javalin-openapi

Annotation processor for compile-time OpenAPI & JsonSchema, with out-of-the-box support for Javalin 5.x, Swagger & ReDoc
https://github.com/javalin/javalin-openapi/wiki
Apache License 2.0
44 stars 17 forks source link

Missing source file and line in the error messages from kapt #95

Closed IvanPizhenko closed 1 year ago

IvanPizhenko commented 2 years ago

Example:

Cannot add @io.javalin.openapi.OpenApiContent(properties={}, format="-- This string represents a null value and shouldn't be used --", type="-- This string represents a null value and shouldn't be used --", mimeType="AUTODETECT - Will be replaced later", from=io.javalin.openapi.NULL_CLASS), OpenApi generator cannot find matching mime type

It would be very helpful if it would output FILENAME:LINE: error: rest of error message, where FILENAME:LINE corresponds to file and line where that OpenApiContent is located.

dzikoysk commented 2 years ago

Hmm I need to take a look on the "API". It's basically just a couple of interfaces on top of the raw compiler implementation, but in theory it should be possible to find position in source.