aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/openapi/kotlin/README.mustache
diff options
context:
space:
mode:
authorAverage Dude <loveisgrief@tuta.io>2020-02-18 14:49:11 +0100
committerRigel Kent <sendmemail@rigelk.eu>2020-02-18 14:49:11 +0100
commit170cd639a7ed591184fde23968b2d24dac630e45 (patch)
treea5221fd1a246122ff95182c9dc1d1fb115dfd483 /support/openapi/kotlin/README.mustache
parent71e75ef27e8f993eaafc73896ac6f22fe91df64a (diff)
downloadPeerTube-170cd639a7ed591184fde23968b2d24dac630e45.tar.gz
PeerTube-170cd639a7ed591184fde23968b2d24dac630e45.tar.zst
PeerTube-170cd639a7ed591184fde23968b2d24dac630e45.zip
Create template dirs for openapi clients and provide README templates
The definitions are now also in the template dirs because they will be ignored by the generator. Generators only use overrides and don't do anything with new files.
Diffstat (limited to 'support/openapi/kotlin/README.mustache')
-rw-r--r--support/openapi/kotlin/README.mustache97
1 files changed, 97 insertions, 0 deletions
diff --git a/support/openapi/kotlin/README.mustache b/support/openapi/kotlin/README.mustache
new file mode 100644
index 000000000..ac7fbdea9
--- /dev/null
+++ b/support/openapi/kotlin/README.mustache
@@ -0,0 +1,97 @@
1# Kotlin API client for {{appName}}
2
3## Requires
4
5{{#jvm}}
6* Kotlin 1.3.41
7* Gradle 4.9
8{{/jvm}}
9{{#multiplatform}}
10* Kotlin 1.3.50
11{{/multiplatform}}
12
13## Build
14
15{{#jvm}}
16First, create the gradle wrapper script:
17
18```
19gradle wrapper
20```
21
22Then, run:
23
24{{/jvm}}
25```
26./gradlew check assemble
27```
28
29This runs all tests and packages the library.
30
31## Features/Implementation Notes
32
33{{#generateApiDocs}}
34<a name="documentation-for-api-endpoints"></a>
35## Documentation for API Endpoints
36
37All URIs are relative to *{{{basePath}}}*. Change it when instanciating `ApiClient(basePath)`.
38
39Class | Method | HTTP request | Description
40------------ | ------------- | ------------- | -------------
41{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}}
42{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
43{{/generateApiDocs}}
44
45{{#generateModelDocs}}
46<a name="documentation-for-models"></a>
47## Documentation for Models
48
49{{#modelPackage}}
50{{#models}}{{#model}} - [{{{modelPackage}}}.{{{classname}}}]({{modelDocPath}}{{{classname}}}.md)
51{{/model}}{{/models}}
52{{/modelPackage}}
53{{^modelPackage}}
54No model defined in this package
55{{/modelPackage}}
56{{/generateModelDocs}}
57
58<a name="documentation-for-authorization"></a>{{! TODO: optional documentation for authorization? }}
59## Documentation for Authorization
60
61{{^authMethods}}
62All endpoints do not require authorization.
63{{/authMethods}}
64{{#authMethods}}
65{{#last}}
66Authentication schemes defined for the API:
67{{/last}}
68{{/authMethods}}
69{{#authMethods}}
70<a name="{{name}}"></a>
71### {{name}}
72
73{{#isApiKey}}- **Type**: API key
74- **API key parameter name**: {{keyParamName}}
75- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}
76{{/isApiKey}}
77{{#isBasic}}- **Type**: HTTP basic authentication
78{{/isBasic}}
79{{#isOAuth}}- **Type**: OAuth
80- **Flow**: {{flow}}
81- **Authorization URL**: {{authorizationUrl}}
82- **Scopes**: {{^scopes}}N/A{{/scopes}}
83{{#scopes}} - {{scope}}: {{description}}
84{{/scopes}}
85{{/isOAuth}}
86
87{{/authMethods}}
88
89## License
90
91Copyright (C) 2015-2020 PeerTube Contributors
92
93This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
94
95This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
96
97You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses.