File tree Expand file tree Collapse file tree 4 files changed +17
-44
lines changed
android/library/src/main/java/io/package/services
kotlin/src/main/kotlin/io/appwrite/services Expand file tree Collapse file tree 4 files changed +17
-44
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ class {{ service.name | caseUcfirst }}(client: Client) : Service(client) {
127127 responseType = {{ method | returnType(spec , sdk .namespace | caseDot ) | raw }}::class.java
128128 )
129129 {%~ else %}
130- val apiHeaders = mutableMapOf(
130+ val apiHeaders = mutableMapOf< String , String > (
131131 {%~ for key , header in method .headers %}
132132 "{{ key }}" to "{{ header }}",
133133 {%~ endfor %}
Original file line number Diff line number Diff line change @@ -149,9 +149,8 @@ namespace {{ spec.title | caseUcfirst }}
149149 new HttpMethod(method),
150150 _endpoint + path + queryString);
151151
152- if ("multipart/form-data".Equals(
153- headers["content-type"],
154- StringComparison.OrdinalIgnoreCase))
152+ if (headers.TryGetValue("content-type", out var contentType) &&
153+ "multipart/form-data".Equals(contentType, StringComparison.OrdinalIgnoreCase))
155154 {
156155 var form = new MultipartFormDataContent();
157156
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ class {{ service.name | caseUcfirst }}(client: Client) : Service(client) {
5555 "{{ parameter .name }}" to {{ parameter .name | caseCamel }},
5656 {%~ endfor %}
5757 )
58- val apiHeaders = mutableMapOf(
58+ val apiHeaders = mutableMapOf< String , String > (
5959 {%~ for key , header in method .headers %}
6060 "{{ key }}" to "{{ header }}",
6161 {%~ endfor %}
Original file line number Diff line number Diff line change 7777 "get" : {
7878 "summary" : " Get Bar" ,
7979 "operationId" : " barGet" ,
80- "consumes" : [
81- " application\/ json"
82- ],
80+ "consumes" : [],
8381 "produces" : [
8482 " application\/ json"
8583 ],
521519 "get" : {
522520 "summary" : " Get Foo" ,
523521 "operationId" : " fooGet" ,
524- "consumes" : [
525- " application\/ json"
526- ],
522+ "consumes" : [],
527523 "produces" : [
528524 " application\/ json"
529525 ],
965961 "get" : {
966962 "summary" : " 400 Error" ,
967963 "operationId" : " generalError400" ,
968- "consumes" : [
969- " application\/ json"
970- ],
964+ "consumes" : [],
971965 "produces" : [
972966 " application\/ json"
973967 ],
10201014 "get" : {
10211015 "summary" : " 500 Error" ,
10221016 "operationId" : " generalError500" ,
1023- "consumes" : [
1024- " application\/ json"
1025- ],
1017+ "consumes" : [],
10261018 "produces" : [
10271019 " application\/ json"
10281020 ],
10751067 "get" : {
10761068 "summary" : " 502 Error" ,
10771069 "operationId" : " generalError502" ,
1078- "consumes" : [
1079- " application\/ json"
1080- ],
1070+ "consumes" : [],
10811071 "produces" : [
10821072 " text\/ plain"
10831073 ],
11261116 "get" : {
11271117 "summary" : " Download File" ,
11281118 "operationId" : " generalDownload" ,
1129- "consumes" : [
1130- " application\/ json"
1131- ],
1119+ "consumes" : [],
11321120 "produces" : [
11331121 " *\/ *"
11341122 ],
11811169 "get" : {
11821170 "summary" : " Empty Response" ,
11831171 "operationId" : " generalEmpty" ,
1184- "consumes" : [
1185- " application\/ json"
1186- ],
1172+ "consumes" : [],
11871173 "produces" : [],
11881174 "tags" : [
11891175 " general"
13191305 "get" : {
13201306 "summary" : " Get Cookie" ,
13211307 "operationId" : " generalGetCookie" ,
1322- "consumes" : [
1323- " application\/ json"
1324- ],
1308+ "consumes" : [],
13251309 "produces" : [
13261310 " application\/ json"
13271311 ],
13741358 "get" : {
13751359 "summary" : " Get headers" ,
13761360 "operationId" : " generalHeaders" ,
1377- "consumes" : [
1378- " application\/ json"
1379- ],
1361+ "consumes" : [],
13801362 "produces" : [],
13811363 "tags" : [
13821364 " general"
15141496 "get" : {
15151497 "summary" : " Redirect" ,
15161498 "operationId" : " generalRedirect" ,
1517- "consumes" : [
1518- " application\/ json"
1519- ],
1499+ "consumes" : [],
15201500 "produces" : [
15211501 " text\/ html"
15221502 ],
15661546 "get" : {
15671547 "summary" : " Redirected" ,
15681548 "operationId" : " generalRedirected" ,
1569- "consumes" : [
1570- " application\/ json"
1571- ],
1549+ "consumes" : [],
15721550 "produces" : [
15731551 " application\/ json"
15741552 ],
16211599 "get" : {
16221600 "summary" : " Set Cookie" ,
16231601 "operationId" : " generalSetCookie" ,
1624- "consumes" : [
1625- " application\/ json"
1626- ],
1602+ "consumes" : [],
16271603 "produces" : [
16281604 " application\/ json"
16291605 ],
17671743 "get" : {
17681744 "summary" : " OAuth2" ,
17691745 "operationId" : " generalOAuth2" ,
1770- "consumes" : [
1771- " application\/ json"
1772- ],
1746+ "consumes" : [],
17731747 "produces" : [
17741748 " text\/ plain"
17751749 ],
You can’t perform that action at this time.
0 commit comments