cap-js-community / odata-v2-adapter

OData V2 adapter for CDS. Exposes a full-fledged OData V2 service, converting OData V2 requests to CDS OData V4 service calls and responses back.
https://www.npmjs.com/package/@cap-js-community/odata-v2-adapter
Apache License 2.0
25 stars 10 forks source link

does odata-v2-adapter support cds annotation ValueList ValueListParameterInOut? #49

Closed wxchenxueqi closed 6 months ago

wxchenxueqi commented 6 months ago

Hi Colleagues,

We try to use SmartFilterBar to show valueList annotation with ValueListParameterInOut, but it doesn't work well with ValueListParameterInOut. I also checked README, it seems not there.

I have checked the cds annotation works well with ListReport Component with OData V4 directly.

But SmartFilterBar only support OData V2, and our backend is Odata V4, so we use odata-v2-adapter for this way.

For more detail, I also raised a ticket to Fiori, so you can check more sensitive data in this link https://github.wdf.sap.corp/fiori-elements/v4-consulting/issues/5117

I also checked the odata v2 metadata converted by odata-v2-adapter, it also have ValueListParameterInOut key words in it, so I'm not sure if this is an issues caused by adapter.

Could you please share some comments about it? Thanks.

BR Aaron

oklemenz2 commented 6 months ago

Yes, OData V2 does support the ValueListParameterInOut. The CDS OData V2 Adapter basically has nothing to do with that, as the OData V2 metadata is generated by CDS compiler, and during runtime this has no relevance.

But an example app using the annotation can be found here:

https://github.com/cap-js-community/odata-v2-adapter/blob/98a6481347d52b70eb9a93b368b53a83e9d239bf/test/_env/app/analytics/annotations.cds#L56