@open-resource-discovery/specification 1.14.5 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,554 @@
1
+ /**
2
+ * Overlay-specific [perspective](../../spec-v1/index.md#perspectives) that scopes where this overlay should be applied.
3
+ *
4
+ * Use this together with `describedSystemType`, `describedSystemVersion`, and `describedSystemInstance`
5
+ * to describe whether the overlay applies broadly to a system type, to one released system version,
6
+ * or only to a specific system instance.
7
+ */
8
+ export type OverlayPerspective = ("system-type" | "system-version" | "system-instance") & string;
9
+ /**
10
+ * Correlation ID identifying related records in external systems of record.
11
+ * MUST be a valid [Correlation ID](../../spec-v1/index.md#correlation-id).
12
+ */
13
+ export type OverlayCorrelationID = string;
14
+ /**
15
+ * Correlation ID identifying related records in external systems of record.
16
+ * MUST be a valid [Correlation ID](../../spec-v1/index.md#correlation-id).
17
+ */
18
+ export type OverlayCorrelationID1 = string;
19
+ /**
20
+ * Correlation ID identifying related records in external systems of record.
21
+ * MUST be a valid [Correlation ID](../../spec-v1/index.md#correlation-id).
22
+ */
23
+ export type OverlayCorrelationID2 = string;
24
+ /**
25
+ * Controls which consumers can discover and access this overlay document.
26
+ *
27
+ * It does NOT control runtime access to the resources being patched — that is managed separately through authentication and authorization mechanisms.
28
+ *
29
+ * Use this to prevent exposing internal overlay enrichments to inappropriate consumer audiences.
30
+ */
31
+ export type OverlayVisibility = ("public" | "internal" | "private") & string;
32
+ /**
33
+ * Optional, but RECOMMENDED type of the target definition being patched.
34
+ * If provided, this SHOULD match the `type` of the referenced metadata definition
35
+ * (as used in API/Event/Capability resource definitions).
36
+ * This is especially useful when target `ordId` resolves to a resource with multiple attached definitions.
37
+ *
38
+ * This can be used to disambiguate how selectors are interpreted for the target.
39
+ *
40
+ * MUST be either:
41
+ * - any valid [Specification ID](../../spec-v1/index.md#specification-id), or
42
+ * - one of the pre-defined values reused from:
43
+ * - API Resource Definition `type`
44
+ * - Event Resource Definition `type`
45
+ * - Capability Definition `type`
46
+ *
47
+ * The literal value `custom` is deprecated for `definitionType` and MUST NOT be used.
48
+ * In such cases, use a concrete [Specification ID](../../spec-v1/index.md#specification-id) instead.
49
+ */
50
+ export type OverlayDefinitionType = (string | "openapi-v2" | "openapi-v3" | "openapi-v3.1+" | "raml-v1" | "edmx" | "csdl-json" | "graphql-sdl" | "wsdl-v1" | "wsdl-v2" | "a2a-agent-card" | "sap-rfc-metadata-v1" | "sap-sql-api-definition-v1" | "sap-csn-interop-effective-v1" | "asyncapi-v2" | "sap.mdo:mdi-capability-definition:v1") & string;
51
+ /**
52
+ * The patch operation to perform on the selected element.
53
+ */
54
+ export type OverlayPatchAction = "update" | "remove" | "merge";
55
+ /**
56
+ * Identifies the element in the target to patch.
57
+ * Exactly one selector type is used per patch.
58
+ *
59
+ * Prefer concept-level selectors over generic `jsonPath` where possible,
60
+ * as they are resilient to structural changes in the target format.
61
+ */
62
+ export type OverlaySelector = OverlaySelectorByRoot | OverlaySelectorByJsonPath | OverlaySelectorByOperation | OverlaySelectorByEntityType | OverlaySelectorByComplexType | OverlaySelectorByEnumType | OverlaySelectorByPropertyType | OverlaySelectorByEntitySet | OverlaySelectorByNamespace | OverlaySelectorByParameter | OverlaySelectorByReturnType;
63
+ /**
64
+ * The value used by the patch `action`.
65
+ * Structure depends on the target being patched and the action type.
66
+ *
67
+ * For OData targets (`edmx`, `csdl-json`), the value MUST be expressed in CSDL JSON
68
+ * annotation format. Annotation keys use the `@TermName` convention:
69
+ * e.g. `{ "@Core.Description": "...", "@Core.Revisions": [...] }`.
70
+ * When the target is EDMX XML, the merge implementation converts this to `<Annotation>` elements.
71
+ * See: https://docs.oasis-open.org/odata/odata-csdl-json/v4.01/odata-csdl-json-v4.01.html
72
+ *
73
+ * For CSN Interop targets (`sap-csn-interop-effective-v1`), the value is plain CSN JSON
74
+ * merged directly into the matched entity definition or element object.
75
+ * Use the CSN `doc` field for human-readable descriptions, and `@AnnotationName` keys
76
+ * for vocabulary annotations (e.g. `@EndUserText.label`, `@Semantics.text`).
77
+ * See: https://sap.github.io/csn-interop-specification/
78
+ */
79
+ export type OverlayPatchValue = {
80
+ [k: string]: unknown | undefined;
81
+ } | unknown[] | string | number | boolean | null;
82
+ /**
83
+ * ⚠️ ALPHA: This specification is in alpha and subject to change.
84
+ *
85
+ * The ORD Overlay is an optional ORD model extension that allows patching referenced resource definition files
86
+ * (e.g. OpenAPI, AsyncAPI, OData CSDL, MCP/A2A Agent Cards) without modifying the original source files.
87
+ *
88
+ * Overlays use concept-level [selectors](#overlay-selector) that are independent of the target format's
89
+ * internal structure, making them resilient to format changes.
90
+ * A `jsonPath` selector is available as a generic fallback.
91
+ *
92
+ * Overlay files can be provided through the
93
+ * [ORD Configuration endpoint](../../spec-v1/index.md#ord-configuration-endpoint),
94
+ * or attached as `resourceDefinitions` entries on API or Event resources with type `ord:overlay:v1`.
95
+ */
96
+ export interface ORDOverlay {
97
+ /**
98
+ * Optional [URL](https://tools.ietf.org/html/rfc3986) to the ORD Overlay schema (defined as a JSON Schema).
99
+ * If provided, this enables code intelligence and validation in supported editors (like VSCode) and tools.
100
+ */
101
+ $schema?: (string | "https://open-resource-discovery.org/spec-v1/interfaces/OrdOverlay.schema.json#") & string;
102
+ /**
103
+ * Version of the ORD Overlay specification.
104
+ */
105
+ ordOverlay: "0.1";
106
+ /**
107
+ * Optional ORD ID of this overlay document.
108
+ */
109
+ ordId?: string;
110
+ /**
111
+ * Optional description of the overlay document itself.
112
+ *
113
+ * Notated in [CommonMark](https://spec.commonmark.org/) (Markdown).
114
+ */
115
+ description?: string;
116
+ perspective?: OverlayPerspective;
117
+ describedSystemType?: OverlaySystemType;
118
+ describedSystemVersion?: OverlaySystemVersion;
119
+ describedSystemInstance?: OverlaySystemInstance;
120
+ visibility?: OverlayVisibility;
121
+ target?: OverlayTarget;
122
+ /**
123
+ * Ordered sequence of patches to apply to the targeted resource(s).
124
+ * Patches are applied strictly in the order they are listed.
125
+ * If two patches target the same document element, both are applied in sequence —
126
+ * the later patch supersedes the earlier one.
127
+ *
128
+ * @minItems 1
129
+ */
130
+ patches: [OverlayPatch, ...OverlayPatch[]];
131
+ meta?: OverlayMeta1;
132
+ }
133
+ /**
134
+ * Information on the [system type](../../spec-v1/index.md#system-type) this overlay describes.
135
+ * This object is identical to the ORD Document `describedSystemType` object; see [System Type](../../spec-v1/interfaces/Document.md#system-type).
136
+ *
137
+ * Its purpose is to link the overlay to the same system landscape model as ORD resources, if needed.
138
+ * This is the primary context object for `perspective: system-type`, and also the parent context
139
+ * for more specific `system-version` and `system-instance` overlays.
140
+ *
141
+ * Usually this is not necessary for static overlays if the patched resource is already selected via ORD ID.
142
+ */
143
+ export interface OverlaySystemType {
144
+ /**
145
+ * The [system namespace](../../spec-v1/index.md#system-namespace) is a unique identifier for the system type.
146
+ */
147
+ systemNamespace?: string;
148
+ /**
149
+ * Correlation IDs for linking this system type to external systems of record.
150
+ *
151
+ * @minItems 1
152
+ */
153
+ correlationIds?: [OverlayCorrelationID, ...OverlayCorrelationID[]];
154
+ }
155
+ /**
156
+ * Information on the [system version](../../spec-v1/index.md#system-version) this overlay describes.
157
+ * This object is identical to the ORD Document `describedSystemVersion` object; see [System Version](../../spec-v1/interfaces/Document.md#system-version).
158
+ *
159
+ * Its purpose is to link the overlay to the same system landscape model as ORD resources, if needed.
160
+ * Use this when the overlay should only patch metadata for one specific released system version.
161
+ *
162
+ * Usually this is not necessary for static overlays if the patched resource is already selected via ORD ID.
163
+ */
164
+ export interface OverlaySystemVersion {
165
+ /**
166
+ * The version of the system instance (run-time) or the version of the described system-version perspective.
167
+ *
168
+ * It MUST follow the [Semantic Versioning 2.0.0](https://semver.org/) standard.
169
+ */
170
+ version?: string;
171
+ /**
172
+ * Human-readable title of the system version.
173
+ */
174
+ title?: string;
175
+ /**
176
+ * Correlation IDs for linking this system version to external systems of record.
177
+ *
178
+ * @minItems 1
179
+ */
180
+ correlationIds?: [OverlayCorrelationID1, ...OverlayCorrelationID1[]];
181
+ }
182
+ /**
183
+ * Information on the [system instance](../../spec-v1/index.md#system-instance) this overlay describes.
184
+ * This object is identical to the ORD Document `describedSystemInstance` object; see [System Instance](../../spec-v1/interfaces/Document.md#system-instance).
185
+ *
186
+ * Its purpose is to link the overlay to the same system landscape model as ORD resources, if needed.
187
+ * Use this when the overlay should only patch metadata for one concrete tenant / runtime instance.
188
+ *
189
+ * Usually this is not necessary for static overlays if the patched resource is already selected via ORD ID.
190
+ */
191
+ export interface OverlaySystemInstance {
192
+ /**
193
+ * Optional [base URL](../../spec-v1/index.md#base-url) of the system instance.
194
+ * By providing the base URL, relative URLs in the overlay are resolved relative to it.
195
+ *
196
+ * The `baseUrl` MUST NOT contain a trailing slash.
197
+ */
198
+ baseUrl?: string;
199
+ /**
200
+ * Optional local ID for the system instance (usually tenant ID), as known by the described system.
201
+ */
202
+ localId?: string;
203
+ /**
204
+ * Correlation IDs for linking this system instance to external systems of record.
205
+ *
206
+ * @minItems 1
207
+ */
208
+ correlationIds?: [OverlayCorrelationID2, ...OverlayCorrelationID2[]];
209
+ }
210
+ /**
211
+ * Optional target context identifying the resource or definition file being patched.
212
+ * See [Overlay Target](#overlay-target) for details on identifier requirements and disambiguation.
213
+ */
214
+ export interface OverlayTarget {
215
+ /**
216
+ * ORD ID of the target being patched (e.g. an API Resource, Event Resource, Data Product).
217
+ * MUST be a valid [ORD ID](../../spec-v1/index.md#ord-id).
218
+ */
219
+ ordId?: string;
220
+ /**
221
+ * URL or URI pointing directly to the file being patched.
222
+ * This is typically a resource definition file (e.g. OpenAPI, AsyncAPI, OData CSDL),
223
+ * but can also point to any JSON/YAML-based target document.
224
+ */
225
+ url?: string;
226
+ /**
227
+ * Correlation IDs referencing the target resource in external registries or systems of record.
228
+ * Reuses the ORD correlation ID format: `namespace:type:localId`.
229
+ * All listed IDs are treated as pointing to the same resource.
230
+ *
231
+ * @minItems 1
232
+ */
233
+ correlationIds?: [string, ...string[]];
234
+ definitionType?: OverlayDefinitionType;
235
+ systemInstance?: OverlaySystemInstance1;
236
+ }
237
+ /**
238
+ * A [system instance](../../spec-v1/index.md#system-instance) is a concrete, running instance of a system type.
239
+ * This object is identical to the ORD Document `describedSystemInstance` object; see [System Instance](../../spec-v1/interfaces/Document.md#system-instance).
240
+ *
241
+ * Its purpose is to link the overlay to the same system landscape model as ORD resources, if needed.
242
+ * Usually this is not necessary for static overlays if the patched resource is already selected via ORD ID.
243
+ */
244
+ export interface OverlaySystemInstance1 {
245
+ /**
246
+ * Optional [base URL](../../spec-v1/index.md#base-url) of the system instance.
247
+ * By providing the base URL, relative URLs in the overlay are resolved relative to it.
248
+ *
249
+ * The `baseUrl` MUST NOT contain a trailing slash.
250
+ */
251
+ baseUrl?: string;
252
+ /**
253
+ * Optional local ID for the system instance (usually tenant ID), as known by the described system.
254
+ */
255
+ localId?: string;
256
+ /**
257
+ * Correlation IDs for linking this system instance to external systems of record.
258
+ *
259
+ * @minItems 1
260
+ */
261
+ correlationIds?: [OverlayCorrelationID2, ...OverlayCorrelationID2[]];
262
+ }
263
+ /**
264
+ * A single patch action to apply to the element identified by the [Overlay Selector](#overlay-selector).
265
+ */
266
+ export interface OverlayPatch {
267
+ /**
268
+ * Optional human-readable note explaining the purpose or rationale of this individual patch.
269
+ * This field is purely informational and has no effect on patch application.
270
+ *
271
+ * Typical use-cases:
272
+ * - Reviewer / audit notes explaining why a particular element is being modified.
273
+ * - Commit-message style annotations generated by AI tooling (e.g. "Enriched summary for GetUser operation").
274
+ * - References to tickets or decisions that motivated the change.
275
+ *
276
+ * Maps 1:1 to the `actions[].description` field in the
277
+ * [OpenAPI Overlay spec](https://spec.openapis.org/overlay/v1.1.0.html), enabling lossless
278
+ * round-trip conversion between OpenAPI overlays and ORD overlays.
279
+ */
280
+ description?: string;
281
+ action: OverlayPatchAction;
282
+ selector: OverlaySelector;
283
+ data?: OverlayPatchValue;
284
+ /**
285
+ * String labels associated with the patched element.
286
+ * Useful for classification, domain tagging, and filtering in registries or tooling.
287
+ *
288
+ * These are purely informational and have no effect on patch application or on the
289
+ * target document.
290
+ *
291
+ * @minItems 1
292
+ */
293
+ tags?: [string, ...string[]];
294
+ meta?: OverlayMeta;
295
+ }
296
+ export interface OverlaySelectorByRoot {
297
+ /**
298
+ * Concept-level selector targeting the root of the document being patched.
299
+ * MUST be `true`.
300
+ *
301
+ * Use this selector to patch top-level properties of any JSON/YAML-based metadata format
302
+ * without coupling to specific structural paths. This is especially useful for:
303
+ *
304
+ * - Patching document-level metadata (title, description, version, contact info)
305
+ * - Adding or merging top-level sections (e.g. `components`, `tags`, `servers` in OpenAPI)
306
+ * - Extending the root object with new properties across format versions
307
+ *
308
+ * Supported metadata formats and typical use cases:
309
+ *
310
+ * **OpenAPI** (`openapi-v2`, `openapi-v3`, `openapi-v3.1+`):
311
+ * - Patch `info.description`, `info.title`, `info.contact`
312
+ * - Add `components.securitySchemes` or `components.schemas`
313
+ * - Add `tags`, `servers`, or `externalDocs`
314
+ *
315
+ * **AsyncAPI** (`asyncapi-v2`):
316
+ * - Patch `info` block, `servers`, `channels` at the root
317
+ *
318
+ * **OData CSDL JSON** (`csdl-json`):
319
+ * - Patch root-level `$Version`, `$EntityContainer`, or add namespace objects
320
+ *
321
+ * **MCP / A2A** (any Specification ID):
322
+ * - Patch top-level metadata or add root-level tool/skill definitions
323
+ *
324
+ * The `root` selector is equivalent to `jsonPath: "$"` but is preferred because it
325
+ * explicitly communicates intent and is resilient to format differences where `$`
326
+ * might have ambiguous semantics.
327
+ */
328
+ root: true;
329
+ }
330
+ export interface OverlaySelectorByJsonPath {
331
+ /**
332
+ * JSONPath expression targeting any location in a JSON/YAML-based target document.
333
+ * MUST start with `$`.
334
+ * This is the generic structural fallback selector, supported for all JSON/YAML-based formats:
335
+ * - `openapi-v2`, `openapi-v3`, `openapi-v3.1+`: targets any node in the OpenAPI document.
336
+ * - `a2a-agent-card`: targets any node in the A2A Agent Card JSON document.
337
+ * - `csdl-json`: targets any node in the OData CSDL JSON document.
338
+ * - MCP (any Specification ID): targets any node in the MCP-compatible JSON/YAML tool metadata.
339
+ *
340
+ * Use concept-level selectors (`operation`, `entityType`, etc.) when available, as they are
341
+ * resilient to structural differences between format versions. Reserve `jsonPath` for cases
342
+ * where no concept-level selector covers the target location.
343
+ */
344
+ jsonPath: string;
345
+ }
346
+ export interface OverlaySelectorByOperation {
347
+ /**
348
+ * Concept-level operation identifier.
349
+ * Supported mappings by format:
350
+ * - OpenAPI (`openapi-v2`, `openapi-v3`, `openapi-v3.1+`): maps to the `operationId` field on
351
+ * an HTTP operation inside `paths.{path}.{method}`.
352
+ * - MCP (any Specification ID other than `a2a-agent-card`): maps to `tools[].name`.
353
+ * See: https://modelcontextprotocol.io/specification/2025-11-25/schema#tool-name
354
+ * - A2A Agent Card (`a2a-agent-card`): maps to `skills[].id`.
355
+ * See: https://google.github.io/A2A/specification/#agentskill-object
356
+ * - OData (`edmx`, `csdl-json`): maps to the Action or Function name at Schema level.
357
+ * MUST use the namespace-qualified name (e.g. `OData.Demo.Approval`) to be unambiguous.
358
+ * For OData v2 `edmx` targets: also searches FunctionImport elements in EntityContainer
359
+ * when no Schema-level Action/Function matches the name.
360
+ * For bound operations overloaded on multiple entity types, use [`jsonPath`](#overlay-selector-by-jsonpath) as a fallback
361
+ * to target the specific overload.
362
+ *
363
+ * When `definitionType` is set on `target`, the format is known and the selector resolves unambiguously.
364
+ * When `definitionType` is absent, the implementation SHOULD infer the format from the target
365
+ * document's content (e.g. the `openapi` field, `$schema`, or `$kind` markers).
366
+ */
367
+ operation: string;
368
+ }
369
+ export interface OverlaySelectorByEntityType {
370
+ /**
371
+ * **OData-specific** selector targeting an EntityType element by its namespace-qualified name.
372
+ *
373
+ * An EntityType in OData is a structured type with a key that represents a business entity
374
+ * (e.g. `Customer`, `Order`, `Employee`). This maps to:
375
+ * - `edmx` (OData v2/v4 CSDL XML): targets `<EntityType Name="...">` elements in the Schema.
376
+ * - `csdl-json` (OData v4 CSDL JSON): targets elements with `$Kind: "EntityType"`.
377
+ *
378
+ * MUST use the namespace-qualified name (e.g. `OData.Demo.Customer`) for unambiguous resolution.
379
+ * For EntitySet-level patching (Capabilities annotations), use the [`entitySet`](#overlay-selector-by-entity-set) selector instead.
380
+ *
381
+ * For CSN Interop targets (`sap-csn-interop-effective-v1`), this selector targets a `definitions`
382
+ * entry by its fully qualified key (e.g. `AirlineService.Airline`).
383
+ *
384
+ * To target ComplexType or EnumType elements, use the dedicated `complexType` or `enumType` selectors.
385
+ */
386
+ entityType: string;
387
+ }
388
+ export interface OverlaySelectorByComplexType {
389
+ /**
390
+ * **OData-specific** selector targeting a ComplexType element by its namespace-qualified name.
391
+ *
392
+ * A ComplexType in OData is a structured type without a key, typically used for reusable
393
+ * embedded structures like addresses, coordinates, or measurement values. This maps to:
394
+ * - `edmx` (OData v2/v4 CSDL XML): targets `<ComplexType Name="...">` elements in the Schema.
395
+ * - `csdl-json` (OData v4 CSDL JSON): targets elements with `$Kind: "ComplexType"`.
396
+ *
397
+ * MUST use the namespace-qualified name (e.g. `OData.Demo.Address`) for unambiguous resolution.
398
+ *
399
+ * ComplexTypes are often shared across multiple EntityTypes, so patching a ComplexType
400
+ * affects all usages of that type throughout the service.
401
+ */
402
+ complexType: string;
403
+ }
404
+ export interface OverlaySelectorByEnumType {
405
+ /**
406
+ * **OData-specific** selector targeting an EnumType element by its namespace-qualified name.
407
+ *
408
+ * An EnumType in OData is an enumeration type with named members representing a fixed set
409
+ * of values (e.g. `OrderStatus`, `Priority`, `Gender`). This maps to:
410
+ * - `edmx` (OData v2/v4 CSDL XML): targets `<EnumType Name="...">` elements in the Schema.
411
+ * - `csdl-json` (OData v4 CSDL JSON): targets elements with `$Kind: "EnumType"`.
412
+ *
413
+ * MUST use the namespace-qualified name (e.g. `OData.Demo.OrderStatus`) for unambiguous resolution.
414
+ *
415
+ * To patch individual enum members, use the [`propertyType`](#overlay-selector-by-property-type) selector with this `enumType` as context.
416
+ */
417
+ enumType: string;
418
+ }
419
+ export interface OverlaySelectorByPropertyType {
420
+ /**
421
+ * Concept-level property, navigation property, or enum member identifier.
422
+ *
423
+ * Use the unqualified property name (e.g. `BirthDate`, `Street`, `Pending`).
424
+ * Property names are frequently reused across types, so a parent type context
425
+ * MUST be provided via exactly one of: `entityType`, `complexType`, or `enumType`.
426
+ *
427
+ * Supported metadata formats:
428
+ * - `edmx` (OData v2/v4 CSDL XML): targets a Property or NavigationProperty on an EntityType
429
+ * or ComplexType; or a Member on an EnumType.
430
+ * - `csdl-json` (OData v4 CSDL JSON): targets non-`$`-prefixed keys on the matched type object.
431
+ * - `sap-csn-interop-effective-v1` (CSN Interop): targets an entry in the `elements` map of
432
+ * the matched entity definition. Use `entityType` for CSN Interop targets.
433
+ */
434
+ propertyType: string;
435
+ /**
436
+ * Parent EntityType context for the property.
437
+ * Use this when targeting a property on an EntityType.
438
+ * MUST be the namespace-qualified name (e.g. `OData.Demo.Customer`).
439
+ * For CSN Interop: the fully qualified `definitions` key (e.g. `AirlineService.Airline`).
440
+ *
441
+ * Exactly one of `entityType`, `complexType`, or `enumType` MUST be provided.
442
+ */
443
+ entityType?: string;
444
+ /**
445
+ * **OData-specific** parent ComplexType context for the property.
446
+ * Use this when targeting a property on a ComplexType.
447
+ * MUST be the namespace-qualified name (e.g. `OData.Demo.Address`).
448
+ *
449
+ * Exactly one of `entityType`, `complexType`, or `enumType` MUST be provided.
450
+ */
451
+ complexType?: string;
452
+ /**
453
+ * **OData-specific** parent EnumType context for the enum member.
454
+ * Use this when targeting a member of an EnumType.
455
+ * MUST be the namespace-qualified name (e.g. `OData.Demo.OrderStatus`).
456
+ *
457
+ * Exactly one of `entityType`, `complexType`, or `enumType` MUST be provided.
458
+ */
459
+ enumType?: string;
460
+ }
461
+ export interface OverlaySelectorByEntitySet {
462
+ /**
463
+ * Concept-level entity set identifier.
464
+ * Supported metadata formats:
465
+ * - `edmx` (OData v2/v4 CSDL XML): targets an EntitySet element inside EntityContainer.
466
+ * May use the unqualified name (e.g. `Customers`) or namespace-prefixed name.
467
+ * - `csdl-json` (OData v4 CSDL JSON): targets a key with `$Collection: true` inside the
468
+ * EntityContainer object in the namespace.
469
+ *
470
+ * Use `entitySet` when you need to patch EntityContainer-bound metadata such as
471
+ * Capabilities annotations (InsertRestrictions, UpdateRestrictions, etc.).
472
+ * For patching EntityType structure (Properties, NavigationProperties) via deep merge, use `entityType`.
473
+ * To target a specific property for fine-grained patching, prefer `propertyType` (requires `entityType` as context).
474
+ */
475
+ entitySet: string;
476
+ }
477
+ export interface OverlaySelectorByNamespace {
478
+ /**
479
+ * Concept-level OData schema/namespace selector.
480
+ * Supported metadata formats:
481
+ * - `edmx` (OData v2/v4 CSDL XML): targets the `<Schema Namespace="...">` element.
482
+ * Use the namespace value exactly as declared (e.g. `com.example.OrderService`).
483
+ * - `csdl-json` (OData v4 CSDL JSON): targets the namespace-level object (the non-`$`-prefixed
484
+ * key in the CSDL JSON document that matches the namespace value).
485
+ *
486
+ * Use this selector for service/schema-level annotations such as `@Core.Description` and
487
+ * `@Core.LongDescription` on the OData service as a whole.
488
+ */
489
+ namespace: string;
490
+ }
491
+ export interface OverlaySelectorByParameter {
492
+ /**
493
+ * Concept-level parameter name.
494
+ * Supported metadata formats:
495
+ * - `edmx` (OData v2/v4 CSDL XML): targets a `<Parameter Name="...">` child element on
496
+ * an Action, Function, or FunctionImport. Use the unqualified parameter name.
497
+ * - `csdl-json` (OData v4 CSDL JSON): targets an entry in the `$Parameter` array of an
498
+ * Action/Function overload whose `$Name` matches.
499
+ * - OpenAPI (`openapi-v2`, `openapi-v3`, `openapi-v3.1+`): targets an entry in the
500
+ * `parameters` array of the operation identified by `operation` (operationId), matching
501
+ * by the parameter `name` field.
502
+ *
503
+ * `operation` MUST always accompany this field to unambiguously identify the owning operation.
504
+ */
505
+ parameter: string;
506
+ /**
507
+ * Required operation context for the selected parameter.
508
+ * - For OData: the namespace-qualified Action, Function, or FunctionImport name.
509
+ * - For OpenAPI: the `operationId` of the HTTP operation.
510
+ */
511
+ operation: string;
512
+ }
513
+ export interface OverlaySelectorByReturnType {
514
+ /**
515
+ * Flag indicating that the return type of the specified operation is the target.
516
+ * MUST be `true`. Use `operation` to identify the owning operation.
517
+ * Supported metadata formats:
518
+ * - `edmx` (OData v2/v4 CSDL XML): targets the `<ReturnType>` child element of the
519
+ * matched Action or Function element.
520
+ * - `csdl-json` (OData v4 CSDL JSON): targets the `$ReturnType` object inside the matched
521
+ * Action/Function overload array entry.
522
+ */
523
+ returnType: true;
524
+ /**
525
+ * Namespace-qualified Action or Function name whose ReturnType is targeted.
526
+ * - For `edmx`: the namespace-qualified name of the Action or Function (e.g. `com.example.Svc.TerminateEmployee`).
527
+ * - For `csdl-json`: the namespace-qualified name looked up in the Namespace object.
528
+ */
529
+ operation: string;
530
+ }
531
+ /**
532
+ * Optional arbitrary metadata for use by overlay consumers, tooling, and registries.
533
+ * The contents of this block are **never applied to the target document** — they are strictly out-of-band and ignored by the patch merge process.
534
+ *
535
+ * When used at the document level, this carries information about the overlay as a whole (e.g. provenance, approval status, processing instructions).
536
+ * When used at the patch level, this carries information specific to the patched element (e.g. confidence scores, source references).
537
+ *
538
+ * This is an open/extensible object — any properties are allowed.
539
+ */
540
+ export interface OverlayMeta {
541
+ [k: string]: unknown | undefined;
542
+ }
543
+ /**
544
+ * Optional arbitrary metadata for use by overlay consumers, tooling, and registries.
545
+ * The contents of this block are **never applied to the target document** — they are strictly out-of-band and ignored by the patch merge process.
546
+ *
547
+ * When used at the document level, this carries information about the overlay as a whole (e.g. provenance, approval status, processing instructions).
548
+ * When used at the patch level, this carries information specific to the patched element (e.g. confidence scores, source references).
549
+ *
550
+ * This is an open/extensible object — any properties are allowed.
551
+ */
552
+ export interface OverlayMeta1 {
553
+ [k: string]: unknown | undefined;
554
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // AUTO-GENERATED definition files. Do not modify directly.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT3JkT3ZlcmxheS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9nZW5lcmF0ZWQvc3BlYy92MS90eXBlcy9PcmRPdmVybGF5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSwyREFBMkQifQ==
@@ -1,3 +1,3 @@
1
1
  export * from "./Configuration";
2
2
  export * from "./Document";
3
- export * from "./AgentGovernance";
3
+ export * from "./OrdOverlay";
@@ -16,5 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Configuration"), exports);
18
18
  __exportStar(require("./Document"), exports);
19
- __exportStar(require("./AgentGovernance"), exports);
20
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvZ2VuZXJhdGVkL3NwZWMvdjEvdHlwZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLGtEQUFnQztBQUNoQyw2Q0FBMkI7QUFDM0Isb0RBQWtDIn0=
19
+ __exportStar(require("./OrdOverlay"), exports);
20
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvZ2VuZXJhdGVkL3NwZWMvdjEvdHlwZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLGtEQUFnQztBQUNoQyw2Q0FBMkI7QUFDM0IsK0NBQTZCIn0=
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { SpecJsonSchemaRoot } from "@open-resource-discovery/spec-toolkit";
1
+ import type { SpecJsonSchemaRoot } from "@open-resource-discovery/spec-toolkit";
2
2
  export * from "./generated/spec/v1/types";
3
3
  /**
4
4
  * The JSON Schema (draft-07) describing the ORD Document interface
@@ -8,3 +8,7 @@ export declare const ordDocumentSchema: SpecJsonSchemaRoot;
8
8
  * The JSON Schema (draft-07) describing the ORD Configuration interface
9
9
  */
10
10
  export declare const ordConfigurationSchema: SpecJsonSchemaRoot;
11
+ /**
12
+ * The JSON Schema (draft-07) describing the ORD Overlay interface
13
+ */
14
+ export declare const ordOverlaySchema: SpecJsonSchemaRoot;
package/dist/index.js CHANGED
@@ -36,9 +36,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.ordConfigurationSchema = exports.ordDocumentSchema = void 0;
40
- const staticDocumentSchema = __importStar(require("./generated/spec/v1/schemas/Document.schema.json"));
39
+ exports.ordOverlaySchema = exports.ordConfigurationSchema = exports.ordDocumentSchema = void 0;
41
40
  const staticConfigurationSchema = __importStar(require("./generated/spec/v1/schemas/Configuration.schema.json"));
41
+ const staticDocumentSchema = __importStar(require("./generated/spec/v1/schemas/Document.schema.json"));
42
+ const staticOrdOverlaySchema = __importStar(require("./generated/spec/v1/schemas/OrdOverlay.schema.json"));
42
43
  __exportStar(require("./generated/spec/v1/types"), exports);
43
44
  /**
44
45
  * The JSON Schema (draft-07) describing the ORD Document interface
@@ -48,4 +49,8 @@ exports.ordDocumentSchema = staticDocumentSchema;
48
49
  * The JSON Schema (draft-07) describing the ORD Configuration interface
49
50
  */
50
51
  exports.ordConfigurationSchema = staticConfigurationSchema;
51
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsdUdBQXlGO0FBQ3pGLGlIQUFtRztBQUduRyw0REFBMEM7QUFFMUM7O0dBRUc7QUFDVSxRQUFBLGlCQUFpQixHQUM3QixvQkFBcUQsQ0FBQztBQUV2RDs7R0FFRztBQUNVLFFBQUEsc0JBQXNCLEdBQ2xDLHlCQUEwRCxDQUFDIn0=
52
+ /**
53
+ * The JSON Schema (draft-07) describing the ORD Overlay interface
54
+ */
55
+ exports.ordOverlaySchema = staticOrdOverlaySchema;
56
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQ0EsaUhBQW1HO0FBQ25HLHVHQUF5RjtBQUN6RiwyR0FBNkY7QUFFN0YsNERBQTBDO0FBRTFDOztHQUVHO0FBQ1UsUUFBQSxpQkFBaUIsR0FDN0Isb0JBQXFELENBQUM7QUFFdkQ7O0dBRUc7QUFDVSxRQUFBLHNCQUFzQixHQUNsQyx5QkFBMEQsQ0FBQztBQUU1RDs7R0FFRztBQUNVLFFBQUEsZ0JBQWdCLEdBQzVCLHNCQUF1RCxDQUFDIn0=
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json.schemastore.org/package",
3
3
  "name": "@open-resource-discovery/specification",
4
- "version": "1.14.5",
4
+ "version": "1.16.0",
5
5
  "description": "Open Resource Discovery (ORD) Specification",
6
6
  "author": "SAP SE",
7
7
  "license": "Apache-2.0",
@@ -29,7 +29,7 @@
29
29
  "build:docusaurus": "docusaurus build",
30
30
  "format": "biome format --write .",
31
31
  "lint": "biome lint .",
32
- "test": "npm run build:ts && node --test dist/**/*.test.js",
32
+ "test": "npm run build:ts && node --test dist/validation/*.test.js",
33
33
  "serve": "docusaurus serve",
34
34
  "start": "docusaurus start",
35
35
  "deploy": "npm run build && gh-pages -d ./build",
@@ -39,23 +39,25 @@
39
39
  "generate:llm-notebook": "npm run generate && ts-node ./src/helper/exportForNotebookLM.ts"
40
40
  },
