From c8dfd4a31f3cd7b27effe394e7d536ecfad1e2f5 Mon Sep 17 00:00:00 2001 From: KUMARMUKULSAP Date: Fri, 27 Sep 2024 14:18:22 +0530 Subject: [PATCH] [EDCR] Add new object type for EDCR (#630) Co-authored-by: Markus Co-authored-by: Katharina Wurz --- file-formats/edcr/README.md | 5 ++ file-formats/edcr/edcr-v1.json | 63 +++++++++++++++++++ .../examples/z_aff_example_edcr.edcr.json | 8 +++ .../edcr/type/zif_aff_edcr_v1.intf.abap | 16 +++++ .../edcr/type/zif_aff_edcr_v1.intf.json | 7 +++ 5 files changed, 99 insertions(+) create mode 100644 file-formats/edcr/README.md create mode 100644 file-formats/edcr/edcr-v1.json create mode 100644 file-formats/edcr/examples/z_aff_example_edcr.edcr.json create mode 100644 file-formats/edcr/type/zif_aff_edcr_v1.intf.abap create mode 100644 file-formats/edcr/type/zif_aff_edcr_v1.intf.json diff --git a/file-formats/edcr/README.md b/file-formats/edcr/README.md new file mode 100644 index 000000000..9d10ed97f --- /dev/null +++ b/file-formats/edcr/README.md @@ -0,0 +1,5 @@ +# EDCR File Format + +File | Cardinality | Definition | Schema | Example +:--- | :--- | :--- | :--- | :--- +`.edcr.json` | 1 | [`zif_aff_edcr_v1.intf.abap`](./type/zif_aff_edcr_v1.intf.abap) | [`edcr-v1.json`](./edcr-v1.json) | [`z_aff_example_edcr.edcr.json`](./examples/z_aff_example_edcr.edcr.json) diff --git a/file-formats/edcr/edcr-v1.json b/file-formats/edcr/edcr-v1.json new file mode 100644 index 000000000..cb7843aeb --- /dev/null +++ b/file-formats/edcr/edcr-v1.json @@ -0,0 +1,63 @@ +{ + "$comment": "This file is autogenerated, do not edit manually, see https://github.com/SAP/abap-file-formats for more information.", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://github.com/SAP/abap-file-formats/blob/main/file-formats/edcr/edcr-v1.json", + "title": "Representation Type", + "description": "Representation type", + "type": "object", + "properties": { + "formatVersion": { + "title": "ABAP File Format Version", + "description": "The ABAP file format version", + "type": "string", + "const": "1" + }, + "header": { + "title": "Header", + "description": "Header", + "type": "object", + "properties": { + "description": { + "title": "Description", + "description": "Description of the ABAP object", + "type": "string", + "maxLength": 60 + }, + "originalLanguage": { + "title": "Original Language", + "description": "Original language of the ABAP object", + "type": "string", + "minLength": 2 + }, + "abapLanguageVersion": { + "title": "ABAP Language Version", + "description": "ABAP language version", + "type": "string", + "enum": [ + "standard", + "cloudDevelopment" + ], + "enumTitles": [ + "Standard", + "ABAP Cloud Development" + ], + "enumDescriptions": [ + "Standard", + "ABAP cloud development" + ], + "default": "standard" + } + }, + "additionalProperties": false, + "required": [ + "description", + "originalLanguage" + ] + } + }, + "additionalProperties": false, + "required": [ + "formatVersion", + "header" + ] +} diff --git a/file-formats/edcr/examples/z_aff_example_edcr.edcr.json b/file-formats/edcr/examples/z_aff_example_edcr.edcr.json new file mode 100644 index 000000000..167082f8f --- /dev/null +++ b/file-formats/edcr/examples/z_aff_example_edcr.edcr.json @@ -0,0 +1,8 @@ +{ + "formatVersion": "1", + "header": { + "description": "Example Representation", + "originalLanguage": "en", + "abapLanguageVersion": "cloudDevelopment" + } +} diff --git a/file-formats/edcr/type/zif_aff_edcr_v1.intf.abap b/file-formats/edcr/type/zif_aff_edcr_v1.intf.abap new file mode 100644 index 000000000..b7d8eed79 --- /dev/null +++ b/file-formats/edcr/type/zif_aff_edcr_v1.intf.abap @@ -0,0 +1,16 @@ +INTERFACE zif_aff_edcr_v1 + PUBLIC. + + TYPES: + "!

Representation Type

+ "! Representation type + BEGIN OF ty_main, + "! $required + format_version TYPE zif_aff_types_v1=>ty_format_version, + "!

Header

+ "! Header + "! $required + header TYPE zif_aff_types_v1=>ty_header_60_cloud, + END OF ty_main. + +ENDINTERFACE. diff --git a/file-formats/edcr/type/zif_aff_edcr_v1.intf.json b/file-formats/edcr/type/zif_aff_edcr_v1.intf.json new file mode 100644 index 000000000..62a97b841 --- /dev/null +++ b/file-formats/edcr/type/zif_aff_edcr_v1.intf.json @@ -0,0 +1,7 @@ +{ + "formatVersion": "1", + "header": { + "description": "AFF type for EDCR", + "originalLanguage": "en" + } +}