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

[SKTD] New object type: Knowledge transfer documents #270

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 13 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
15 changes: 15 additions & 0 deletions file-formats/sktd/README.md
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)
Copy link
Contributor

Choose a reason for hiding this comment

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

Wrong link to the JSON example file.

Suggested change
`<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)
`<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)

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 file-formats/sktd/examples/z_aff_example_sktd.sktd.en.md
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 `\[//]:`.
11 changes: 11 additions & 0 deletions file-formats/sktd/examples/z_aff_example_sktd.sktd.json
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"
}
}
90 changes: 90 additions & 0 deletions file-formats/sktd/sktd-v1.json
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"
]
}
Loading