-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
main.dot
117 lines (88 loc) · 3.26 KB
/
main.dot
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
{{? data.api.info.description}}{{=data.api.info.description}}{{?}}
import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'
:::info
You are viewing REST API documentation. This documentation is auto-generated from a swagger specification which
itself is generated from annotations in the source code of the project. It is possible that this documentation includes
bugs and that code samples are incomplete or wrong.
If you find issues in the respective documentation, please do not edit the
Markdown files directly (as they are generated) but raise an issue on the project's GitHub presence instead. This documentation
will improve over time with your help! If you have ideas how to improve this part of the documentation, feel free to
share them in a [GitHub issue](https://github.com/ory/docs/issues/new) any time.
:::
{{? data.api.components && data.api.components.securitySchemes }}
{{#def.security}}
{{?}}
{{ for (var r in data.resources) { }}
{{ data.resource = data.resources[r]; }}
<a id="{{=data.title_prefix+'-'+data.utils.slugify(r)}}"></a>
## {{= r}}
{{? data.resource.description }}{{= data.resource.description}}{{?}}
{{? data.resource.externalDocs}}
<a href="{{=data.resource.externalDocs.url}}">{{=data.resource.externalDocs.description||'External documentation'}}</a>
{{?}}
{{ for (var m in data.resource.methods) { }}
{{ data.operationUniqueName = m; }}
{{ data.method = data.resource.methods[m]; }}
{{ data.operationUniqueSlug = data.method.slug; }}
{{ data.operation = data.method.operation; }}
{{= data.templates.operation(data) }}
{{ } /* of methods */ }}
{{ } /* of resources */ }}
{{? data.api.components && data.api.components.schemas }}
## Schemas
{{ for (var s in data.components.schemas) { }}
{{ var origSchema = data.components.schemas[s]; }}
{{ var schema = data.api.components.schemas[s]; }}
<a id="tocS{{=s.toLowerCase()}}">{{=s}}</a>
#### {{=s}}
<a id="schema{{=s.toLowerCase()}}"></a>
{{? data.options.yaml }}
```yaml
{{=data.utils.yaml.safeDump(data.utils.getSample(schema,data.options,{},data.api))}}
{{??}}
```json
{{=data.utils.safejson(data.utils.getSample(schema,data.options,{},data.api),null,2)}}
{{?}}
```
{{ var enums = []; }}
{{ var blocks = data.utils.schemaToArray(origSchema,-1,{trim:true,join:true},data); }}
{{ for (var block of blocks) {
for (var p of block.rows) {
if (p.schema && p.schema.enum) {
for (var e of p.schema.enum) {
enums.push({name:p.name,value:e});
}
}
}
}
}}
{{~ blocks :block}}
{{? block.title }}*{{= block.title}}*{{= '\n\n'}}{{?}}
{{? block.externalDocs}}
<a href="{{=block.externalDocs.url}}">{{=block.externalDocs.description||'External documentation'}}</a>
{{?}}
{{? block===blocks[0] }}
#### Properties
{{?}}
{{? block.rows.length}}|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|{{?}}
{{~ block.rows :p}}|{{=p.displayName}}|{{=p.safeType}}|{{=p.required}}|{{=p.restrictions||'none'}}|{{=p.description||'none'}}|
{{~}}
{{~}}
{{? (blocks[0].rows.length === 0) && (blocks.length === 1) }}
*None*
{{?}}
{{? enums.length > 0 }}
##### Enumerated Values
|Property|Value|
|---|---|
{{~ enums :e}}|{{=e.name}}|{{=data.utils.toPrimitive(e.value)}}|
{{~}}
{{?}}
{{ } /* of schemas */ }}
{{?}}
{{#def.footer}}
{{? data.options.discovery}}
{{#def.discovery}}
{{?}}