cancel
Showing results for 
Search instead for 
Did you mean: 

CAP Java - Having Custom annotations

08-11-2022 2:14 PM
timrehrmann Explorer
1283 views 1 comments
0 Likes
SAP Managed Tags
Subscribe

Hey guys!

Is there a possibility make the cds to java generator add custom annotation in Java Code?

To give an example, I want to send an cds data entity to a different REST API that only accepts XML content. So I need to convert the data to a XML format. The easiest way would be to annotate the Java class with XML annotations, but as the Java class itself is generated from a cds file one would need to add the extra annotations each time after the generation of the class.

Would be nice if one could add annotations in the cds file that puts these custom annotations into the Java file.

Thanks and kind regards,

Tim

0 Likes

Accepted Solutions (0)

Answers (1)

Answers (1)

adrian_goerler
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Tim,

this is not possible, unfortunately, currently. We'll check if we can pick this request up.

Thank's for the suggestion.

Kind regards,

Adrian