on 01-13-2024 2:20 PM
Hi Colleagues,
I have a simple entity with one of the fields localized as show below in my service.cds file
entity Attributes : cuid {
contextType : Association to ContextTypes;
name : String(255);
description : localized String(500);
sequence : Integer;
}
I am using the following command in my POM to generate Open API Documentation
compile srv --service all -o docs/my_api --to openapi
The generated API Documentation has now both the Attributes and Attributes_texts. Is there a way to avoid displaying such entities having localized fields in Open API generated via CAP ? Because such entities have not been auto exposed (Attributes_texts) and only the parent entity has been (Attributes)
use
annotate Attributes.texts with @cds.autoexpose: false;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi hans-joachim.both,
The entity Attributes_texts is an autogenerated one from the localised field in the Attribute entity. There is no entry for Attributes_texts in our service cds. This entity is generated during cds build. Hence we cannot explicitly annotate it with the @cds.autoexpose: false
Or am I missing something ? Should I add this somewhere in the parent Attribute entity ?
User | Count |
---|---|
77 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.