Skip to content
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

Key fields not required #316

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tools/V4-CSDL-to-OpenAPI.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@
<xsl:variable name="coreAcceptableMediaTypesAliased" select="concat($coreAlias,'.AcceptableMediaTypes')" />
<xsl:variable name="coreComputed" select="concat($coreNamespace,'.Computed')" />
<xsl:variable name="coreComputedAliased" select="concat($coreAlias,'.Computed')" />
<xsl:variable name="coreComputedDefaultValue" select="concat($coreNamespace,'.ComputedDefaultValue')" />
<xsl:variable name="coreComputedDefaultValueAliased" select="concat($coreAlias,'.ComputedDefaultValue')" />
<xsl:variable name="coreDefaultNamespace" select="concat($coreNamespace,'.DefaultNamespace')" />
<xsl:variable name="coreDefaultNamespaceAliased" select="concat($coreAlias,'.DefaultNamespace')" />
<xsl:variable name="coreDescription" select="concat($coreNamespace,'.Description')" />
Expand Down Expand Up @@ -1490,9 +1492,9 @@
<xsl:variable name="qualifiedName" select="concat($structuredType/../@Namespace,'.',$structuredType/@Name)" />
<xsl:variable name="aliasQualifiedName" select="concat($structuredType/../@Alias,'.',$structuredType/@Name)" />

<xsl:variable name="computed" select="$structuredType/edm:Property[edm:Annotation[@Term=$coreComputed or @Term=$coreComputedAliased]]/@Name" />
<xsl:variable name="computed" select="$structuredType/edm:Property[edm:Annotation[@Term=$coreComputed or @Term=$coreComputedAliased or @Term=$coreComputedDefaultValue or @Term=$coreComputedDefaultValueAliased]]/@Name" />
<xsl:variable name="computed-ext" select="(key('externalPropertyAnnotations',$qualifiedName)|key('externalPropertyAnnotations',$aliasQualifiedName))
[edm:Annotation[@Term=$coreComputed or @Term=$coreComputedAliased]]/@Target" />
[edm:Annotation[@Term=$coreComputed or @Term=$coreComputedAliased or @Term=$coreComputedDefaultValue or @Term=$coreComputedDefaultValueAliased]]/@Target" />

<xsl:variable name="immutable" select="$structuredType/edm:Property[edm:Annotation[@Term=$coreImmutable or @Term=$coreImmutableAliased]]/@Name" />
<xsl:variable name="immutable-ext" select="(key('externalPropertyAnnotations',$qualifiedName)|key('externalPropertyAnnotations',$aliasQualifiedName))
Expand Down