Skip to content

Commit

Permalink
empty refs is how model with no refs is serialized
Browse files Browse the repository at this point in the history
  • Loading branch information
pahjbo committed Dec 19, 2024
1 parent f84f9c3 commit 5a19051
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tools/xslt/vo-dml2jsonschema.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ that allow for successful JSON round tripping.
</xsl:template>
<xsl:template match="vo-dml:model" mode="refs">
<xsl:variable name="references-vodmlref" select="vf:refsToSerialize(name)"/>
<xsl:if test="count($references-vodmlref) > 0">
"refs" : {
"type" : "object"
,"properties" : {
Expand All @@ -102,12 +101,11 @@ that allow for successful JSON round tripping.
}
,"additionalProperties": false
}
</xsl:if>
</xsl:template>

<xsl:template match="vo-dml:model" mode="content">
<xsl:variable name="contentTypes" as="element()*" select="vf:contentToSerialize(name)"/>
<xsl:if test="count(vf:refsToSerialize(name))>0">,</xsl:if> "content" : {
,"content" : {
"type" : "array"
,"items" : {
"anyOf" : [
Expand Down

0 comments on commit 5a19051

Please sign in to comment.