Skip to content

Commit

Permalink
Revert "Same for csdl2openapi.js"
Browse files Browse the repository at this point in the history
This reverts commit 3aa3479.
  • Loading branch information
HeikoTheissen committed Jan 24, 2025
1 parent 3aa3479 commit 56c7782
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
9 changes: 1 addition & 8 deletions examples/annotations.openapi3.json
Original file line number Diff line number Diff line change
Expand Up @@ -2067,14 +2067,7 @@
"ReadOnlySingleton",
"TwoReadOnlySet"
],
"parameters": [
{
"$ref": "#/components/parameters/top"
},
{
"$ref": "#/components/parameters/skip"
}
],
"parameters": [],
"responses": {
"200": {
"description": "Retrieved entities",
Expand Down
8 changes: 4 additions & 4 deletions lib/csdl2openapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -1073,8 +1073,8 @@ module.exports.csdl2openapi = function (
*/
function optionSkip(parameters, target, restrictions) {
const supported =
Object.keys(restrictions).length > 0
? restrictions.SkipSupported !== false
restrictions.SkipSupported !== undefined
? restrictions.SkipSupported
: target == null || target[voc.Capabilities.SkipSupported] !== false;

if (supported) {
Expand All @@ -1092,8 +1092,8 @@ module.exports.csdl2openapi = function (
*/
function optionTop(parameters, target, restrictions) {
const supported =
Object.keys(restrictions).length > 0
? restrictions.TopSupported !== false
restrictions.TopSupported !== undefined
? restrictions.TopSupported
: target == null || target[voc.Capabilities.TopSupported] !== false;

if (supported) {
Expand Down

0 comments on commit 56c7782

Please sign in to comment.