41
41
  "devDependencies": {
42
- "@biomejs/biome": "2.4.9",
43
- "@docusaurus/core": "3.9.2",
44
- "@docusaurus/plugin-client-redirects": "3.9.2",
45
- "@docusaurus/preset-classic": "3.9.2",
46
- "@docusaurus/theme-mermaid": "3.9.2",
47
- "@easyops-cn/docusaurus-search-local": "0.55.1",
42
+ "@biomejs/biome": "2.4.16",
43
+ "@docusaurus/core": "3.10.1",
44
+ "@docusaurus/faster": "3.10.1",
45
+ "@docusaurus/plugin-client-redirects": "3.10.1",
46
+ "@docusaurus/preset-classic": "3.10.1",
47
+ "@docusaurus/theme-mermaid": "3.10.1",
48
+ "@easyops-cn/docusaurus-search-local": "0.55.2",
48
49
  "@mdx-js/react": "3.1.1",
49
50
  "@open-resource-discovery/spec-toolkit": "0.8.0",
50
51
  "@types/fs-extra": "11.0.4",
51
- "ajv": "8.18.0",
52
+ "ajv": "8.20.0",
52
53
  "ajv-formats": "3.0.1",
53
54
  "clsx": "2.1.1",
54
- "fs-extra": "11.3.4",
55
- "lefthook": "2.1.4",
55
+ "fs-extra": "11.3.5",
56
+ "lefthook": "2.1.9",
56
57
  "prism-react-renderer": "2.4.1",
57
- "react": "18.3.1",
58
- "react-dom": "18.3.1",
59
- "ts-node": "10.9.2"
58
+ "react": "19.2.7",
59
+ "react-dom": "19.2.7",
60
+ "ts-node": "10.9.2",
61
+ "tslog": "4.10.2"
60
62
  }
61
63
  }