Conversation
tim-sh
left a comment
There was a problem hiding this comment.
Looks good – just to be sure, one question, plus could you double-check that top-level GET paths for value-help code lists (e.g. Currencies) still work?
Good catch. That was indeed incorrectly hidden, but is now shown again. |
tim-sh
left a comment
There was a problem hiding this comment.
Looks good to me; just a nit I found.
| if (serviceType?.['@cds.autoexpose'] || serviceType?.['@cds.autoexposed']) { | ||
| entityContainer[element]['$cds.autoexpose'] = true; | ||
| } | ||
| if (csdl[serviceName]?.[type]?.['@cds.autoexposed'] && !csdl[serviceName]?.[type]?.['@cds.autoexpose']) { |
There was a problem hiding this comment.
This line can now read:
if (serviceType?.['@cds.autoexposed'] && !serviceType?.['@cds.autoexpose']) {There was a problem hiding this comment.
I don't follow. This would change the semantics of the condition.
Currently:
@cds.autoexposed
entity A {} // ✅
@cds.autoexpose
entity B {} // ✅
@cds.autoexposed
@cds.autoexpose
entity C {} // ✅would all pass the condition. With your suggestion, we'd have:
@cds.autoexposed
entity A {} // ✅
@cds.autoexpose
entity B {} // ❌
@cds.autoexposed
@cds.autoexpose
entity C {} // ❌There was a problem hiding this comment.
There's a misunderstanding – my suggestion refers to l.132 only, i.e. just replace the extracted expression with the new var name.
There was a problem hiding this comment.
ah, I see! I missed the other uses of the new variable
There was a problem hiding this comment.
my bad, the coloured highlighting of line 129 diverted my attention from the line 132 you actually attached your comment to. I have changed it accordingly.
Fixes #173
Specifically addresses behaviour reported in a comment, whereas the original issue was addressed in #177
Before fix:
routes for
OrderItemscode list exist on top levelAfter fix:
routes are no longer available on top level, but can be accessed via the navigation paths
POST /Orders({ID})/itemsetc.