Skip to content

Commit ede96b5

Browse files
JoergCMaierschneidermic0wurzkahuber-nicolas
authored
Add new object logical external schema (DESD) (#618)
Co-authored-by: Michael Schneider <[email protected]> Co-authored-by: Katharina Wurz <[email protected]> Co-authored-by: Nicolas Huber <[email protected]>
1 parent 387c90a commit ede96b5

File tree

5 files changed

+136
-0
lines changed

5 files changed

+136
-0
lines changed

file-formats/desd/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# DESD File Format
2+
3+
File | Cardinality | Definition | Schema | Example
4+
:--- | :--- | :--- | :--- | :---
5+
`<name>.desd.json` | 1 | [`zif_aff_desd_v1.intf.abap`](./type/zif_aff_desd_v1.intf.abap) | [`desd-v1.json`](./desd-v1.json) | [`z_aff_example_desd.desd.json`](./examples/z_aff_example_desd.desd.json)

file-formats/desd/desd-v1.json

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{
2+
"$comment": "This file is autogenerated, do not edit manually, see https://github.com/SAP/abap-file-formats for more information.",
3+
"$schema": "https://json-schema.org/draft/2020-12/schema",
4+
"$id": "https://github.com/SAP/abap-file-formats/blob/main/file-formats/desd/desd-v1.json",
5+
"title": "CDS Logical External Schema",
6+
"description": "CDS logical external schema",
7+
"type": "object",
8+
"properties": {
9+
"formatVersion": {
10+
"title": "Format Version",
11+
"description": "Format version",
12+
"type": "string",
13+
"const": "1"
14+
},
15+
"header": {
16+
"title": "Header",
17+
"description": "Header",
18+
"type": "object",
19+
"properties": {
20+
"description": {
21+
"title": "Description",
22+
"description": "Description of the ABAP object",
23+
"type": "string",
24+
"maxLength": 60
25+
},
26+
"originalLanguage": {
27+
"title": "Original Language",
28+
"description": "Original language of the ABAP object",
29+
"type": "string",
30+
"minLength": 2
31+
},
32+
"abapLanguageVersion": {
33+
"title": "ABAP Language Version",
34+
"description": "ABAP language version",
35+
"type": "string",
36+
"enum": [
37+
"standard",
38+
"cloudDevelopment"
39+
],
40+
"enumTitles": [
41+
"Standard",
42+
"ABAP Cloud Development"
43+
],
44+
"enumDescriptions": [
45+
"Standard",
46+
"ABAP cloud development"
47+
],
48+
"default": "standard"
49+
}
50+
},
51+
"additionalProperties": false,
52+
"required": [
53+
"description",
54+
"originalLanguage"
55+
]
56+
},
57+
"generalInformation": {
58+
"title": "General Information",
59+
"description": "General information",
60+
"type": "object",
61+
"properties": {
62+
"defaultRemoteSchemaName": {
63+
"title": "Default Remote Schema",
64+
"description": "Default remote database schema name when configuring the connection details of logical external schema.",
65+
"type": "string",
66+
"maxLength": 256
67+
},
68+
"usesRouting": {
69+
"title": "Uses Routing",
70+
"description": "If true, the logical external schema can only be used in routed scenarios.",
71+
"type": "boolean"
72+
}
73+
},
74+
"additionalProperties": false
75+
}
76+
},
77+
"additionalProperties": false,
78+
"required": [
79+
"formatVersion",
80+
"header"
81+
]
82+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"formatVersion": "1",
3+
"header": {
4+
"description": "Example DESD for ABAP file format",
5+
"originalLanguage": "en"
6+
}
7+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
INTERFACE zif_aff_desd_v1
2+
PUBLIC.
3+
4+
TYPES:
5+
6+
"! <p class="shorttext">General Information</p>
7+
"! General information
8+
BEGIN OF ty_general_information,
9+
"! <p class="shorttext">Default Remote Schema</p>
10+
"! Default remote database schema name when configuring the connection
11+
"! details of logical external schema.
12+
default_remote_schema_name TYPE c LENGTH 256,
13+
"! <p class="shorttext">Uses Routing</p>
14+
"! If true, the logical external schema can only be used
15+
"! in routed scenarios.
16+
uses_routing TYPE abap_bool,
17+
END OF ty_general_information,
18+
19+
"! <p class="shorttext">CDS Logical External Schema</p>
20+
"! CDS logical external schema
21+
BEGIN OF ty_main,
22+
"! <p class="shorttext">Format Version</p>
23+
"! Format version
24+
"! $required
25+
format_version TYPE zif_aff_types_v1=>ty_format_version,
26+
"! <p class="shorttext">Header</p>
27+
"! Header
28+
"! $required
29+
header TYPE zif_aff_types_v1=>ty_header_60_cloud,
30+
"! <p class="shorttext">General Information</p>
31+
"! General information
32+
general_information TYPE ty_general_information,
33+
END OF ty_main.
34+
35+
ENDINTERFACE.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"formatVersion": "1",
3+
"header": {
4+
"description": "ABAP file format of DESD objects",
5+
"originalLanguage": "en"
6+
}
7+
}

0 commit comments

Comments
 (0)