From 37dea49da7fe1c7b2145b77c54bb3713cc683e08 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Mon, 30 May 2022 13:29:47 +0200 Subject: [PATCH] Document ABAP type mapping (#367) --- docs/json.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/json.md b/docs/json.md index 3ea4842bc..e4c041d08 100644 --- a/docs/json.md +++ b/docs/json.md @@ -74,6 +74,20 @@ In order to add more information to the JSON Schema than that provided by the AB The comments are placed directly above the components of the type `ty_main`, but they are also read over several levels as, e.g., in the case of nested structures. The different possibilities are summarized in the following. +### Type Mapping + +An ABAP type is mapped to a JSON Schema `type` as follows: + +ABAP Type | JSON Schema Type | JSON Schema Additions +:--- | :--- | :--- +string | string | +c | string | `"maxLength": ` +i | integer | `minimum": -2147483648, "maximum": 2147483647` +n | string | `"maxLength": , "pattern": "^[0-9]+$"` +p | number | `"minimum": , "maximum": , "multipleOf": ` +abap_bool | boolean | +sy-langu | string | `"minLength": 2, "maxLength": 2, "pattern": "^[a-z]+$"` + ### Title To provide a title, an ABAP Doc shorttext ```abap