Skip to content

Commit a737720

Browse files
authored
Merge branch 'main' into genai-contribution
2 parents 5660856 + e524636 commit a737720

File tree

8 files changed

+491
-18
lines changed

8 files changed

+491
-18
lines changed

sap-extensions/extensions.json

Lines changed: 111 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,69 @@
44
"type": "object",
55
"x-extends": [
66
{
7-
"paths": ["properties"],
7+
"paths": [
8+
"definitions.schema.properties",
9+
"definitions.Schema.properties"
10+
],
11+
"properties": {
12+
"x-sap-dpp-entity-semantics": {
13+
"type": "string",
14+
"description": "Primary meaning of the personal data in the annotated entity set. Entities annotated with x-sap-dpp-entity-semantics are synonymous to x-sap-dpp-is-potentially-personal.",
15+
"enum": [
16+
"sap:DataSubject",
17+
"sap:DataSubjectDetails",
18+
"sap:Other"
19+
]
20+
},
21+
"x-sap-dpp-data-subject-role": {
22+
"type": "string",
23+
"description": "Role of the data subjects in this set (e.g. employee, customer). Values are application-specific."
24+
},
25+
"x-sap-dpp-data-subject-role-description": {
26+
"type": "string",
27+
"description": "Language-dependent description of the role of the data subjects in this set (e.g. employee, customer). Values are application-specific."
28+
},
29+
"x-sap-dpp-field-semantics": {
30+
"type": "string",
31+
"description": "Primary meaning of the personal data contained in the annotated property. Changes to values of annotated properties are tracked in the audit log. Use this annotation also on fields that are already marked as contact or address data. Properties annotated with x-sap-dpp-field-semantics need not be additionally annotated with x-sap-dpp-is-potentially-personal.",
32+
"enum": [
33+
"sap:DataSubjectID",
34+
"sap:ConsentID",
35+
"sap:PurposeID",
36+
"sap:ContractRelatedID",
37+
"sap:LegalEntityID",
38+
"sap:DataControllerID",
39+
"sap:UserID",
40+
"sap:EndOfBusinessDate",
41+
"sap:BlockingDate",
42+
"sap:EndOfRetentionDate"
43+
]
44+
},
45+
"x-sap-dpp-is-potentially-personal": {
46+
"type": "boolean",
47+
"default": true,
48+
"description": "Property contains potentially personal data. Properties annotated with x-sap-dpp-field-semantics need not be additionally annotated with this extension."
49+
},
50+
"x-sap-dpp-is-potentially-sensitive": {
51+
"type": "boolean",
52+
"default": true,
53+
"description": "Property contains potentially sensitive personal data"
54+
}
55+
}
56+
},
57+
{
58+
"paths": [
59+
"properties"
60+
],
861
"properties": {
962
"x-sap-compliance-level": {
1063
"type": "string",
1164
"description": "The compliance level that this API resource is expected to be compliant with. This corresponds to the [ORD policy level](https://pages.github.tools.sap/CentralEngineering/open-resource-discovery-specification/#/v1/generated/Document?id=package_policylevel) concept.",
12-
"enum": ["sap:base:v1", "sap:core:v1", "sap:core:v2"]
65+
"enum": [
66+
"sap:base:v1",
67+
"sap:core:v1",
68+
"sap:core:v2"
69+
]
1370
},
1471
"x-sap-shortText": {
1572
"type": "string",
@@ -22,15 +79,23 @@
2279
"x-sap-api-type": {
2380
"type": "string",
2481
"description": "Type of API",
25-
"enum": ["REST", "SOAP", "ODATA", "ODATAV4"],
82+
"enum": [
83+
"REST",
84+
"SOAP",
85+
"ODATA",
86+
"ODATAV4"
87+
],
2688
"example": "REST"
2789
},
2890
"x-sap-ext-overview": {
2991
"type": "array",
3092
"description": "To provide stakeholder-specific information",
3193
"items": {
3294
"type": "object",
33-
"required": ["name", "values"],
95+
"required": [
96+
"name",
97+
"values"
98+
],
3499
"additionalProperties": false,
35100
"properties": {
36101
"name": {
@@ -40,11 +105,16 @@
40105
"type": "array",
41106
"items": {
42107
"oneOf": [
43-
{ "type": "string" },
108+
{
109+
"type": "string"
110+
},
44111
{
45112
"type": "object",
46113
"additionalProperties": false,
47-
"required": ["text", "format"],
114+
"required": [
115+
"text",
116+
"format"
117+
],
48118
"properties": {
49119
"text": {
50120
"type": "string",
@@ -54,7 +124,10 @@
54124
"type": "string",
55125
"description": "The value format. Possible values: `plain`, `markdown`.",
56126
"default": "plain",
57-
"enum": ["plain", "markdown"]
127+
"enum": [
128+
"plain",
129+
"markdown"
130+
]
58131
}
59132
}
60133
}
@@ -67,7 +140,9 @@
67140
"x-sap-stateInfo": {
68141
"type": "object",
69142
"description": "API Status",
70-
"required": ["state"],
143+
"required": [
144+
"state"
145+
],
71146
"properties": {
72147
"state": {
73148
"oneOf": [
@@ -92,20 +167,31 @@
92167
"description": "Indicates API status."
93168
}
94169
],
95-
"examples": ["Beta", "Active", "Deprecated", "Decommissioned"]
170+
"examples": [
171+
"Beta",
172+
"Active",
173+
"Deprecated",
174+
"Decommissioned"
175+
]
96176
},
97177
"deprecationDate": {
98178
"oneOf": [
99179
{
100180
"type": "string",
101181
"format": "date",
102-
"examples": ["2022-01-01", "2021-11-14"],
182+
"examples": [
183+
"2022-01-01",
184+
"2021-11-14"
185+
],
103186
"description": "Deprecation date of an API (when the deprecation process started)."
104187
},
105188
{
106189
"type": "string",
107190
"pattern": "^[0-9]{2} [A-Za-z]{3} [0-9]{4}$",
108-
"examples": ["01 Jan 2022", "14 Nov 2021"],
191+
"examples": [
192+
"01 Jan 2022",
193+
"14 Nov 2021"
194+
],
109195
"description": "Deprecation date of an API (when the deprecation process started)."
110196
}
111197
]
@@ -115,13 +201,19 @@
115201
{
116202
"type": "string",
117203
"format": "date",
118-
"examples": ["2022-01-01", "2021-11-14"],
204+
"examples": [
205+
"2022-01-01",
206+
"2021-11-14"
207+
],
119208
"description": "Decommission date of an API (sunset data, when it will not be available anymore)."
120209
},
121210
{
122211
"type": "string",
123212
"pattern": "^[0-9]{2} [A-Za-z]{3} [0-9]{4}$",
124-
"examples": ["01 Jan 2022", "14 Nov 2021"],
213+
"examples": [
214+
"01 Jan 2022",
215+
"14 Nov 2021"
216+
],
125217
"description": "Decommission date of an API (sunset data, when it will not be available anymore)."
126218
}
127219
]
@@ -137,7 +229,11 @@
137229
"x-sap-direction": {
138230
"type": "string",
139231
"description": "Indicates the direction of an API",
140-
"enum": ["inbound", "outbound", "mixed"],
232+
"enum": [
233+
"inbound",
234+
"outbound",
235+
"mixed"
236+
],
141237
"default": "inbound"
142238
},
143239
"x-sap-ord-id": {
@@ -148,4 +244,4 @@
148244
}
149245
}
150246
]
151-
}
247+
}

sap-extensions/v2.0-extensions.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,27 @@
66
{
77
"paths": ["definitions.schema.properties"],
88
"properties": {
9+
"x-sap-odm-semantic-key": {
10+
"type": "array",
11+
"description": "Semantic key is a human-readable identifier used exclusively for the purpose of identifying business objects by the end-user.",
12+
"items": {
13+
"type": "object",
14+
"properties": {
15+
"name": {
16+
"type": "string",
17+
"description": "Semantic key name."
18+
},
19+
"values": {
20+
"type": "array",
21+
"items": {
22+
"type": "string",
23+
"description": "Parts of semantic key."
24+
}
25+
}
26+
}
27+
}
28+
},
29+
930
"x-sap-odm-entity-name": {
1031
"type": "string",
1132
"description": "Name of an ODM entity as a general concept, not a concrete version thereof. The annotated schema is one of many representations of the ODM entity. Annotating the schema with this term helps consumers find APIs that process or expose the same entity."

sap-extensions/v3.0-extensions.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,26 @@
66
{
77
"paths": ["definitions.Schema.properties"],
88
"properties": {
9+
"x-sap-odm-semantic-key": {
10+
"type": "array",
11+
"description": "Semantic key is a human-readable identifier used exclusively for the purpose of identifying business objects by the end-user.",
12+
"items": {
13+
"type": "object",
14+
"properties": {
15+
"name": {
16+
"type": "string",
17+
"description": "Semantic key name."
18+
},
19+
"values": {
20+
"type": "array",
21+
"items": {
22+
"type": "string",
23+
"description": "Parts of semantic key."
24+
}
25+
}
26+
}
27+
}
28+
},
929
"x-sap-odm-entity-name": {
1030
"type": "string",
1131
"description": "Name of an ODM entity as a general concept, not a concrete version thereof. The annotated schema is one of many representations of the ODM entity. Annotating the schema with this term helps consumers find APIs that process or expose the same entity."

sap-schemas/v2.0/README.md

Lines changed: 109 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,37 @@ Example:
381381
}
382382
```
383383

384+
### `x-sap-odm-semantic-key`
385+
386+
- Type: `Array`
387+
- Used at: [Schema Object](https://spec.openapis.org/oas/v2.0#schema-object)
388+
- Description: Semantic key is a human-readable identifier used exclusively for the purpose of identifying business objects by the end-user.
389+
390+
Constraints:
391+
392+
- OPTIONAL
393+
394+
- Array Item:
395+
396+
- Type: `Object`
397+
- Schema:
398+
399+
| Field Name | Type | Description |
400+
| ---------- | -------- | ------------------------------------------------------- |
401+
| name | `String` | Semantic key name. |
402+
| values | `String` | List of properties which are parts of the semantic key. |
403+
404+
Example:
405+
406+
```json
407+
[
408+
{
409+
"name": "CostCenter",
410+
"values": ["costCenterId", "validityEndDate", "controllingArea"]
411+
}
412+
]
413+
```
414+
384415
### `x-sap-odm-oid`
385416

386417
- Type: `String`
@@ -418,7 +449,7 @@ The `x-sap-odm-oid` custom field points to the `oid` property which contains the
418449
### `x-sap-odm-oid-reference-entity-name`
419450

420451
- Type: `String`
421-
- Used at: [Schema Object](https://spec.openapis.org/oas/v3.0.3#schema-object)
452+
- Used at: [Schema Object](https://spec.openapis.org/oas/v2.0#schema-object)
422453
- Description: An annotation to specify the ODM entity name of the referenced entity if required. The annotation is to be used on property level and the value must be the entity name.
423454

424455
Constraints:
@@ -527,3 +558,80 @@ Constraints:
527558
}
528559
}
529560
```
561+
562+
### `x-sap-dpp-entity-semantics`
563+
564+
- Type: `String`
565+
- Allowed Values:
566+
- `sap:DataSubject`
567+
- `sap:DataSubjectDetails`
568+
- `sap:Other`
569+
- Used at: [OpenAPI Schema Object](https://spec.openapis.org/oas/v2.0#schema-object)
570+
- Description: Primary meaning of the personal data in the annotated entity set. Entities annotated with `x-sap-dpp-entity-semantics` are synonymous to `x-sap-dpp-is-potentially-personal`.
571+
572+
Constraints:
573+
574+
- OPTIONAL
575+
576+
### `x-sap-dpp-data-subject-role`
577+
578+
- Type: `String`
579+
- Used at: [OpenAPI Schema Object](https://spec.openapis.org/oas/v2.0#schema-object)
580+
- Description: Role of the data subjects in this set (e.g. employee, customer). Values are application-specific.
581+
582+
Constraints:
583+
584+
- OPTIONAL
585+
586+
### `x-sap-dpp-data-subject-role-description`
587+
588+
- Type: `String`
589+
- Used at: [OpenAPI Schema Object](https://spec.openapis.org/oas/v2.0#schema-object)
590+
- Description: Language-dependent description of the role of the data subjects in this set (e.g. employee, customer). Values are application-specific.
591+
592+
Constraints:
593+
594+
- OPTIONAL
595+
596+
### `x-sap-dpp-field-semantics`
597+
598+
- Type: `String`
599+
- Used at: [OpenAPI Schema Object](https://spec.openapis.org/oas/v2.0#schema-object
600+
- Description: Primary meaning of the personal data contained in the annotated property. Changes to values of annotated properties are tracked in the audit log. Use this annotation also on fields that are already marked as contact or address data. Properties annotated with `x-sap-dpp-field-semantics` need not be additionally annotated with `x-sap-dpp-is-potentially-personal`.
601+
- Allowed Values:
602+
- `sap:DataSubjectID`
603+
- `sap:ConsentID`
604+
- `sap:PurposeID`
605+
- `sap:ContractRelatedID`
606+
- `sap:LegalEntityID` (to be deprecated)
607+
- `sap:DataControllerID`
608+
- `sap:UserID`
609+
- `sap:EndOfBusinessDate`
610+
- `sap:BlockingDate`
611+
- `sap:EndOfRetentionDate`
612+
613+
Constraints:
614+
615+
- OPTIONAL
616+
617+
### `x-sap-dpp-is-potentially-personal`
618+
619+
- Type: `Boolean`
620+
- Used at: [Schema Object](https://spec.openapis.org/oas/v2.0#schema-object)
621+
- Description: Property contains potentially personal data. Properties annotated with `x-sap-dpp-field-semantics` need not be additionally annotated with this extension.
622+
623+
Constraints:
624+
625+
- OPTIONAL
626+
- Default: `true`
627+
628+
### `x-sap-dpp-is-potentially-sensitive`
629+
630+
- Type: `Boolean`
631+
- Used at: [Schema Object](https://spec.openapis.org/oas/v2.0#schema-object)
632+
- Description: Property contains potentially sensitive personal data.
633+
634+
Constraints:
635+
636+
- OPTIONAL
637+
- Default: `true`

0 commit comments

Comments
 (0)