Skip to content
Draft
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ For a roadmap including expected timeline, please refer to [ROADMAP.md](./ROADMA
### Added

- Added missing property `$id` to annotation extension schemas
- ADDED: Added `@ORD` annotation vocabulary
- Added `@ORD.ordIds` to correlate CSN Service and Entity to its ORD API Resource, Event Resource and Entity Type equivalents.
- Added clarification that `key: true` also implies `notNull: true`

## [1.0.3]
Expand Down
17 changes: 15 additions & 2 deletions spec-toolkit.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,19 @@
"description": "@ODM for One Domain Model (ODM) related annotations."
}
},
{
"type": "specExtension",
"id": "ord",
"sourceFilePath": "./spec/v1/annotations/ord.yaml",
"sourceIntroFilePath": "./spec/v1/annotations/ord.md",
"targetDocumentId": "csn-interop-effective",
"targetLink": "../spec-v1/csn-interop-effective",
"mdFrontmatter": {
"title": "@ORD",
"sidebar_position": 9,
"description": "@ORD for Open Resource Discovery related annotations."
}
},
{
"type": "specExtension",
"id": "personal-data",
Expand All @@ -110,7 +123,7 @@
"targetDocumentId": "csn-interop-effective",
"mdFrontmatter": {
"title": "@PersonalData",
"sidebar_position": 9,
"sidebar_position": 10,
"description": "@PersonalData to annotate DPP relevant information."
}
},
Expand All @@ -122,7 +135,7 @@
"targetDocumentId": "csn-interop-effective",
"mdFrontmatter": {
"title": "@Semantics",
"sidebar_position": 10,
"sidebar_position": 11,
"description": "@Semantics annotations."
}
}
Expand Down
14 changes: 14 additions & 0 deletions spec/v1/annotations/ord.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
> <span className="feature-status-beta">BETA</span> This annotation is beta and should be reviewed for completion and correctness.

## Introduction

[Open Resource Discovery](https://sap.github.io/open-resource-discovery/) (ORD) is a complementary standard to CSN Interop.
It's purpose is to provide a decentralized protocol for metadata publishing and discovery of applications and services.
From ORD perspective, CSN Interop is a possible resource definition format that can be attached to API and Event resources.

On the ORD level, more high-level context can be found and expressed, that is shared across different protocols and standards.
Also it covers (global) taxonomy and relationships between high-level concepts.

With this annotations it's possible to connect the CSN Interop concepts back to the high-level ORD concepts.

> 🔗 Visit the public [Open Resource Discovery](https://sap.github.io/open-resource-discovery/) page.
20 changes: 20 additions & 0 deletions spec/v1/annotations/ord.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
$schema: "http://json-schema.org/draft-07/schema#"
title: "ORD"
x-extension:
targetDocument: "./spec/v1/CSN-Interop-Effective.schema.yaml"
targetLink: "../spec-v1/csn-interop-effective"

definitions:
"@ORD.ordIds":
type: array
items:
type: string
pattern: ^([a-z0-9-]+(?:[.][a-z0-9-]+)*):(apiResource|eventResource|entityType):([a-zA-Z0-9._\-]+):(v0|v[1-9][0-9]*|)$
description: |-
The [ORD ID](https://sap.github.io/open-resource-discovery/spec-v1#ord-id) of the CSN definition.
It can be an array, because a single CDS [Service](../spec-v1/csn-interop-effective#i18n) can be exposed via multiple concrete API or Event protocols.
examples:
- ["sap.s4:apiResource:API_BILL_OF_MATERIAL_SRV:v1"]
x-extension-targets:
- "Entity"
- "Service"
4 changes: 3 additions & 1 deletion spec/v1/examples/airline.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"definitions": {
"AirlineService": {
"kind": "service",
"doc": "This is describing the service that exposes the CDS entities through an API."
"doc": "This is describing the service that exposes the CDS entities through an API.",
"@ORD.ordIds": ["sap.foo:apiResource:AirlineDeltaShare:v1"]
},
"AirlineService.Airline": {
"kind": "entity",
Expand All @@ -24,6 +25,7 @@
"@ObjectModel.modelingPattern": {
"#": "ANALYTICAL_DIMENSION"
},
"@ORD.ordIds": ["sap.foo:entityType:Airline:v1"],
"elements": {
"AirlineID": {
"@EndUserText.label": "Airline",
Expand Down