Skip to content

Commit

Permalink
Merge branch 'main' into minka/json-compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
schneidermic0 authored Mar 19, 2024
2 parents b2e53af + 552f60a commit 010fc3e
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 20 deletions.
3 changes: 1 addition & 2 deletions file-formats/cota/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# 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)
`<name>.cota.json` | 1 | [`zif_aff_cota_v1.intf.abap`](./type/zif_aff_cota_v1.intf.abap) | [`cota-v1.json`](./cota-v1.json) | [`sap_cota_testobject.cota.json`](./examples/sap_cota_testobject.cota.json)
26 changes: 18 additions & 8 deletions file-formats/cota/cota-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,12 @@
"description": "Communication type",
"type": "string",
"enum": [
"rfc",
"http"
],
"enumTitles": [
"RFC",
"HTTP"
],
"enumDescriptions": [
"RFC",
"HTTP"
],
"default": "http"
Expand All @@ -85,15 +82,28 @@
"type": "string",
"maxLength": 30
},
"multitenancyMode": {
"title": "Multitenancy Mode",
"description": "Multitenancy mode",
"type": "string",
"enum": [
"crossClient",
"clientSpecific"
],
"enumTitles": [
"Cross Client",
"Client Specific"
],
"enumDescriptions": [
"Cross client",
"Client specific"
],
"default": "clientSpecific"
},
"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
Expand Down
10 changes: 10 additions & 0 deletions file-formats/cota/examples/sap_cota_testobject.cota.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"formatVersion": "1",
"header": {
"description": "Test Object For Unit Tests",
"originalLanguage": "en"
},
"configuration": {
"communicationTargetClass": "SAP_COTA_TESTOBJECT"
}
}
32 changes: 22 additions & 10 deletions file-formats/cota/type/zif_aff_cota_v1.intf.abap
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,27 @@ INTERFACE zif_aff_cota_v1
"! <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.

"! <p class="shorttext">Multitenancy Mode</p>
"! $values {@link zif_aff_cota_v1.data:co_multi_type}
TYPES ty_multi_type TYPE c LENGTH 30.

CONSTANTS:
"! <p class="shorttext">Multitenancy Mode</p>
"! Multitenancy mode
BEGIN OF co_multi_type,
"! <p class="shorttext">Cross Client</p>
"! Cross client
cross_client TYPE ty_multi_type VALUE 'C',
"! <p class="shorttext">Client Specific</p>
"! Client specific
client_specific TYPE ty_multi_type VALUE 'D',
END OF co_multi_type.

TYPES:
"! <p class="shorttext">Configuration</p>
"! Configuration
Expand All @@ -28,13 +41,14 @@ INTERFACE zif_aff_cota_v1
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,
communication_target_class TYPE zif_aff_types_v1=>ty_object_name_30,
"! <p class="shorttext">Multitenancy Mode</p>
"! Multitenancy mode
"! $default {@link zif_aff_cota_v1.data:co_multi_type.client_specific}
multitenancy_mode TYPE ty_multi_type,
"! <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>
Expand All @@ -56,11 +70,10 @@ INTERFACE zif_aff_cota_v1
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,
enforce_sap_gui_support TYPE abap_bool,
"! <p class="shorttext">Enforce Fast Serialization</p>
"! Enforce fast serialization
enforce_fast_serialization TYPE abap_bool,
Expand All @@ -73,7 +86,6 @@ INTERFACE zif_aff_cota_v1
TYPES:
"! <p class="shorttext">HTTP Settings</p>
"! HTTP settings
"! $required
BEGIN OF ty_http_settings,
"! <p class="shorttext">Path Prefix</p>
"! Path prefix
Expand Down

0 comments on commit 010fc3e

Please sign in to comment.