Skip to content

Commit cb80bfd

Browse files
committed
Updated docs
1 parent ff50368 commit cb80bfd

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

docs/modeling-guide.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,4 +278,67 @@ class FooContainer {
278278
baz: BazDefinition
279279
faz: FazDefinition
280280
}
281+
```
282+
283+
### Additional information
284+
285+
If needed, you can specify additional information on each type with the approariate JSDoc tag.
286+
Following you can find a list of the supported tags:
287+
288+
#### `@since`
289+
290+
Every API already has a `@since` tag, which describes when an API has been added.
291+
You can specify an additional `@since` tag for every parameter that has been added afterwards.
292+
If the tag is not defined, it's assumed that the parameter has been added with the API the first time
293+
294+
```ts
295+
/**
296+
* @since 7.10.0
297+
*/
298+
class FooRequest {
299+
bar: string
300+
/** @since 7.11.0 */
301+
baz: string
302+
faz: string
303+
}
304+
```
305+
306+
#### `@description`
307+
308+
A custom description of the property.
309+
310+
```ts
311+
class Foo {
312+
bar: string
313+
/** @description You can baz! */
314+
baz: string
315+
faz: string
316+
}
317+
```
318+
319+
#### `@default`
320+
321+
The default value if the property is not specified.
322+
Default values can only be specified on optional properties.
323+
324+
```ts
325+
class Foo {
326+
bar: string
327+
/** @default hello */
328+
baz?: string
329+
faz: string
330+
}
331+
```
332+
333+
#### `@doc_url`
334+
335+
The documentation url for the parameter.
336+
337+
```ts
338+
class Foo {
339+
bar: string
340+
/** @doc_url http://localhost:9200 */
341+
baz?: string
342+
faz: string
343+
}
281344
```

0 commit comments

Comments
 (0)