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

TopSupported and SkipSupported non-nullable with DefaultValue="true" #323

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

HeikoTheissen
Copy link

@HeikoTheissen HeikoTheissen commented Jan 23, 2025

Fixes #322

Assume an entity set of singleton $S$ with a non-containment navigation property $p$ and a navigation property binding of $S/p$ to the entity set or singleton $T$.

If $S$ is annotated with Capabilities.NavigationRestrictions/RestrictedProperties annotation with NavigationProperty${}=p$ but without TopSupported, the default value TopSupported=true is implied and hence the resource path $S/p$ supports $top, regardless of any annotation Capabilities.TopSupported on $T$. Analogous for SkipSupported.

The V4-CSDL-to-OpenAPI.xsl tool currently behaves differently: In the absence of Capabilities.NavigationRestrictions/RestrictedProperties/TopSupported on $S$ it evaluates Capabilities.TopSupported on $T$, ignoring the default value.

This PR corrects the behavior of the tool. The correction results in additional parameters

{"$ref": "#/parameters/top"},
{"$ref": "#/parameters/skip"}

in some of the examples.

@ralfhandl
Copy link
Contributor

@HeikoTheissen Do you want to make the same change to the JavaScript version of the tool?

@ralfhandl
Copy link
Contributor

One more thing: please bump the package version via command

npm version minor

and add an entry to the changelog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non-nullable restrictions on entity sets or navigation property paths
2 participants