From 1daa7e346f86d7ddb916245c26c8a83f5685ffc0 Mon Sep 17 00:00:00 2001 From: Pascal Maximilian Bremer <8161919+Bomberus@users.noreply.github.com> Date: Wed, 8 Nov 2023 15:07:39 +0100 Subject: [PATCH] Add AFF Type SFPF Add AFF Type SFPF --- file-formats/sfpf/README.md | 5 + .../examples/z_aff_example_sfpf.sfpf.json | 13 ++ file-formats/sfpf/sfpf-v1.json | 115 ++++++++++++++++++ .../sfpf/type/zif_aff_sfpf_v1.intf.abap | 34 ++++++ .../sfpf/type/zif_aff_sfpf_v1.intf.json | 7 ++ 5 files changed, 174 insertions(+) create mode 100644 file-formats/sfpf/README.md create mode 100644 file-formats/sfpf/examples/z_aff_example_sfpf.sfpf.json create mode 100644 file-formats/sfpf/sfpf-v1.json create mode 100644 file-formats/sfpf/type/zif_aff_sfpf_v1.intf.abap create mode 100644 file-formats/sfpf/type/zif_aff_sfpf_v1.intf.json diff --git a/file-formats/sfpf/README.md b/file-formats/sfpf/README.md new file mode 100644 index 000000000..1387b6001 --- /dev/null +++ b/file-formats/sfpf/README.md @@ -0,0 +1,5 @@ +# SFPF File Format + +File | Cardinality | Definition | Schema | Example +:--- | :--- | :--- | :--- | :--- +`.sfpf.json` | 1 | [`zif_aff_sfpf_v1.intf.abap`](./type/zif_aff_sfpf_v1.intf.abap) | [`sfpf-v1.json`](./sfpf-v1.json) | [`z_aff_example_sfpf.sfpf.json`](./examples/z_aff_example_sfpf.sfpf) diff --git a/file-formats/sfpf/examples/z_aff_example_sfpf.sfpf.json b/file-formats/sfpf/examples/z_aff_example_sfpf.sfpf.json new file mode 100644 index 000000000..b2f1b67e5 --- /dev/null +++ b/file-formats/sfpf/examples/z_aff_example_sfpf.sfpf.json @@ -0,0 +1,13 @@ +{ + "formatVersion": "1", + "header": { + "description": "Example SFPF for ABAP file formats", + "originalLanguage": "en", + "abapLanguageVersion": "cloudDevelopment" + }, + "name": "TEMPLATE_NAME", + "description": "Description", + "dataprovider": "Example_SRV_DEF", + "embed": "doNotEmbedFonts", + "mirroring": "mirroringInRtlLanguages" +} diff --git a/file-formats/sfpf/sfpf-v1.json b/file-formats/sfpf/sfpf-v1.json new file mode 100644 index 000000000..190fd1fd7 --- /dev/null +++ b/file-formats/sfpf/sfpf-v1.json @@ -0,0 +1,115 @@ +{ + "$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/sfpf/sfpf-v1.json", + "title": "Object Type SFPF", + "description": "Object type SFPF", + "type": "object", + "properties": { + "formatVersion": { + "title": "Format Version", + "description": "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, + "maxLength": 2, + "pattern": "^[a-z]+$" + }, + "abapLanguageVersion": { + "title": "ABAP Language Version", + "description": "ABAP language version", + "type": "string", + "enum": [ + "standard", + "keyUser", + "cloudDevelopment" + ], + "enumTitles": [ + "Standard", + "ABAP for Key Users", + "ABAP Cloud Development" + ], + "enumDescriptions": [ + "Standard", + "ABAP for key user extensibility", + "ABAP cloud development" + ], + "default": "standard" + } + }, + "additionalProperties": false, + "required": [ + "description", + "originalLanguage" + ] + }, + "name": { + "title": "Name", + "description": "Name", + "type": "string", + "maxLength": 30 + }, + "description": { + "title": "Description", + "description": "Description", + "type": "string", + "maxLength": 60 + }, + "dataprovider": { + "title": "Dataprovider", + "description": "Dataprovider", + "type": "string", + "maxLength": 40 + }, + "embed": { + "title": "Font Embed", + "description": "Font Embed", + "type": "string", + "enum": [ + "doNotEmbedFonts", + "embedFonts" + ], + "enumDescriptions": [ + "Do not embed fonts", + "Embed fonts" + ] + }, + "mirroring": { + "title": "Mirror in RTL", + "description": "Mirror in RTL", + "type": "string", + "enum": [ + "noMirroringInRtlLanguages", + "mirroringInRtlLanguages" + ], + "enumDescriptions": [ + "No mirroring in RTL languages", + "Mirroring in RTL languages" + ] + } + }, + "additionalProperties": false, + "required": [ + "formatVersion", + "header", + "name", + "description", + "dataprovider" + ] +} diff --git a/file-formats/sfpf/type/zif_aff_sfpf_v1.intf.abap b/file-formats/sfpf/type/zif_aff_sfpf_v1.intf.abap new file mode 100644 index 000000000..dd0c8ecbf --- /dev/null +++ b/file-formats/sfpf/type/zif_aff_sfpf_v1.intf.abap @@ -0,0 +1,34 @@ +INTERFACE zif_aff_sfpf_v1 + PUBLIC . + TYPES: + "!

Object Type SFPF

+ "! Object type SFPF + BEGIN OF ty_main, + "!

Format Version

+ "! Format version + "! $required + format_version TYPE zif_aff_types_v1=>ty_format_version, + "!

Header

+ "! Header + "! $required + header TYPE zif_aff_types_v1=>ty_header_60, + "!

Name

+ "! Name + "! $required + name TYPE fpname, + "!

Description

+ "! Description + "! $required + description TYPE fptext, + "!

Dataprovider

+ "! Dataprovider + "! $required + dataprovider TYPE fpdpname, + "!

Font Embed

+ "! Font Embed + embed TYPE fpfntemb, + "!

Mirror in RTL

+ "! Mirror in RTL + mirroring TYPE fpmirroring, + END OF ty_main. +ENDINTERFACE. diff --git a/file-formats/sfpf/type/zif_aff_sfpf_v1.intf.json b/file-formats/sfpf/type/zif_aff_sfpf_v1.intf.json new file mode 100644 index 000000000..737a35715 --- /dev/null +++ b/file-formats/sfpf/type/zif_aff_sfpf_v1.intf.json @@ -0,0 +1,7 @@ +{ + "formatVersion": "1", + "header": { + "description": "AFF type for SFPF object", + "originalLanguage": "en" + } +}