Skip to content

Commit

Permalink
Report path syntax errors
Browse files Browse the repository at this point in the history
  • Loading branch information
HeikoTheissen committed Apr 25, 2024
1 parent 9421df9 commit 61b0c1a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
10 changes: 10 additions & 0 deletions tools/resolve-paths.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,16 @@
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:if test="not(starts-with(.,'Edm.'))">
<xsl:message>
<xsl:text>Invalid </xsl:text>
<xsl:if test="not(self::*)">
<xsl:text>@</xsl:text>
</xsl:if>
<xsl:value-of
select="concat(name(),' ',.,' in ',generate-id(self::* | ..))" />
</xsl:message>
</xsl:if>
<xsl:copy>
<xsl:if test="self::*">
<xsl:attribute name="id">
Expand Down
3 changes: 1 addition & 2 deletions tools/tests/annotations-v4.openapi3.json
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,7 @@
"get": {
"summary": "Get related Header",
"tags": [
"OrderItems",
"Orders"
"OrderItems"
],
"parameters": [
{
Expand Down
2 changes: 1 addition & 1 deletion tools/tests/annotations-v4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<EntitySet Name="Orders" EntityType="self.Order" />
<EntitySet Name="OrderItems" EntityType="self.OrderItem">
<NavigationPropertyBinding Path="Header"
Target="Orders" />
Target="Orderst" />
</EntitySet>
</EntityContainer>
<Annotations Target="self.OrderItem/ID">
Expand Down

0 comments on commit 61b0c1a

Please sign in to comment.