Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
### Deprecated
### Removed
### Fixed
- Restore bound actions/functions on containment navigation paths (regression since v1.2.0)
### Security

## [1.4.0] - 2026-03-18
Expand Down
3 changes: 1 addition & 2 deletions lib/compile/csdl2openapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -1339,8 +1339,7 @@ see [Expand](http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-prot
* @param {boolean} byKey read by key
*/
function pathItemsForBoundOperations(paths, prefix, prefixParameters, element, sourceName, byKey = false) {
//ignore operations on navigation path
if (element.$Kind === "NavigationProperty") {
if (element.$Kind === "NavigationProperty" && !element.$ContainsTarget) {
return;
}
const overloads = meta.boundOverloads[element.$Type + (!byKey && element.$Collection ? '-c' : '')] || [];
Expand Down
775 changes: 461 additions & 314 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
},
"devDependencies": {
"@types/node": "^25.0.3",
"eslint": "^9.33.0",
"typescript": "^5.9.2",
"eslint": "^10.3.0",
"typescript": "^6.0.3",
"@mermaid-js/mermaid-cli": "^11.12.0"
}
}
3 changes: 2 additions & 1 deletion scripts/regenerate.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ const specialOptions = {
host: 'services.odata.org',
basePath: '/V4/(S(cnbm44wtbc1v5bgrlek5lpcc))/TripPinServiceRW',
diagram: true
}
},
'autoexposed-texts': {}
};

// Default options for all other test cases.
Expand Down
103 changes: 103 additions & 0 deletions test/lib/compile/data/TripPin.openapi3.json
Original file line number Diff line number Diff line change
Expand Up @@ -1216,6 +1216,53 @@
}
}
},
"/Me/Trips({TripId_1})/Microsoft.OData.SampleService.Models.TripPin.GetInvolvedPeople": {
"get": {
"summary": "Invokes function GetInvolvedPeople",
"tags": [
"Me"
],
"parameters": [
{
"description": "key: TripId",
"in": "path",
"name": "TripId_1",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"title": "Collection of Person",
"properties": {
"@count": {
"$ref": "#/components/schemas/count"
},
"value": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Microsoft.OData.SampleService.Models.TripPin.Person"
}
}
}
}
}
}
},
"4XX": {
"$ref": "#/components/responses/error"
}
}
}
},
"/Me/Trips({TripId_1})/Photos": {
"parameters": [
{
Expand Down Expand Up @@ -2518,6 +2565,62 @@
}
}
},
"/People('{UserName}')/Trips({TripId_1})/Microsoft.OData.SampleService.Models.TripPin.GetInvolvedPeople": {
"get": {
"summary": "Invokes function GetInvolvedPeople",
"tags": [
"People"
],
"parameters": [
{
"description": "key: UserName",
"in": "path",
"name": "UserName",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "key: TripId",
"in": "path",
"name": "TripId_1",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"title": "Collection of Person",
"properties": {
"@count": {
"$ref": "#/components/schemas/count"
},
"value": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Microsoft.OData.SampleService.Models.TripPin.Person"
}
}
}
}
}
}
},
"4XX": {
"$ref": "#/components/responses/error"
}
}
}
},
"/People('{UserName}')/Trips({TripId_1})/Photos": {
"parameters": [
{
Expand Down
Loading
Loading