Skip to content

Commit

Permalink
[COTA] Add new object type COTA (#543)
Browse files Browse the repository at this point in the history
* Add files for COTA

* React to abaplint

* React to abaplint

* React to abaplint

* React to abaplint

* Delete duplicates

* Correct review hints

* Change Data Type and Grouping

* Change format

* Corrections of Review

* Correct Folgder Structure and README

* Comment out 'Asynchronous'

* UX Review corrections

* Correction of more Typos

* Changes to the RFC part

* Change to 'Communication Target Class'

* Delete RFC Type Field

* Restart GitHub Action 'abaplint'

---------

Co-authored-by: Michael Schneider <[email protected]>
Co-authored-by: Katharina Wurz <[email protected]>
Co-authored-by: Albert Mink <[email protected]>
  • Loading branch information
4 people authored Sep 21, 2023
1 parent e154413 commit 1d4e1f2
Show file tree
Hide file tree
Showing 4 changed files with 279 additions and 0 deletions.
6 changes: 6 additions & 0 deletions file-formats/cota/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# COTA File Format


File | Cardinality | Definition | Schema | Example
:--- | :--- | :--- | :--- | :---
`<name>.cota.json` | 1 | [`zif_aff_cota_v1.intf.abap`](./type/zif_aff_cota_v1.intf.abap) | [`cota-v1.json`](./cota-v1.json)
158 changes: 158 additions & 0 deletions file-formats/cota/cota-v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
{
"$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/cota/cota-v1.json",
"title": "Communication Target Object",
"description": "Creation of communication target object",
"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",
"cloudDevelopment"
],
"enumTitles": [
"Standard",
"ABAP Cloud Development"
],
"enumDescriptions": [
"Standard",
"ABAP cloud development"
],
"default": "standard"
}
},
"additionalProperties": false,
"required": [
"description",
"originalLanguage"
]
},
"configuration": {
"title": "Configuration",
"description": "Configuration",
"type": "object",
"properties": {
"communicationType": {
"title": "Communication Type",
"description": "Communication type",
"type": "string",
"enum": [
"rfc",
"http"
],
"enumTitles": [
"RFC",
"HTTP"
],
"enumDescriptions": [
"RFC",
"HTTP"
],
"default": "http"
},
"communicationTargetClass": {
"title": "Communication Target Class",
"description": "Communication target class",
"type": "string",
"maxLength": 30
},
"allowMultipleDestinations": {
"title": "Allow Multiple Application Destinations",
"description": "Allow multiple application destinations",
"type": "boolean"
},
"clientIndependent": {
"title": "Allow Client Independent Application Destinations",
"description": "Allow client independent application destinations",
"type": "boolean"
}
},
"additionalProperties": false
},
"httpSettings": {
"title": "HTTP Settings",
"description": "HTTP settings",
"type": "object",
"properties": {
"pathPrefix": {
"title": "Path Prefix",
"description": "Path prefix",
"type": "string",
"maxLength": 100
}
},
"additionalProperties": false
},
"rfcSettings": {
"title": "RFC Settings",
"description": "RFC settings",
"type": "object",
"properties": {
"enforceSapGuiSupport": {
"title": "Enforce SAP GUI Support",
"description": "Enforce SAP GUI support",
"type": "boolean"
},
"enforceFastSerialization": {
"title": "Enforce Fast Serialization",
"description": "Enforce fast serialization",
"type": "boolean"
},
"defaultCompressionMode": {
"title": "Default Compression Mode",
"description": "Default compression mode",
"type": "string",
"enum": [
"fast",
"high"
],
"enumTitles": [
"Fast",
"High"
],
"enumDescriptions": [
"Fast",
"High"
],
"default": "fast"
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"formatVersion",
"header",
"configuration"
]
}
108 changes: 108 additions & 0 deletions file-formats/cota/type/zif_aff_cota_v1.intf.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
INTERFACE zif_aff_cota_v1
PUBLIC.

"! <p class="shorttext">Communication Type</p>
"! $values {@link zif_aff_cota_v1.data:co_comm_type}
TYPES ty_comm_type TYPE c LENGTH 1.

CONSTANTS:
"! <p class="shorttext">Communication Type</p>
"! Communication type
BEGIN OF co_comm_type,
"! <p class="shorttext">RFC</p>
"! RFC
rfc TYPE ty_comm_type VALUE 'R',
"! <p class="shorttext">HTTP</p>
"! HTTP
http TYPE ty_comm_type VALUE 'H',
END OF co_comm_type.

TYPES:
"! <p class="shorttext">Configuration</p>
"! Configuration
"! $required
BEGIN OF ty_configuration,
"! <p class="shorttext">Communication Type</p>
"! Communication type
"! $default {@link zif_aff_cota_v1.data:co_comm_type.http}
communication_type TYPE ty_comm_type,
"! <p class="shorttext">Communication Target Class</p>
"! Communication target class
communication_target_class TYPE zif_aff_types_v1=>ty_object_name_30,
"! <p class="shorttext">Allow Multiple Application Destinations</p>
"! Allow multiple application destinations
allow_multiple_destinations TYPE abap_bool,
"! <p class="shorttext">Allow Client Independent Application Destinations</p>
"! Allow client independent application destinations
client_independent TYPE abap_bool,
END OF ty_configuration.

"! <p class="shorttext">Default Compression Mode</p>
"! $values {@link zif_aff_cota_v1.data:co_compress_mode}
TYPES ty_comp_mode TYPE c LENGTH 1.

CONSTANTS:
"! <p class="shorttext">Default Compression Mode</p>
"! Default compression mode
BEGIN OF co_compress_mode,
"! <p class="shorttext">Fast</p>
"! Fast
fast TYPE ty_comp_mode VALUE 'F',
"! <p class="shorttext">High</p>
"! High
high TYPE ty_comp_mode VALUE 'H',
END OF co_compress_mode.

TYPES:
"! <p class="shorttext">RFC Settings</p>
"! RFC settings
"! $required
BEGIN OF ty_rfc_settings,
"! <p class="shorttext">Enforce SAP GUI Support</p>
"! Enforce SAP GUI support
enforce_sap_gui_support TYPE abap_bool,
"! <p class="shorttext">Enforce Fast Serialization</p>
"! Enforce fast serialization
enforce_fast_serialization TYPE abap_bool,
"! <p class="shorttext">Default Compression Mode</p>
"! Default compression mode
"! $default {@link zif_aff_cota_v1.data:co_compress_mode.fast}
default_compression_mode TYPE ty_comp_mode,
END OF ty_rfc_settings.

TYPES:
"! <p class="shorttext">HTTP Settings</p>
"! HTTP settings
"! $required
BEGIN OF ty_http_settings,
"! <p class="shorttext">Path Prefix</p>
"! Path prefix
path_prefix TYPE zif_aff_types_v1=>ty_description_100,
END OF ty_http_settings.


TYPES:
"! <p class="shorttext">Communication Target Object</p>
"! Creation of communication target object
BEGIN OF ty_main,
"! <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_cloud,
"! <p class="shorttext">Configuration</p>
"! Configuration
"! $required
configuration TYPE ty_configuration,
"! <p class="shorttext">HTTP Settings</p>
"! HTTP settings
http_settings TYPE ty_http_settings,
"! <p class="shorttext">RFC Settings</p>
"! RFC settings
rfc_settings TYPE ty_rfc_settings,
END OF ty_main.

ENDINTERFACE.
7 changes: 7 additions & 0 deletions file-formats/cota/type/zif_aff_cota_v1.intf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"formatVersion": "1",
"header": {
"description": "ABAP File Format for Connection Target",
"originalLanguage": "en"
}
}

0 comments on commit 1d4e1f2

Please sign in to comment.