From f8c8a95e25a613fc8ae796e9e2959f9c2ad683a0 Mon Sep 17 00:00:00 2001 From: Nicolas Huber Date: Mon, 1 Aug 2022 18:18:25 +0200 Subject: [PATCH 1/4] Forbid hashed tables in AFF We want to forbid hashed tables, because we do not see any advantage in the AFF. If later there will be use cases, we can remove this limitation. --- docs/json.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/json.md b/docs/json.md index e9c0ac208..a715a929b 100644 --- a/docs/json.md +++ b/docs/json.md @@ -65,6 +65,8 @@ Each JSON Schema provided in this repository is automatically generated. For thi The ABAP types are self-contained, so it is possible to work on them in any system (e.g., in an SAP BTP, ABAP environment system). +Instead of hashed tables, please use sorted tables with a defined key. + The JSON Schema is generated based on the fields and their ABAP type specification defined in `ty_main`. Each field defined in the structure is transformed to a JSON representation using a camel case notation (e.g, field `abap_language_version` is transformed to the field `abapLanguageVersion` in the JSON Schema). The ABAP type information fills the JSON Schema fields `type`, `length`, `minimum`, `maximum`. Fields `format_version` and `header` are mandatory and translate to `formatVersion` and `header` in the JSON Schema. From a9a468a535256c4e2ddf65e0c26e24fb19269f10 Mon Sep 17 00:00:00 2001 From: Nicolas Huber Date: Thu, 4 Aug 2022 14:02:43 +0200 Subject: [PATCH 2/4] Add hashed table are not allowed in Type mapping section --- docs/json.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/json.md b/docs/json.md index a715a929b..a8edb6637 100644 --- a/docs/json.md +++ b/docs/json.md @@ -89,6 +89,7 @@ n | string | `"maxLength": , "pattern": "^[0-9]+$"` p | number | `"minimum": , "maximum": , "multipleOf": ` abap_bool | boolean | sy-langu | string | `"minLength": 2, "maxLength": 2, "pattern": "^[a-z]+$"` +table | array | if the table has unique keys `"uniqueItems": true` is added to the schema; hashed tables are not allowed in AFF ### Title To provide a title, an ABAP Doc shorttext From c56fa2635ac782146ac9ecf87762c3a700174b3c Mon Sep 17 00:00:00 2001 From: Nicolas Huber <80829269+huber-nicolas@users.noreply.github.com> Date: Fri, 5 Aug 2022 09:25:59 +0200 Subject: [PATCH 3/4] Update docs/json.md Co-authored-by: Michael Schneider --- docs/json.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/json.md b/docs/json.md index a8edb6637..6f2098457 100644 --- a/docs/json.md +++ b/docs/json.md @@ -89,7 +89,7 @@ n | string | `"maxLength": , "pattern": "^[0-9]+$"` p | number | `"minimum": , "maximum": , "multipleOf": ` abap_bool | boolean | sy-langu | string | `"minLength": 2, "maxLength": 2, "pattern": "^[a-z]+$"` -table | array | if the table has unique keys `"uniqueItems": true` is added to the schema; hashed tables are not allowed in AFF +table | array | if the table has unique keys `"uniqueItems": true` is added to the schema; hashed tables are not supported ### Title To provide a title, an ABAP Doc shorttext From d62651ca2f753e7401baa8daeea5fc480bd42cd5 Mon Sep 17 00:00:00 2001 From: Nicolas Huber <80829269+huber-nicolas@users.noreply.github.com> Date: Fri, 5 Aug 2022 09:54:16 +0200 Subject: [PATCH 4/4] Update docs/json.md --- docs/json.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/json.md b/docs/json.md index 6f2098457..4fe020780 100644 --- a/docs/json.md +++ b/docs/json.md @@ -89,7 +89,7 @@ n | string | `"maxLength": , "pattern": "^[0-9]+$"` p | number | `"minimum": , "maximum": , "multipleOf": ` abap_bool | boolean | sy-langu | string | `"minLength": 2, "maxLength": 2, "pattern": "^[a-z]+$"` -table | array | if the table has unique keys `"uniqueItems": true` is added to the schema; hashed tables are not supported +table | array | if the table has unique keys, `"uniqueItems": true` is added to the schema; hashed tables are not supported ### Title To provide a title, an ABAP Doc shorttext