Skip to content

Commit c5bdf9c

Browse files
committed
fix(csdl): correct key parameter description
Align key parameter description with other properties to remove inconsistent concatenation behavior.
1 parent 1ad0d10 commit c5bdf9c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- Prioritize `@Core.LongDescription` over `@Core.Description` for key parameter descriptions to avoid concatenation.
12+
13+
914

1015
## Version 1.2.3 - 28.05.2025
1116

lib/compile/csdl2openapi.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,8 +1248,7 @@ see [Expand](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-prot
12481248
const propertyType = property.$Type;
12491249
segment += pathValuePrefix(propertyType) + '{' + parameter + suffix + '}' + pathValueSuffix(propertyType);
12501250
const param = {
1251-
description: [property[meta.voc.Core.Description], property[meta.voc.Core.LongDescription]].filter(t => t).join(' \n')
1252-
|| 'key: ' + parameter,
1251+
description: property[meta.voc.Core.LongDescription] || property[meta.voc.Core.Description] || 'key: ' + parameter,
12531252
in: 'path',
12541253
name: parameter + suffix,
12551254
required: true,

0 commit comments

Comments
 (0)