on 2024 Jul 30 7:58 AM
Dear Community,
I am implementing a Node.js CAP CDS Service based on an interface definition provided and specified by SAP. The interface definition requires an entity action with following parameter:
According to that we have specified the action in the cds file:
The metadata is generated as
So far everything is working as expected, but the interface defintion specifies the "parameters" as nullable and provides an example executing the action as:
When performing an action without a "parameters" value the odata v4 logic is raising an error:
Deserialization Error: Parameter 'parameters' is not nullable.
Raised in:
I have not found a way to mark the parameter as nullable. Did I miss something?
Thanks
Request clarification before answering.
For an array parameter "nullable" controls whether the array may contain null values as in
"parameter": [some-object, null, another-object]
The parameter still has to be provided in the action call.
What "interface definition" are you referring to?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @RalfHandl , thanks for your reply. I am reffering to the taskcenter 3rd party API which requires the parameters to be optional:
Please checkout chapter 5.1.1.5. Performing Operations on Tasks
I decided to implement that interface using cap, but it seems that this optional part is not feasible with cap
The rest of the required interface objects is feasible using cap
Hello @RalfHandl,
after applying the annotation and updating to the newest cap version 8.1.0 the parameter ist marked as optional.
Thank you very much for your support
User | Count |
---|---|
73 | |
21 | |
9 | |
8 | |
7 | |
6 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.