forked from openapi-contrib/openapi3-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.md.hbs
45 lines (40 loc) · 849 Bytes
/
schema.md.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{{#if renderSlug}}<a id="{{schema.slug}}" />{{/if}}
{{#unless hideTitle}}
{{#if schema.title}}
#### {{schema.title}}
{{else}}
#### {{schemaName}}
{{/if}}
{{/unless}}
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Accepted values</th>
</tr>
</thead>
<tbody>
{{#each schema.properties}}
{{> schemaProp prop=. propName=@key required=(isRequired ../schema @key) path=''}}
{{else}}
{{> schemaProp prop=schema propName=schemaName required=(isRequired ../schema @key) path=''}}
{{/each}}
</tbody>
</table>
{{#unless hideExamples}}
{{#if schema.example}}
##### Example
```json
{{{stringify schema.example}}}
```
{{else}}
{{#if schema.generatedExample}}
##### Example _(generated)_
```json
{{{stringify schema.generatedExample}}}
```
{{/if}}
{{/if}}
{{/unless}}