Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AIFD] Add new object type AIFD #612

Merged
merged 19 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions file-formats/aifd/README.md
D047539 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# AIFD File Format

File | Cardinality | Definition | Schema | Example
:--- | :--- | :--- | :--- | :---
`<name>.aifd.json` | 1 | [`zif_aff_aifd_v1.intf.abap`](./type/zif_aff_aifd_v1.intf.abap) | [`aifd-v1.json`](./aifd-v1.json) | [`z_aff_example_aifd.aifd.json`](./examples/z_aff_example_aifd.aifd.json)
86 changes: 86 additions & 0 deletions file-formats/aifd/aifd-v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"$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/aifd/aifd-v1.json",
"title": "Deployment Scenario",
"description": "Deployment scenario",
"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"
]
},
"aifInterfaces": {
"title": "AIF Interfaces",
"description": "AIF interfaces",
"type": "array",
"items": {
"title": "AIF Interface",
"description": "AIF interface",
"type": "object",
"properties": {
"interfaceObjectName": {
"title": "Interface Object Name",
"description": "Interface object name",
"type": "string",
"maxLength": 40
}
},
"additionalProperties": false,
"required": [
"interfaceObjectName"
]
}
}
},
"additionalProperties": false,
"required": [
"formatVersion",
"header",
"aifInterfaces"
]
}
19 changes: 19 additions & 0 deletions file-formats/aifd/examples/z_aff_example_aifd.aifd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"formatVersion": "1",
"header": {
"description": "Example AIFD for ABAP File Format",
"originalLanguage": "en",
"abapLanguageVersion": "cloudDevelopment"
},
"aifInterfaces":[
{
"interfaceObjectName":"INT_OBJ_1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@D047539 did you consider to change interfaceObjectName to name? Typically, the array name, here 'aifInterfaces', is sufficient and in particular if the array element contains a single String.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@albertmink no, we have not changed the name from interfaceObjectName to name because name is very generic one and from our point of view it is not a clear name. We would like to keep the interfaceObjectName as name.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this has been suggested beforehand, I just wanted to make sure that this has been considered by you. You are allowed to overrule our suggestions 😐

},
{
"interfaceObjectName":"/AIFTCUST_WS_I00001"
},
{
"interfaceObjectName":"/AIFTCUST_WS_O00001"
}
]
}
31 changes: 31 additions & 0 deletions file-formats/aifd/type/zif_aff_aifd_v1.intf.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
INTERFACE zif_aff_aifd_v1
PUBLIC.
TYPES:
"! <p class="shorttext">AIF Interface</p>
"! AIF interface
BEGIN OF ty_aif_interface,
"! <p class="shorttext">Interface Object Name</p>
schneidermic0 marked this conversation as resolved.
Show resolved Hide resolved
"! Interface object name
"! $required
interface_object_name TYPE c LENGTH 40,
END OF ty_aif_interface,

"! <p class="shorttext">AIF Interfaces</p>
"! AIF interfaces
ty_aif_interfaces TYPE STANDARD TABLE OF ty_aif_interface WITH DEFAULT KEY,

"! <p class="shorttext">Deployment Scenario</p>
"! Deployment scenario
BEGIN OF ty_main,
"! $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_cloud,
"! <p class="shorttext">AIF Interfaces</p>
"! AIF interfaces
"! $required
aif_interfaces TYPE ty_aif_interfaces,
END OF ty_main.
ENDINTERFACE.
7 changes: 7 additions & 0 deletions file-formats/aifd/type/zif_aff_aifd_v1.intf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"formatVersion": "1",
"header": {
"description": "AFF type for AIFD (Deployment Scenario)",
"originalLanguage": "en"
}
}
Loading