Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forbid hashed tables in AFF #386

Merged
merged 4 commits into from
Aug 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/json.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering whether we should add the information to the sub chapter "Type Mapping" below?

There we could also enhance the table. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I enhanced the table. See my newest commit. Please rereview


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.
Expand All @@ -87,6 +89,7 @@ n | string | `"maxLength": <length of character field>, "pattern": "^[0-9]+$"`
p | number | `"minimum": <minimum value>, "maximum": <maximum value>, "multipleOf": <e.g., 0.01 for 2 decimals>`
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

### Title
To provide a title, an ABAP Doc shorttext
Expand Down