-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XSLT, OData V2: no direct create for non-addressable entity sets #312
Conversation
@sterlp Can you please check if this is what you expect? Note: I made the odata-openapi/tools/tests/addressable-v2.xml Lines 102 to 103 in c0f90b2
|
Why does
|
Each operation is tagged with both the source and the target entity set, and in this case the two are different. The same happens for example here: |
Yes, that is the historically grown meaning. Originally
This then was later extended to writeable views:
In OData V4 we use containment for CDS views with parameters, and all operations go via the "parameter" entity set and the containment navigation property |
Is the following reasoning correct? Non-addressability removes the If should be different if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong Swagger output for containment navigation properties
If I add
<NavigationProperty Name="to_Address" Relationship="ZE_API_DEMO_SRV.to_Address"
FromRole="FromRole_to_Address" ToRole="ToRole_to_Address" sap:containstarget="true" />
then Swagger contains
HeadSet
PATCH /HeadSet(...)/to_Address(...)
DELETE /HeadSet(...)/to_Address(...)
AddressSet
PATCH /AddressSet(...)
DELETE /AddressSet(...)
The resource paths given for AddressSet are invalid, they must equal the resource paths given for HeadSet.
It doesn't work, and it is not documented
Correct, and in OData V4 we use containment. In OData V2 there is no such thing. |
Thanks for finding this, it seems this undocumented OData V2 Annotation was a left-over from an unsuccessful experiment. |
Fixes #311
Foo
is not addressable, nopost
operation for path/Foo
will be generatedpost
operation for path/Parent(...)/to_Foo
will be generatedpatch
ordelete
will be generated as usual for path/Foo(...)
Plus