Skip to content

Commit 74e5717

Browse files
authored
Add API Resource Integration Aspect Subset (#66)
1 parent 4c83075 commit 74e5717

File tree

6 files changed

+104
-1
lines changed

6 files changed

+104
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ For a roadmap including expected timeline, please refer to [ROADMAP.md](./ROADMA
2020
- Added example A2A agent card definition [DisputeResolutionAgentcard.json](examples/definitions/DisputeResolutionAgentcard.json)
2121
- Added [AI Agents and Protocols](docs/spec-v1/concepts/ai-agents-and-protocols.md) concept documentation
2222
- Introduced `abstract` property for API, Event and Data Product Resources to indicate interface-only resources.
23+
- Added `subset` property to `ApiResourceIntegrationAspect` with new `ApiResourceIntegrationAspectSubset` definition
24+
- This allows narrowing down API resource integration aspects to specific operations or tools
25+
- The `operationId` field can be used to specify individual API operations (e.g., OpenAPI `operationId`) or tools (e.g., MCP tool `name`)
2326
- Added `labels` and `correlationIds` to group and group type.
2427
- This allows to apply extensions / references to non ORD concepts via IDs, making the group concept more extensible.
2528

examples/documents/document-integration-dependencies.jsonc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,15 @@
116116
{
117117
"ordId": "sap.cic:apiResource:RetailTransactionOData:v1",
118118
"minVersion": "1.3.0",
119+
// The subset property allows narrowing down to specific API operations
120+
"subset": [
121+
{
122+
"operationId": "getRetailTransactions"
123+
},
124+
{
125+
"operationId": "getRetailTransactionById"
126+
}
127+
]
119128
},
120129
{
121130
"ordId": "sap.cic:apiResource:RetailTransactionSQL:v2",

spec/v1/Document.schema.yaml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3393,13 +3393,20 @@ definitions:
33933393
description: |
33943394
Minimum version of the references resource that the integration requires.
33953395
3396+
subset:
3397+
type: array
3398+
description: |-
3399+
List of individual API operations that are sufficient to achieve the aspect.
3400+
items:
3401+
$ref: "#/definitions/ApiResourceIntegrationAspectSubset"
3402+
33963403
# consumptionBundleRestriction: &consumptionBundleRestriction
33973404
# type: array
33983405
# description: |-
33993406
# Within the context of the Integration Dependency, there can be constraints which Consumption Bundles to use.
34003407
# items:
34013408
# type: string
3402-
# pattern: ^([a-z0-9]+(?:[.][a-z0-9]+)*):(consumptionBundle):([a-zA-Z0-9._\-]+):(alpha|beta|v[0-9]+|)$
3409+
# pattern: ^([a-z0-9]+(?:[.][a-z0-9]+]*):(consumptionBundle):([a-zA-Z0-9._\-]+):(alpha|beta|v[0-9]+|)$
34033410
# examples:
34043411
# - ['sap.foo:consumptionBundle:basicAuth:v1']
34053412

@@ -3483,6 +3490,32 @@ definitions:
34833490
required:
34843491
- eventType
34853492

3493+
ApiResourceIntegrationAspectSubset:
3494+
type: object
3495+
title: API Resource Integration Aspect Subset
3496+
x-introduced-in-version: "1.10.0"
3497+
x-ums-type: "custom"
3498+
description: |-
3499+
Defines that API Resource Integration Aspect only requires a subset of the referenced contract.
3500+
3501+
For APIs, this is a list of the operations or tools that need to be available in order to make the integration work.
3502+
This information helps to narrow down what is really necessary and can help optimize the integration.
3503+
properties:
3504+
operationId:
3505+
type: string
3506+
description: |-
3507+
The ID of the individual API operation or tool.
3508+
3509+
This MUST be an ID that is understood by the used protocol and resource definition format.
3510+
E.g. for OpenAPI this is the `operationId`, for MCP this is the tool `name`.
3511+
examples:
3512+
- "getOrderById"
3513+
- "createCustomer"
3514+
3515+
additionalProperties: false
3516+
required:
3517+
- operationId
3518+
34863519
Vendor:
34873520
type: object
34883521
title: Vendor

src/generated/spec/v1/types/Document.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3099,6 +3099,25 @@ export interface ApiResourceIntegrationAspect {
30993099
*
31003100
*/
31013101
minVersion?: string;
3102+
/**
3103+
* List of individual API operations that are sufficient to achieve the aspect.
3104+
*/
3105+
subset?: APIResourceIntegrationAspectSubset[];
3106+
}
3107+
/**
3108+
* Defines that API Resource Integration Aspect only requires a subset of the referenced contract.
3109+
*
3110+
* For APIs, this is a list of the operations or tools that need to be available in order to make the integration work.
3111+
* This information helps to narrow down what is really necessary and can help optimize the integration.
3112+
*/
3113+
export interface APIResourceIntegrationAspectSubset {
3114+
/**
3115+
* The ID of the individual API operation or tool.
3116+
*
3117+
* This MUST be an ID that is understood by the used protocol and resource definition format.
3118+
* E.g. for OpenAPI this is the `operationId`, for MCP this is the tool `name`.
3119+
*/
3120+
operationId: string;
31023121
}
31033122
/**
31043123
* Event resource related integration aspect

static/spec-v1/interfaces/Document.schema.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5116,6 +5116,13 @@
51165116
"1.2.3",
51175117
"1.0.0-alpha.1"
51185118
]
5119+
},
5120+
"subset": {
5121+
"type": "array",
5122+
"description": "List of individual API operations that are sufficient to achieve the aspect.",
5123+
"items": {
5124+
"$ref": "#/definitions/ApiResourceIntegrationAspectSubset"
5125+
}
51195126
}
51205127
},
51215128
"additionalProperties": false,
@@ -5196,6 +5203,27 @@
51965203
"eventType"
51975204
]
51985205
},
5206+
"ApiResourceIntegrationAspectSubset": {
5207+
"type": "object",
5208+
"title": "API Resource Integration Aspect Subset",
5209+
"x-introduced-in-version": "1.10.0",
5210+
"x-ums-type": "custom",
5211+
"description": "Defines that API Resource Integration Aspect only requires a subset of the referenced contract.\n\nFor APIs, this is a list of the operations or tools that need to be available in order to make the integration work.\nThis information helps to narrow down what is really necessary and can help optimize the integration.",
5212+
"properties": {
5213+
"operationId": {
5214+
"type": "string",
5215+
"description": "The ID of the individual API operation or tool.\n\nThis MUST be an ID that is understood by the used protocol and resource definition format.\nE.g. for OpenAPI this is the `operationId`, for MCP this is the tool `name`.",
5216+
"examples": [
5217+
"getOrderById",
5218+
"createCustomer"
5219+
]
5220+
}
5221+
},
5222+
"additionalProperties": false,
5223+
"required": [
5224+
"operationId"
5225+
]
5226+
},
51995227
"Vendor": {
52005228
"type": "object",
52015229
"title": "Vendor",

static/spec-v1/interfaces/ums/MetadataType/integrationdependency.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,17 @@ spec:
162162
description: "Minimum version of the references resource that the integration requires.\n"
163163
constraints:
164164
pattern: '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'
165+
- name: 'subset'
166+
type: 'custom'
167+
customTypeName: 'ApiResourceIntegrationAspectSubset'
168+
array: true
169+
description: 'List of individual API operations that are sufficient to achieve the aspect.'
170+
- name: 'ApiResourceIntegrationAspectSubset'
171+
metadataProperties:
172+
- name: 'operationId'
173+
type: 'string'
174+
description: "The ID of the individual API operation or tool.\n\nThis MUST be an ID that is understood by the used protocol and resource definition format.\nE.g. for OpenAPI this is the `operationId`, for MCP this is the tool `name`."
175+
mandatory: true
165176
- name: 'EventResourceIntegrationAspect'
166177
metadataProperties:
167178
- name: 'ordId'

0 commit comments

Comments
 (0)