File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
scripts/apidocgen/markdown-template Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,6 @@ curl -X POST http://coder-server:8080/api/v2/files \
16
16
17
17
` POST /files `
18
18
19
- Swagger notice: Swagger 2.0 doesn't support file upload with a ` content-type ` different than ` application/x-www-form-urlencoded ` .
20
-
21
19
> Body parameter
22
20
23
21
``` yaml
Original file line number Diff line number Diff line change 1
1
{{
2
2
function renderCodeSample(data) {
3
3
const originalCodeSample = data.utils.getCodeSamples(data);
4
- return originalCodeSample.replace(" \n ```\n " , " ```\n " )
4
+ return originalCodeSample.replace(" \n ```\n " , " ```\n " );
5
+ }
6
+
7
+ function renderDescription(data) {
8
+ if (!data.operation.description) {
9
+ return " " ;
10
+ }
11
+ if (data.operation.description.startsWith(" Swagger notice:" )) {
12
+ return " " ;
13
+ }
14
+ return data.operation.description;
5
15
}
6
16
}}
7
17
{{= data.tags.section }}
27
37
28
38
{{? data.operation.summary && !data.options.tocSummary}}*{{= data.operation.summary }}*{{?}}
29
39
30
- {{? data.operation.description}}{{= data.operation.description }}{{? }}
40
+ {{= renderDescription( data) }}
31
41
32
42
{{? data.operation.requestBody}}
33
43
> Body parameter
You can’t perform that action at this time.
0 commit comments