From 98c23793b4ecbc89bc401cdc15cb877bc35d841b Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Mon, 16 Aug 2021 15:18:26 +0200 Subject: [PATCH 1/2] Add examples for camel case notation --- doc/specification.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/specification.md b/doc/specification.md index c7ee2ec84..0f108ea92 100644 --- a/doc/specification.md +++ b/doc/specification.md @@ -123,10 +123,12 @@ The following changes to file formats are considered as incompatible: Each JSON schema provided in this repository is automatically generated. For this purpose, an interface corresponds to each object type in which the necessary components of the type are described in the type `ty_main`. The name of the interface follows the pattern `zif_aff__v`. `` can be either the (R3TR) object type or the (LIMU) sub object type, since R3TR and LIMU object types share the same namespace. `` is an increasing integer which starts with `1`. -One mandatory component of the type is the field `schema` which is translated to `$schema` in the JSON schema. Its value in the `.json` files is the link given in the field `$id` of the JSON schema. Furthermore, a `header` has to be supplied. The interface [`zif_aff_types_v1`](/file-formats/typesUsedForAll/zif_aff_types_v1.intf.abap) offers different headers for reuse, but also other often repeated types. - 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). +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`. + +One mandatory component of the type is the field `schema` which is translated to `$schema` in the JSON schema. Its value in the `.json` files is the link given in the field `$id` of the JSON schema. Furthermore, a `header` has to be supplied. The interface [`zif_aff_types_v1`](/file-formats/typesUsedForAll/zif_aff_types_v1.intf.abap) offers different headers for reuse, but also other often repeated types. + In order to add more information to the JSON schema than that provided by the ABAP type, ABAP Doc can be used. 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. ### Title @@ -144,7 +146,8 @@ An ABAP Doc comment without annotations is passed as description to the JSON sch If no description is given, either the title, if provided, or the component name transformed to camel case is shown in the JSON schema. ### Enum Values -To pass enum values to a JSON schema, a type and a constant are specified. The names of the components of the constant are written as external (JSON) values to the JSON schema after being transformed to camel case. The corresponding values of the components represent the internal (ABAP) values. Descriptions of the enum values are passed to the schema in the same way as described above. +To pass enum values to a JSON schema, a type and a constant are specified. The names of the components of the constant are written as external (JSON) values to the JSON schema after being transformed to camel case (e.g, component `badi_definition` is transformed to the enum value `badiDefinition` in the JSON schema). +The corresponding values of the components represent the internal (ABAP) values. Descriptions of the enum values are passed to the schema in the same way as described above. The type specifies the underlying data type and links to the constant via the following annotation: ```abap From 80d76eace06676a8fd76ccac6ccab1dcebb4f1c8 Mon Sep 17 00:00:00 2001 From: Albert Mink Date: Tue, 17 Aug 2021 10:10:07 +0200 Subject: [PATCH 2/2] empty change to trigger license/cla action --- doc/specification.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/specification.md b/doc/specification.md index 0f108ea92..7f34c317d 100644 --- a/doc/specification.md +++ b/doc/specification.md @@ -153,6 +153,7 @@ The type specifies the underlying data type and links to the constant via the fo ```abap "! $values {@link source_name.data:constant_name} ``` + ### Extreme Values For numerical types, (exclusive) minimum and (exclusive) maximum values can be specified via the annotational keywords ```abap