mirror of
https://github.com/coder/coder.git
synced 2026-06-07 15:08:20 +00:00
2bbeff53f9
* docs: Applications * WIP * WIP * WIP * Fix: consume * Fix: @Description * Fix * Fix: s/none//g * Fix: godoc nice * Fix: description * Fix: It * Fix: code sample trim empty line * More fixes * Fix: br
55 lines
1.4 KiB
Plaintext
55 lines
1.4 KiB
Plaintext
{{
|
|
function renderCodeSample(data) {
|
|
const originalCodeSample = data.utils.getCodeSamples(data);
|
|
return originalCodeSample.replace("\n```\n", "```\n")
|
|
}
|
|
}}
|
|
{{= data.tags.section }}
|
|
|
|
## {{= data.operationUniqueName}}
|
|
|
|
{{ data.methodUpper = data.method.verb.toUpperCase(); }}
|
|
{{ data.url = data.utils.slashes(data.baseUrl + data.method.path); }}
|
|
{{ data.parameters = data.operation.parameters; }}
|
|
{{ data.enums = []; }}
|
|
{{ data.utils.fakeProdCons(data); }}
|
|
{{ data.utils.fakeBodyParameter(data); }}
|
|
{{ data.utils.mergePathParameters(data); }}
|
|
{{ data.utils.getParameters(data); }}
|
|
|
|
{{? data.options.codeSamples || data.operation["x-code-samples"] }}
|
|
### Code samples
|
|
|
|
{{=renderCodeSample(data)}}
|
|
{{?}}
|
|
|
|
`{{= data.methodUpper}} {{=data.method.path}}`
|
|
|
|
{{? data.operation.summary && !data.options.tocSummary}}*{{= data.operation.summary }}*{{?}}
|
|
|
|
{{? data.operation.description}}{{= data.operation.description }}{{?}}
|
|
|
|
{{? data.operation.requestBody}}
|
|
> Body parameter
|
|
|
|
{{? data.bodyParameter.exampleValues.description }}
|
|
> {{= data.bodyParameter.exampleValues.description }}
|
|
{{?}}
|
|
|
|
{{= data.utils.getBodyParameterExamples(data) }}
|
|
{{?}}
|
|
|
|
{{? data.parameters && data.parameters.length }}
|
|
{{#def.parameters}}
|
|
{{?}}
|
|
|
|
{{#def.responses}}
|
|
|
|
{{ data.security = data.operation.security ? data.operation.security : data.api.security; }}
|
|
{{? data.security && data.security.length }}
|
|
{{#def.authentication}}
|
|
{{??}}
|
|
{{#def.authentication_none}}
|
|
{{?}}
|
|
{{= data.tags.endSection }}
|