rest-api-templates: Wikify error code response reasons
[asterisk/asterisk.git] / rest-api-templates / api.wiki.mustache
1 {{#api_declaration}}
2 h1. {{name_title}}
3
4 || Method || Path || Return Model || Summary ||
5 {{#apis}}
6 {{#operations}}
7 | {{http_method}} | [{{wiki_path}}|#{{nickname}}] | {{#response_class}}{{#is_primitive}}{{name}}{{/is_primitive}}{{^is_primitive}}[{{wiki_name}}|{{wiki_prefix}} REST Data Models#{{singular_name}}]{{/is_primitive}}{{/response_class}} | {{summary}} |
8 {{/operations}}
9 {{/apis}}
10 {{#apis}}
11 {{#operations}}
12
13 {anchor:{{nickname}}}
14 h2. {{nickname}}: {{http_method}} {{wiki_path}}
15
16 {{{wiki_summary}}}{{#wiki_notes}} {{{wiki_notes}}}{{/wiki_notes}}
17 {{#has_path_parameters}}
18
19 h3. Path parameters
20 {{#path_parameters}}
21 * {{name}}: _{{data_type}}_ - {{{wiki_description}}}
22 {{#default_value}}
23 ** Default: {{default_value}}
24 {{/default_value}}
25 {{#wiki_allowable_values}}
26 ** {{wiki_allowable_values}}
27 {{/wiki_allowable_values}}
28 {{/path_parameters}}
29 {{/has_path_parameters}}
30 {{#has_query_parameters}}
31
32 h3. Query parameters
33 {{#query_parameters}}
34 * {{name}}: _{{data_type}}_ -{{#required}} *(required)*{{/required}} {{{wiki_description}}}
35 {{#default_value}}
36 ** Default: {{default_value}}
37 {{/default_value}}
38 {{#wiki_allowable_values}}
39 ** {{wiki_allowable_values}}
40 {{/wiki_allowable_values}}
41 {{#allow_multiple}}
42 ** Allows comma separated values.
43 {{/allow_multiple}}
44 {{/query_parameters}}
45 {{/has_query_parameters}}
46 {{#has_body_parameter}}
47
48 h3. Body parameter
49 {{#body_parameter}}
50 * {{name}}: {{data_type}}{{#default_value}} = {{default_value}}{{/default_value}} -{{#required}} *(required)*{{/required}} {{{wiki_description}}}
51 {{#allow_multiple}}
52 ** Allows comma separated values.
53 {{/allow_multiple}}
54 {{/body_parameter}}
55 {{/has_body_parameter}}
56 {{#has_header_parameters}}
57
58 h3. Header parameters
59 {{#header_parameters}}
60 * {{name}}: {{data_type}}{{#default_value}} = {{default_value}}{{/default_value}} -{{#required}} *(required)*{{/required}} {{{wiki_description}}}
61 {{#allow_multiple}}
62 ** Allows comma separated values.
63 {{/allow_multiple}}
64 {{/header_parameters}}
65 {{/has_header_parameters}}
66 {{#has_error_responses}}
67
68 h3. Error Responses
69 {{#error_responses}}
70 * {{code}} - {{{wiki_reason}}}
71 {{/error_responses}}
72 {{/has_error_responses}}
73 {{/operations}}
74 {{/apis}}
75 {{/api_declaration}}