Skip to content

Commit

Permalink
XSLT, OData V2: no direct create for non-addressable entity sets (#312)
Browse files Browse the repository at this point in the history
* New test case

* Update addressable-v2.xml

* No direct create for non-addressable entity sets

* No root paths for non-addressable entity sets

* PATCH and DELETE for addressable=false

* Remove undocumented V2 annotation

It doesn't work, and it is not documented
  • Loading branch information
ralfhandl authored Oct 18, 2024
1 parent b6f930e commit f0054e0
Show file tree
Hide file tree
Showing 4 changed files with 1,590 additions and 6 deletions.
24 changes: 18 additions & 6 deletions tools/V2-to-V4-CSDL.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,15 @@
</PropertyValue>
</Record>
</PropertyValue>
<xsl:if test="not($targetSet/@sap:creatable='false')">
<PropertyValue Property="InsertRestrictions">
<Record>
<PropertyValue Property="Insertable">
<Bool>true</Bool>
</PropertyValue>
</Record>
</PropertyValue>
</xsl:if>
</Record>
</xsl:if>
</xsl:if>
Expand Down Expand Up @@ -1032,6 +1041,15 @@
</xsl:if>
</Record>
</Annotation>
<Annotation>
<xsl:attribute name="Term">
<xsl:value-of select="$Capabilities" />
<xsl:text>.InsertRestrictions</xsl:text>
</xsl:attribute>
<Record>
<PropertyValue Property="Insertable" Bool="false" />
</Record>
</Annotation>
</xsl:if>
</xsl:template>

Expand Down Expand Up @@ -1192,12 +1210,6 @@
</xsl:attribute>
</xsl:template>

<xsl:template match="@sap:containstarget">
<xsl:attribute name="ContainsTarget">
<xsl:value-of select="." />
</xsl:attribute>
</xsl:template>

<xsl:template match="@sap:*">
<xsl:message>
<xsl:value-of select="name(..)" />
Expand Down
Loading

0 comments on commit f0054e0

Please sign in to comment.