Skip to content

Commit

Permalink
Add AFF Type SFPF
Browse files Browse the repository at this point in the history
Add AFF Type SFPF
  • Loading branch information
Bomberus committed Nov 8, 2023
1 parent 100d201 commit 1daa7e3
Show file tree
Hide file tree
Showing 5 changed files with 174 additions and 0 deletions.
5 changes: 5 additions & 0 deletions file-formats/sfpf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SFPF File Format

File | Cardinality | Definition | Schema | Example
:--- | :--- | :--- | :--- | :---
`<name>.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)
13 changes: 13 additions & 0 deletions file-formats/sfpf/examples/z_aff_example_sfpf.sfpf.json
Original file line number Diff line number Diff line change
@@ -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"
}
115 changes: 115 additions & 0 deletions file-formats/sfpf/sfpf-v1.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
34 changes: 34 additions & 0 deletions file-formats/sfpf/type/zif_aff_sfpf_v1.intf.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
INTERFACE zif_aff_sfpf_v1
PUBLIC .

Check failure on line 2 in file-formats/sfpf/type/zif_aff_sfpf_v1.intf.abap

View check run for this annotation

abaplint / abaplint

Remove space before "," or "."

https://rules.abaplint.org/space_before_dot
TYPES:
"! <p class="shorttext">Object Type SFPF</p>
"! Object type SFPF
BEGIN OF ty_main,

Check failure on line 6 in file-formats/sfpf/type/zif_aff_sfpf_v1.intf.abap

View check run for this annotation

abaplint / abaplint

Type "TY_MAIN" contains unknown: FPNAME not found, lookup

https://rules.abaplint.org/unknown_types
"! <p class="shorttext">Format Version</p>
"! Format version
"! $required
format_version TYPE zif_aff_types_v1=>ty_format_version,
"! <p class="shorttext">Header</p>
"! Header
"! $required
header TYPE zif_aff_types_v1=>ty_header_60,
"! <p class="shorttext">Name</p>
"! Name
"! $required
name TYPE fpname,
"! <p class="shorttext">Description</p>
"! Description
"! $required
description TYPE fptext,
"! <p class="shorttext">Dataprovider</p>
"! Dataprovider
"! $required
dataprovider TYPE fpdpname,
"! <p class="shorttext">Font Embed</p>
"! Font Embed
embed TYPE fpfntemb,
"! <p class="shorttext">Mirror in RTL</p>
"! Mirror in RTL
mirroring TYPE fpmirroring,
END OF ty_main.
ENDINTERFACE.
7 changes: 7 additions & 0 deletions file-formats/sfpf/type/zif_aff_sfpf_v1.intf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"formatVersion": "1",
"header": {
"description": "AFF type for SFPF object",
"originalLanguage": "en"
}
}

0 comments on commit 1daa7e3

Please sign in to comment.