-
Notifications
You must be signed in to change notification settings - Fork 61
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
[SKTD] New object type: Knowledge transfer documents #270
Draft
uenal-akkaya
wants to merge
16
commits into
SAP:main
Choose a base branch
from
uenal-akkaya:feature/sktd
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
74deb82
Knowledge Transfer Document: Object type SKTD
uenal-akkaya 48cd586
Updated example sktd with text for escaped text/comments
uenal-akkaya c05108a
Update README.md
uenal-akkaya fa15b68
Update file-formats/sktd/type/zif_aff_sktd_v1.intf.abap
schneidermic0 557c49b
Incorporated changes for SKTD
uenal-akkaya 8c3c60e
Merge branch 'main' into feature/sktd
larshp f548735
Merge branch 'main' into feature/sktd
schneidermic0 85ccbd1
Merge branch 'main' into feature/sktd
larshp c8f6a82
Merge branch 'main' into feature/sktd
albertmink 6a5902f
Merge branch 'main' into feature/sktd
schneidermic0 a544f39
Merge branch 'main' into feature/sktd
albertmink 7a1757c
Merge branch 'main' into feature/sktd
schneidermic0 fba7ebc
Merge branch 'main' into feature/sktd
schneidermic0 b2658e3
Change editconfig to ignore trailing spaces
schneidermic0 21ba851
Change order in editconfig
schneidermic0 f93265a
Change config for .md in general
schneidermic0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,15 @@ | ||||||
# SKTD File Format | ||||||
|
||||||
File | Cardinality | Definition | Schema | Example | ||||||
:--- | :--- | :--- | :--- | :--- | ||||||
`<name>.sktd.json` | 1 | [`zif_aff_sktd_v1.intf.abap`](./type/zif_aff_sktd_v1.intf.abap) | [`sktd-v1.json`](./sktd-v1.json) | [`z_aff_example_sktd.sktd.json`](./examples/z_aff_example_sktd.sktd.en.json) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wrong link to the JSON example file.
Suggested change
Please also add the link to the markdown file. |
||||||
|
||||||
|
||||||
The serialization of a KTD object will be done by serialization of each documentation element, for each element the ID is followed by the markdown content. | ||||||
The ID will be serialized as comment, e.g. the element ID of the headings action documentation element from the example: | ||||||
|
||||||
``` | ||||||
[//]: # (id:/sap/bc/adt/bo/behaviordefinitions/z_aff_example_sktd/source/main#type=BDEF/BAC;name=z_aff_example_sktd.headings ) | ||||||
``` | ||||||
|
||||||
All lines of the documentation content which starts with `[//]:` will be escaped as `\[//]:`. |
252 changes: 252 additions & 0 deletions
252
file-formats/sktd/examples/z_aff_example_sktd.sktd.en.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,252 @@ | ||
[//]: # (id:/sap/bc/adt/bo/behaviordefinitions/z_aff_example_sktd/source/main#type=BDEF/BAC;name=z_aff_example_sktd.headings ) | ||
|
||
## Headings | ||
|
||
Section headings can be specified in six different levels using the hash character. | ||
|
||
**Markdown**: | ||
``` | ||
# This is a h1 heading | ||
## This is a h2 heading | ||
### This is a h3 heading | ||
#### This is a h4 heading | ||
##### This is a h5 heading | ||
###### This is a h6 heading | ||
``` | ||
|
||
|
||
[//]: # (id:/sap/bc/adt/bo/behaviordefinitions/z_aff_example_sktd/source/main#type=BDEF/BAC;name=z_aff_example_sktd.headings ) | ||
|
||
|
||
|
||
[//]: # (id:/sap/bc/adt/bo/behaviordefinitions/z_aff_example_sktd/source/main#type=BDEF/BAC;name=z_aff_example_sktd.linesAndParagraphs ) | ||
|
||
## Lines and paragraphs | ||
|
||
This is a paragraph. | ||
This is a new line in the same paragraph. | ||
|
||
This is a separate paragraph. | ||
|
||
**Markdown**: | ||
``` | ||
This is a paragraph. | ||
This is a new line in the same paragraph. | ||
|
||
This is a separate paragraph. | ||
``` | ||
|
||
[//]: # (id:/sap/bc/adt/bo/behaviordefinitions/z_aff_example_sktd/source/main#type=BDEF/BAC;name=z_aff_example_sktd.linesAndParagraphs ) | ||
|
||
|
||
|
||
[//]: # (id:/sap/bc/adt/bo/behaviordefinitions/z_aff_example_sktd/source/main#type=BDEF/BAC;name=z_aff_example_sktd.links ) | ||
|
||
## Links | ||
|
||
### Web links | ||
|
||
* See [Link SAP](https://www.sap.com) | ||
* A direct link goes is specified like this: <http://www.sap.com> | ||
|
||
**Markdown**: | ||
``` | ||
* See [Link SAP](http://www.sap.com) | ||
* A direct link goes is specified like this: <http://www.sap.com> | ||
``` | ||
|
||
### Object reference | ||
|
||
* See [Link to BDEF](BDEF:Z_AFF_EXAMPLE_SKTD) | ||
* A direct link goes is specified like this: <BDEF:Z_AFF_EXAMPLE_SKTD> | ||
|
||
**Markdown**: | ||
``` | ||
* See [Link to BDEF](BDEF:Z_AFF_EXAMPLE_SKTD) | ||
* A direct link goes is specified like this: <BDEF:Z_AFF_EXAMPLE_SKTD> | ||
``` | ||
|
||
[//]: # (id:/sap/bc/adt/bo/behaviordefinitions/z_aff_example_sktd/source/main#type=BDEF/BAC;name=z_aff_example_sktd.links ) | ||
|
||
|
||
|
||
[//]: # (id:/sap/bc/adt/bo/behaviordefinitions/z_aff_example_sktd/source/main#type=BDEF/BAC;name=z_aff_example_sktd.lists ) | ||
|
||
## Lists | ||
|
||
### Unordered list | ||
|
||
* item 1 | ||
* item 1.1 | ||
* item 1.2 | ||
* item 1.2.1 | ||
* item 2 | ||
* item 3 | ||
|
||
**Markdown**: | ||
``` | ||
* item 1 | ||
* item 1.1 | ||
* item 1.2 | ||
* item 1.2.1 | ||
* item 2 | ||
* item 3 | ||
``` | ||
|
||
### Ordered List | ||
|
||
1. item a | ||
2. item b | ||
3. item c | ||
|
||
**Markdown**: | ||
``` | ||
1. item a | ||
2. item b | ||
3. item c | ||
``` | ||
|
||
|
||
[//]: # (id:/sap/bc/adt/bo/behaviordefinitions/z_aff_example_sktd/source/main#type=BDEF/BAC;name=z_aff_example_sktd.lists ) | ||
|
||
|
||
|
||
[//]: # (id:/sap/bc/adt/bo/behaviordefinitions/z_aff_example_sktd/source/main#type=BDEF/BAC;name=z_aff_example_sktd.quote ) | ||
|
||
### Quote | ||
|
||
> This is a simple blockquote text. | ||
> This line is part of the same quote. | ||
|
||
Quote break. | ||
|
||
> This is the continued blockquote text. | ||
|
||
**Markdown**: | ||
``` | ||
> A blockquote starts with the greater-than character (>). | ||
``` | ||
|
||
|
||
[//]: # (id:/sap/bc/adt/bo/behaviordefinitions/z_aff_example_sktd/source/main#type=BDEF/BAC;name=z_aff_example_sktd.quote ) | ||
|
||
|
||
|
||
[//]: # (id:/sap/bc/adt/bo/behaviordefinitions/z_aff_example_sktd/source/main#type=BDEF/BAC;name=z_aff_example_sktd.sourceCode ) | ||
|
||
### Source Code | ||
|
||
`Inline code` has *back-ticks* (`\``) around it. | ||
|
||
A code block is enclosed by *three back-ticks* (`\`\`\``) before and after the code snippet. | ||
|
||
``` | ||
if (a == b) { | ||
alert(s); | ||
} | ||
``` | ||
|
||
**Markdown**: | ||
``` | ||
\`\`\` | ||
if (a == b) { | ||
alert(s); | ||
} | ||
\`\`\` | ||
``` | ||
|
||
[//]: # (id:/sap/bc/adt/bo/behaviordefinitions/z_aff_example_sktd/source/main#type=BDEF/BAC;name=z_aff_example_sktd.sourceCode ) | ||
|
||
|
||
|
||
[//]: # (id:/sap/bc/adt/bo/behaviordefinitions/z_aff_example_sktd/source/main#type=BDEF/BAC;name=z_aff_example_sktd.table ) | ||
|
||
## Tables in Simple Markdown | ||
|
||
There must be at least 3 dashes separating each header cell. | ||
|
||
| Header1 | Header2 | Header3 | | ||
|---------|---------|---------| | ||
|Cell11 |*Cell12* |Cell13 | | ||
|Cell21 |Cell22 |Cell23 | | ||
|
||
**Markdown**: | ||
``` | ||
| Header1 | Header2 | Header3 | | ||
|---------|---------|---------| | ||
|Cell11 |*Cell12* |Cell13 | | ||
|Cell21 |Cell22 |Cell23 | | ||
``` | ||
|
||
The outer pipes (`|`) are optional. | ||
|
||
Markdown | Less | Pretty | ||
--- | --- | --- | ||
*Still* | `renders` | **nicely** | ||
1 | 2 | 3 | ||
|
||
**Markdown**: | ||
``` | ||
Markdown | Less | Pretty | ||
--- | --- | --- | ||
*Still* | `renders` | **nicely** | ||
1 | 2 | 3 | ||
``` | ||
|
||
Columns can be aligned using colons (`:`) with the dashes. | ||
|
||
| Tables | Are | Cool | | ||
|----------|:-------------:|------:| | ||
| col 1 is | left-aligned | $1600 | | ||
| col 2 is | centered | $12 | | ||
| col 3 is | right-aligned | $1 | | ||
|
||
**Markdown**: | ||
``` | ||
| Tables | Are | Cool | | ||
|----------|:-------------:|------:| | ||
| col 1 is | left-aligned | $1600 | | ||
| col 2 is | centered | $12 | | ||
| col 3 is | right-aligned | $1 | | ||
``` | ||
|
||
|
||
[//]: # (id:/sap/bc/adt/bo/behaviordefinitions/z_aff_example_sktd/source/main#type=BDEF/BAC;name=z_aff_example_sktd.table ) | ||
|
||
|
||
|
||
[//]: # (id:/sap/bc/adt/bo/behaviordefinitions/z_aff_example_sktd/source/main#type=BDEF/BAC;name=z_aff_example_sktd.textFormatting ) | ||
|
||
## Text formatting | ||
|
||
Simple Markdown supports *Italics* (enclosed by `\*`), **Bold** (enclosed by `\*\*`) and ~~Strikethrough~~ (enclosed by `\~\~`). | ||
|
||
**Markdown**: | ||
``` | ||
Text can be formatted in *Italics*, **Bold** or ~~Strikethrough~~. | ||
``` | ||
|
||
|
||
[//]: # (id:/sap/bc/adt/bo/behaviordefinitions/z_aff_example_sktd/source/main#type=BDEF/BAC;name=z_aff_example_sktd.textFormatting ) | ||
|
||
|
||
|
||
[//]: # (id:/sap/bc/adt/bo/behaviordefinitions/z_aff_example_sktd/source/main#type=BDEF/BAE;name=z_aff_example_sktd ) | ||
|
||
Here are some documentation texts for the different actions named after the different possibilities of KTD Markdown. | ||
|
||
[//]: # (id:/sap/bc/adt/bo/behaviordefinitions/z_aff_example_sktd/source/main#type=BDEF/BAE;name=z_aff_example_sktd ) | ||
|
||
|
||
|
||
[//]: # (id:[z_aff_example_sktd] ) | ||
|
||
This is an example KTD documentation of a *Behavior Definition* (**BDEF**) and will be used to create an example *ABAP File Format* (**AFF**). | ||
|
||
The serialization of a KTD object will be done by serialization of each documentation element, for each element the ID followed by the markdown content. The ID will be serialized as comment, e.g. this element ID: | ||
|
||
``` | ||
\[//]: # (id:/sap/bc/adt/bo/behaviordefinitions/z_aff_example_sktd/source/main#type=BDEF/BAC;name=z_aff_example_sktd.headings ) | ||
``` | ||
|
||
Lines in the content starting with `[//]:` will be escaped as `\[//]:`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"formatVersion": "1", | ||
"header": { | ||
"description": "Documentation for Z_AFF_EXAMPLE_SKTD", | ||
"originalLanguage": "EN" | ||
}, | ||
"documentedObject": { | ||
"type": "BDEF", | ||
"name": "Z_AFF_EXAMPLE_SKTD" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
{ | ||
"$comment": "This file is autogenerated, do not edit manually, see https://github.com/SAP/abap-file-formats for more information.", | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://github.com/SAP/abap-file-formats/blob/main/file-formats/sktd/sktd-v1.json", | ||
"title": "Knowledge Transfer Document Properties", | ||
"description": "KTD properties", | ||
"type": "object", | ||
"properties": { | ||
"formatVersion": { | ||
"title": "ABAP File Format Version", | ||
"description": "The ABAP file format version", | ||
"type": "string", | ||
"const": "1" | ||
}, | ||
"header": { | ||
"title": "Header", | ||
"description": "Header", | ||
"type": "object", | ||
"properties": { | ||
"description": { | ||
"title": "Description", | ||
"description": "Description of the ABAP object", | ||
"type": "string", | ||
"maxLength": 60 | ||
}, | ||
"originalLanguage": { | ||
"title": "Original Language", | ||
"description": "Original language of the ABAP object", | ||
"type": "string", | ||
"maxLength": 2 | ||
}, | ||
"abapLanguageVersion": { | ||
"title": "ABAP Language Version", | ||
"description": "ABAP language version", | ||
"type": "string", | ||
"enum": [ | ||
"standard", | ||
"keyUser", | ||
"cloudDevelopment" | ||
], | ||
"enumTitles": [ | ||
"Standard", | ||
"ABAP for Key Users", | ||
"ABAP Cloud Development" | ||
], | ||
"enumDescriptions": [ | ||
"Standard", | ||
"ABAP for key user extensibility", | ||
"ABAP cloud development" | ||
], | ||
"default": "standard" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"required": [ | ||
"description", | ||
"originalLanguage" | ||
] | ||
}, | ||
"documentedObject": { | ||
"title": "Documented Object", | ||
"description": "Type and name of the documented object", | ||
"type": "object", | ||
"properties": { | ||
"type": { | ||
"title": "Object Type", | ||
"description": "Type of the documented object", | ||
"type": "string", | ||
"maxLength": 4 | ||
}, | ||
"name": { | ||
"title": "Object Name", | ||
"description": "Name of the documented object", | ||
"type": "string", | ||
"maxLength": 40 | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"required": [ | ||
"type", | ||
"name" | ||
] | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"required": [ | ||
"formatVersion", | ||
"header" | ||
] | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This configuration must not run for all *.md files. For other *.md files trailing whitespaces shall still be checked
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean, the
.md
file in the AFF for SKTD is allowed to have trailing whitespaces?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try adding to the original '.editorconfig'
However, having trailing whitespaces might lead to undesired diffs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Yes, you are right. This is also what I mentioned earlier. See #270 (comment)
Currently, @uenal-akkaya tends to keep them anyway. But this is still in discussion ;) If we can avoid this exemption, it would be great. :)