Closed Snap252 closed 1 year ago
Hi,
what it is trying to tell us is that the annotation parameter value is wrong. The parameter should be an explicit value and not a class name. For example you could write
- type: NachrichtValidationPart @ de.ba.kodi.nachrichten.validation.plausibility.AlreadySent(groups = "foo")
The processor does not know what value the parameter should have, so you have to provide it in the mapping.
I know ... but javax.validation API (and other APIs) work with classes / class-arrays annotation parameters
see here custom annotation validation see here default javax.validation
So: I'd likely to see this feature/functionality for code generation :)
ah, now i get it 😉
it is probably just a matter of extending the mapping grammer.
It's me again ;)
I want to create an annotation (javax.validation.something) with a given Parameter like group that accespts not only numbers / strings but classes / class[]
see: https://openapiprocessor.io/spring/2023.1/mapping/annotation.html
we want something like
- type: NachrichtValidationPart @ de.ba.kodi.nachrichten.validation.plausibility.AlreadySent(groups = java.lang.String.class)
in mapping.yamlto get something like: (see groups in first line)
with annotation implementation:
error:
is there a syntax problem (then an example would be nice), or a non-implemented feature ;) ?
Kind regards Christian