mirror of
https://github.com/immich-app/immich.git
synced 2024-12-24 10:37:28 +02:00
fix(server): pin openapi genreator patch and regenerate api (#3573)
* fix(server): pin openapi genreator patch and regenerate api * variable
This commit is contained in:
parent
3edb347666
commit
13df619ba9
BIN
mobile/openapi/doc/PeopleResponseDto.md
generated
BIN
mobile/openapi/doc/PeopleResponseDto.md
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/add_users_dto.dart
generated
BIN
mobile/openapi/lib/model/add_users_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/admin_signup_response_dto.dart
generated
BIN
mobile/openapi/lib/model/admin_signup_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/album_count_response_dto.dart
generated
BIN
mobile/openapi/lib/model/album_count_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/album_response_dto.dart
generated
BIN
mobile/openapi/lib/model/album_response_dto.dart
generated
Binary file not shown.
Binary file not shown.
BIN
mobile/openapi/lib/model/api_key_create_dto.dart
generated
BIN
mobile/openapi/lib/model/api_key_create_dto.dart
generated
Binary file not shown.
Binary file not shown.
BIN
mobile/openapi/lib/model/api_key_response_dto.dart
generated
BIN
mobile/openapi/lib/model/api_key_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/api_key_update_dto.dart
generated
BIN
mobile/openapi/lib/model/api_key_update_dto.dart
generated
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
mobile/openapi/lib/model/asset_ids_dto.dart
generated
BIN
mobile/openapi/lib/model/asset_ids_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/asset_ids_response_dto.dart
generated
BIN
mobile/openapi/lib/model/asset_ids_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/asset_response_dto.dart
generated
BIN
mobile/openapi/lib/model/asset_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/asset_stats_response_dto.dart
generated
BIN
mobile/openapi/lib/model/asset_stats_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/auth_device_response_dto.dart
generated
BIN
mobile/openapi/lib/model/auth_device_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/bulk_id_response_dto.dart
generated
BIN
mobile/openapi/lib/model/bulk_id_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/bulk_ids_dto.dart
generated
BIN
mobile/openapi/lib/model/bulk_ids_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/change_password_dto.dart
generated
BIN
mobile/openapi/lib/model/change_password_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/check_duplicate_asset_dto.dart
generated
BIN
mobile/openapi/lib/model/check_duplicate_asset_dto.dart
generated
Binary file not shown.
Binary file not shown.
BIN
mobile/openapi/lib/model/check_existing_assets_dto.dart
generated
BIN
mobile/openapi/lib/model/check_existing_assets_dto.dart
generated
Binary file not shown.
Binary file not shown.
BIN
mobile/openapi/lib/model/create_album_dto.dart
generated
BIN
mobile/openapi/lib/model/create_album_dto.dart
generated
Binary file not shown.
Binary file not shown.
BIN
mobile/openapi/lib/model/create_tag_dto.dart
generated
BIN
mobile/openapi/lib/model/create_tag_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/create_user_dto.dart
generated
BIN
mobile/openapi/lib/model/create_user_dto.dart
generated
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
mobile/openapi/lib/model/delete_asset_dto.dart
generated
BIN
mobile/openapi/lib/model/delete_asset_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/delete_asset_response_dto.dart
generated
BIN
mobile/openapi/lib/model/delete_asset_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/download_archive_info.dart
generated
BIN
mobile/openapi/lib/model/download_archive_info.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/download_response_dto.dart
generated
BIN
mobile/openapi/lib/model/download_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/exif_response_dto.dart
generated
BIN
mobile/openapi/lib/model/exif_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/import_asset_dto.dart
generated
BIN
mobile/openapi/lib/model/import_asset_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/job_command_dto.dart
generated
BIN
mobile/openapi/lib/model/job_command_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/job_counts_dto.dart
generated
BIN
mobile/openapi/lib/model/job_counts_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/job_settings_dto.dart
generated
BIN
mobile/openapi/lib/model/job_settings_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/job_status_dto.dart
generated
BIN
mobile/openapi/lib/model/job_status_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/login_credential_dto.dart
generated
BIN
mobile/openapi/lib/model/login_credential_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/login_response_dto.dart
generated
BIN
mobile/openapi/lib/model/login_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/logout_response_dto.dart
generated
BIN
mobile/openapi/lib/model/logout_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/map_marker_response_dto.dart
generated
BIN
mobile/openapi/lib/model/map_marker_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/memory_lane_response_dto.dart
generated
BIN
mobile/openapi/lib/model/memory_lane_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/merge_person_dto.dart
generated
BIN
mobile/openapi/lib/model/merge_person_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/o_auth_callback_dto.dart
generated
BIN
mobile/openapi/lib/model/o_auth_callback_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/o_auth_config_dto.dart
generated
BIN
mobile/openapi/lib/model/o_auth_config_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/o_auth_config_response_dto.dart
generated
BIN
mobile/openapi/lib/model/o_auth_config_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/people_response_dto.dart
generated
BIN
mobile/openapi/lib/model/people_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/people_update_dto.dart
generated
BIN
mobile/openapi/lib/model/people_update_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/people_update_item.dart
generated
BIN
mobile/openapi/lib/model/people_update_item.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/person_response_dto.dart
generated
BIN
mobile/openapi/lib/model/person_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/person_update_dto.dart
generated
BIN
mobile/openapi/lib/model/person_update_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/queue_status_dto.dart
generated
BIN
mobile/openapi/lib/model/queue_status_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/search_album_response_dto.dart
generated
BIN
mobile/openapi/lib/model/search_album_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/search_asset_dto.dart
generated
BIN
mobile/openapi/lib/model/search_asset_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/search_asset_response_dto.dart
generated
BIN
mobile/openapi/lib/model/search_asset_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/search_config_response_dto.dart
generated
BIN
mobile/openapi/lib/model/search_config_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/search_explore_item.dart
generated
BIN
mobile/openapi/lib/model/search_explore_item.dart
generated
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
mobile/openapi/lib/model/search_facet_response_dto.dart
generated
BIN
mobile/openapi/lib/model/search_facet_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/search_response_dto.dart
generated
BIN
mobile/openapi/lib/model/search_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/server_info_response_dto.dart
generated
BIN
mobile/openapi/lib/model/server_info_response_dto.dart
generated
Binary file not shown.
Binary file not shown.
BIN
mobile/openapi/lib/model/server_ping_response.dart
generated
BIN
mobile/openapi/lib/model/server_ping_response.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/server_stats_response_dto.dart
generated
BIN
mobile/openapi/lib/model/server_stats_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/server_version_reponse_dto.dart
generated
BIN
mobile/openapi/lib/model/server_version_reponse_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/shared_link_create_dto.dart
generated
BIN
mobile/openapi/lib/model/shared_link_create_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/shared_link_edit_dto.dart
generated
BIN
mobile/openapi/lib/model/shared_link_edit_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/shared_link_response_dto.dart
generated
BIN
mobile/openapi/lib/model/shared_link_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/sign_up_dto.dart
generated
BIN
mobile/openapi/lib/model/sign_up_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/smart_info_response_dto.dart
generated
BIN
mobile/openapi/lib/model/smart_info_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/system_config_dto.dart
generated
BIN
mobile/openapi/lib/model/system_config_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/system_config_f_fmpeg_dto.dart
generated
BIN
mobile/openapi/lib/model/system_config_f_fmpeg_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/system_config_job_dto.dart
generated
BIN
mobile/openapi/lib/model/system_config_job_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/system_config_o_auth_dto.dart
generated
BIN
mobile/openapi/lib/model/system_config_o_auth_dto.dart
generated
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
mobile/openapi/lib/model/tag_response_dto.dart
generated
BIN
mobile/openapi/lib/model/tag_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/time_bucket_response_dto.dart
generated
BIN
mobile/openapi/lib/model/time_bucket_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/update_album_dto.dart
generated
BIN
mobile/openapi/lib/model/update_album_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/update_asset_dto.dart
generated
BIN
mobile/openapi/lib/model/update_asset_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/update_tag_dto.dart
generated
BIN
mobile/openapi/lib/model/update_tag_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/update_user_dto.dart
generated
BIN
mobile/openapi/lib/model/update_user_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/usage_by_user_dto.dart
generated
BIN
mobile/openapi/lib/model/usage_by_user_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/user_count_response_dto.dart
generated
BIN
mobile/openapi/lib/model/user_count_response_dto.dart
generated
Binary file not shown.
BIN
mobile/openapi/lib/model/user_response_dto.dart
generated
BIN
mobile/openapi/lib/model/user_response_dto.dart
generated
Binary file not shown.
Binary file not shown.
BIN
mobile/openapi/test/people_response_dto_test.dart
generated
BIN
mobile/openapi/test/people_response_dto_test.dart
generated
Binary file not shown.
@ -1,9 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
OPENAPI_GENEARTOR_VERSION=v6.6.0
|
||||
|
||||
function mobile {
|
||||
rm -rf ../mobile/openapi
|
||||
cd ./openapi-generator/templates/mobile/serialization/native
|
||||
wget -O native_class.mustache https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache
|
||||
wget -O native_class.mustache https://raw.githubusercontent.com/OpenAPITools/openapi-generator/$OPENAPI_GENEARTOR_VERSION/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache
|
||||
patch -u native_class.mustache <native_class.mustache.patch
|
||||
cd ../../../../..
|
||||
npx --yes @openapitools/openapi-generator-cli generate -g dart -i ./immich-openapi-specs.json -o ../mobile/openapi -t ./openapi-generator/templates/mobile
|
||||
@ -17,7 +18,7 @@ function mobile {
|
||||
function web {
|
||||
rm -rf ../web/src/api/open-api
|
||||
cd ./openapi-generator/templates/web
|
||||
wget -O apiInner.mustache https://raw.githubusercontent.com/OpenAPITools/openapi-generator/v6.0.1/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache
|
||||
wget -O apiInner.mustache https://raw.githubusercontent.com/OpenAPITools/openapi-generator/$OPENAPI_GENEARTOR_VERSION/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache
|
||||
patch -u apiInner.mustache < apiInner.mustache.patch
|
||||
cd ../../..
|
||||
npx --yes @openapitools/openapi-generator-cli generate -g typescript-axios -i ./immich-openapi-specs.json -o ../web/src/api/open-api -t ./openapi-generator/templates/web --additional-properties=useSingleRequestParameter=true
|
||||
@ -26,7 +27,7 @@ function web {
|
||||
function cli {
|
||||
rm -rf ../cli/src/api/open-api
|
||||
cd ./openapi-generator/templates/cli
|
||||
wget -O apiInner.mustache https://raw.githubusercontent.com/OpenAPITools/openapi-generator/v6.6.0/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache
|
||||
wget -O apiInner.mustache https://raw.githubusercontent.com/OpenAPITools/openapi-generator/$OPENAPI_GENEARTOR_VERSION/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache
|
||||
patch -u apiInner.mustache < apiInner.mustache.patch
|
||||
cd ../../..
|
||||
npx --yes @openapitools/openapi-generator-cli generate -g typescript-axios -i ./immich-openapi-specs.json -o ../cli/src/api/open-api -t ./openapi-generator/templates/cli --additional-properties=useSingleRequestParameter=true
|
||||
|
@ -5990,10 +5990,10 @@
|
||||
"type": "array"
|
||||
},
|
||||
"total": {
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
},
|
||||
"visible": {
|
||||
"type": "number"
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
@ -38,7 +38,7 @@ class {{{classname}}} {
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is {{{classname}}} &&
|
||||
{{#vars}}
|
||||
{{#isMap}}_deepEquality.equals(other.{{{name}}}, {{{name}}}){{/isMap}}{{^isMap}}{{#isArray}}_deepEquality.equals(other.{{{name}}}, {{{name}}}){{/isArray}}{{^isArray}}other.{{{name}}} == {{{name}}}{{/isArray}}{{/isMap}}{{^-last}} &&{{/-last}}{{#-last}};{{/-last}}
|
||||
other.{{{name}}} == {{{name}}}{{^-last}} &&{{/-last}}{{#-last}};{{/-last}}
|
||||
{{/vars}}
|
||||
|
||||
@override
|
||||
@ -66,7 +66,7 @@ class {{{classname}}} {
|
||||
{{/isNullable}}
|
||||
{{#isDateTime}}
|
||||
{{#pattern}}
|
||||
json[r'{{{baseName}}}'] = _isEpochMarker(r'{{{pattern}}}')
|
||||
json[r'{{{baseName}}}'] = _dateEpochMarker == '{{{pattern}}}'
|
||||
? this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.millisecondsSinceEpoch
|
||||
: this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc().toIso8601String();
|
||||
{{/pattern}}
|
||||
@ -76,7 +76,7 @@ class {{{classname}}} {
|
||||
{{/isDateTime}}
|
||||
{{#isDate}}
|
||||
{{#pattern}}
|
||||
json[r'{{{baseName}}}'] = _isEpochMarker(r'{{{pattern}}}')
|
||||
json[r'{{{baseName}}}'] = _dateEpochMarker == '{{{pattern}}}'
|
||||
? this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.millisecondsSinceEpoch
|
||||
: _dateFormatter.format(this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc());
|
||||
{{/pattern}}
|
||||
@ -86,7 +86,7 @@ class {{{classname}}} {
|
||||
{{/isDate}}
|
||||
{{^isDateTime}}
|
||||
{{^isDate}}
|
||||
json[r'{{{baseName}}}'] = this.{{{name}}}{{#isArray}}{{#uniqueItems}}{{#isNullable}}!{{/isNullable}}.toList(growable: false){{/uniqueItems}}{{/isArray}};
|
||||
json[r'{{{baseName}}}'] = this.{{{name}}};
|
||||
{{/isDate}}
|
||||
{{/isDateTime}}
|
||||
{{#isNullable}}
|
||||
@ -117,10 +117,10 @@ class {{{classname}}} {
|
||||
return {{{classname}}}(
|
||||
{{#vars}}
|
||||
{{#isDateTime}}
|
||||
{{{name}}}: mapDateTime(json, r'{{{baseName}}}', r'{{{pattern}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
|
||||
{{{name}}}: mapDateTime(json, r'{{{baseName}}}', '{{{pattern}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
|
||||
{{/isDateTime}}
|
||||
{{#isDate}}
|
||||
{{{name}}}: mapDateTime(json, r'{{{baseName}}}', r'{{{pattern}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
|
||||
{{{name}}}: mapDateTime(json, r'{{{baseName}}}', '{{{pattern}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
|
||||
{{/isDate}}
|
||||
{{^isDateTime}}
|
||||
{{^isDate}}
|
||||
@ -189,8 +189,8 @@ class {{{classname}}} {
|
||||
{{{name}}}: {{{items.datatypeWithEnum}}}.listFromJson(json[r'{{{baseName}}}']){{#uniqueItems}}.toSet(){{/uniqueItems}},
|
||||
{{/isEnum}}
|
||||
{{^isEnum}}
|
||||
{{{name}}}: json[r'{{{baseName}}}'] is Iterable
|
||||
? (json[r'{{{baseName}}}'] as Iterable).cast<{{{items.datatype}}}>().{{#uniqueItems}}toSet(){{/uniqueItems}}{{^uniqueItems}}toList(growable: false){{/uniqueItems}}
|
||||
{{{name}}}: json[r'{{{baseName}}}'] is {{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}
|
||||
? (json[r'{{{baseName}}}'] as {{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}).cast<{{{items.datatype}}}>()
|
||||
: {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}},
|
||||
{{/isEnum}}
|
||||
{{/isArray}}
|
||||
@ -200,9 +200,9 @@ class {{{classname}}} {
|
||||
{{/isMap}}
|
||||
{{^isMap}}
|
||||
{{#isNumber}}
|
||||
{{{name}}}: {{#isNullable}}json[r'{{{baseName}}}'] == null
|
||||
{{{name}}}: json[r'{{{baseName}}}'] == null
|
||||
? {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}
|
||||
: {{/isNullable}}{{{datatypeWithEnum}}}.parse('${json[r'{{{baseName}}}']}'),
|
||||
: {{{datatypeWithEnum}}}.parse(json[r'{{{baseName}}}'].toString()),
|
||||
{{/isNumber}}
|
||||
{{^isNumber}}
|
||||
{{^isEnum}}
|
||||
|
@ -3,8 +3,9 @@
|
||||
/* eslint-disable */
|
||||
{{>licenseInfo}}
|
||||
|
||||
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
import { Configuration } from '{{apiRelativeToRoot}}configuration';
|
||||
import type { Configuration } from '{{apiRelativeToRoot}}configuration';
|
||||
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
import globalAxios from 'axios';
|
||||
{{#withNodeImports}}
|
||||
// URLSearchParams not necessarily used
|
||||
// @ts-ignore
|
||||
@ -146,12 +147,16 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur
|
||||
}
|
||||
{{/isArray}}
|
||||
{{^isArray}}
|
||||
if ({{paramName}} !== undefined && {{paramName}} !== null) {
|
||||
{{! `val == null` covers for both `null` and `undefined`}}
|
||||
if ({{paramName}} != null) {
|
||||
{{#isString}}
|
||||
localVarHeaderParameter['{{baseName}}'] = String({{paramName}});
|
||||
{{/isString}}
|
||||
{{^isString}}
|
||||
localVarHeaderParameter['{{baseName}}'] = String(JSON.stringify({{paramName}}));
|
||||
{{! isString is falsy also for $ref that defines a string or enum type}}
|
||||
localVarHeaderParameter['{{baseName}}'] = typeof {{paramName}} === 'string'
|
||||
? {{paramName}}
|
||||
: JSON.stringify({{paramName}});
|
||||
{{/isString}}
|
||||
}
|
||||
{{/isArray}}
|
||||
@ -253,16 +258,30 @@ export const {{classname}}Factory = function (configuration?: Configuration, bas
|
||||
{{#summary}}
|
||||
* @summary {{&summary}}
|
||||
{{/summary}}
|
||||
{{#useSingleRequestParameter}}
|
||||
{{#allParams.0}}
|
||||
* @param {{=<% %>=}}{<%& classname %><%& operationIdCamelCase %>Request}<%={{ }}=%> requestParameters Request parameters.
|
||||
{{/allParams.0}}
|
||||
{{/useSingleRequestParameter}}
|
||||
{{^useSingleRequestParameter}}
|
||||
{{#allParams}}
|
||||
* @param {{=<% %>=}}{<%&dataType%>}<%={{ }}=%> {{^required}}[{{/required}}{{paramName}}{{^required}}]{{/required}} {{description}}
|
||||
{{/allParams}}
|
||||
{{/useSingleRequestParameter}}
|
||||
* @param {*} [options] Override http request option.{{#isDeprecated}}
|
||||
* @deprecated{{/isDeprecated}}
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
{{#useSingleRequestParameter}}
|
||||
{{nickname}}({{#allParams.0}}requestParameters: {{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, {{/allParams.0}}options?: AxiosRequestConfig): AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}> {
|
||||
return localVarFp.{{nickname}}({{#allParams.0}}{{#allParams}}requestParameters.{{paramName}}, {{/allParams}}{{/allParams.0}}options).then((request) => request(axios, basePath));
|
||||
},
|
||||
{{/useSingleRequestParameter}}
|
||||
{{^useSingleRequestParameter}}
|
||||
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}> {
|
||||
return localVarFp.{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options).then((request) => request(axios, basePath));
|
||||
},
|
||||
{{/useSingleRequestParameter}}
|
||||
{{/operation}}
|
||||
};
|
||||
};
|
||||
|
390
server/openapi-generator/templates/web/apiInner.mustache.orig
Normal file
390
server/openapi-generator/templates/web/apiInner.mustache.orig
Normal file
@ -0,0 +1,390 @@
|
||||
{{#withSeparateModelsAndApi}}
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
{{>licenseInfo}}
|
||||
|
||||
import type { Configuration } from '{{apiRelativeToRoot}}configuration';
|
||||
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
import globalAxios from 'axios';
|
||||
{{#withNodeImports}}
|
||||
// URLSearchParams not necessarily used
|
||||
// @ts-ignore
|
||||
import { URL, URLSearchParams } from 'url';
|
||||
{{#multipartFormData}}
|
||||
import FormData from 'form-data'
|
||||
{{/multipartFormData}}
|
||||
{{/withNodeImports}}
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '{{apiRelativeToRoot}}common';
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '{{apiRelativeToRoot}}base';
|
||||
{{#imports}}
|
||||
// @ts-ignore
|
||||
import { {{classname}} } from '{{apiRelativeToRoot}}{{tsModelPackage}}';
|
||||
{{/imports}}
|
||||
{{/withSeparateModelsAndApi}}
|
||||
{{^withSeparateModelsAndApi}}
|
||||
{{/withSeparateModelsAndApi}}
|
||||
{{#operations}}
|
||||
/**
|
||||
* {{classname}} - axios parameter creator{{#description}}
|
||||
* {{&description}}{{/description}}
|
||||
* @export
|
||||
*/
|
||||
export const {{classname}}AxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
{{#operation}}
|
||||
/**
|
||||
* {{¬es}}
|
||||
{{#summary}}
|
||||
* @summary {{&summary}}
|
||||
{{/summary}}
|
||||
{{#allParams}}
|
||||
* @param {{=<% %>=}}{<%&dataType%>}<%={{ }}=%> {{^required}}[{{/required}}{{paramName}}{{^required}}]{{/required}} {{description}}
|
||||
{{/allParams}}
|
||||
* @param {*} [options] Override http request option.{{#isDeprecated}}
|
||||
* @deprecated{{/isDeprecated}}
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
{{nickname}}: async ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
{{#allParams}}
|
||||
{{#required}}
|
||||
// verify required parameter '{{paramName}}' is not null or undefined
|
||||
assertParamExists('{{nickname}}', '{{paramName}}', {{paramName}})
|
||||
{{/required}}
|
||||
{{/allParams}}
|
||||
const localVarPath = `{{{path}}}`{{#pathParams}}
|
||||
.replace(`{${"{{baseName}}"}}`, encodeURIComponent(String({{paramName}}))){{/pathParams}};
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: '{{httpMethod}}', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;{{#vendorExtensions}}{{#hasFormParams}}
|
||||
const localVarFormParams = new {{^multipartFormData}}URLSearchParams(){{/multipartFormData}}{{#multipartFormData}}((configuration && configuration.formDataCtor) || FormData)(){{/multipartFormData}};{{/hasFormParams}}{{/vendorExtensions}}
|
||||
|
||||
{{#authMethods}}
|
||||
// authentication {{name}} required
|
||||
{{#isApiKey}}
|
||||
{{#isKeyInHeader}}
|
||||
await setApiKeyToObject(localVarHeaderParameter, "{{keyParamName}}", configuration)
|
||||
{{/isKeyInHeader}}
|
||||
{{#isKeyInQuery}}
|
||||
await setApiKeyToObject(localVarQueryParameter, "{{keyParamName}}", configuration)
|
||||
{{/isKeyInQuery}}
|
||||
{{/isApiKey}}
|
||||
{{#isBasicBasic}}
|
||||
// http basic authentication required
|
||||
setBasicAuthToObject(localVarRequestOptions, configuration)
|
||||
{{/isBasicBasic}}
|
||||
{{#isBasicBearer}}
|
||||
// http bearer authentication required
|
||||
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
||||
{{/isBasicBearer}}
|
||||
{{#isOAuth}}
|
||||
// oauth required
|
||||
await setOAuthToObject(localVarHeaderParameter, "{{name}}", [{{#scopes}}"{{{scope}}}"{{^-last}}, {{/-last}}{{/scopes}}], configuration)
|
||||
{{/isOAuth}}
|
||||
|
||||
{{/authMethods}}
|
||||
{{#queryParams}}
|
||||
{{#isArray}}
|
||||
if ({{paramName}}) {
|
||||
{{#isCollectionFormatMulti}}
|
||||
{{#uniqueItems}}
|
||||
localVarQueryParameter['{{baseName}}'] = Array.from({{paramName}});
|
||||
{{/uniqueItems}}
|
||||
{{^uniqueItems}}
|
||||
localVarQueryParameter['{{baseName}}'] = {{paramName}};
|
||||
{{/uniqueItems}}
|
||||
{{/isCollectionFormatMulti}}
|
||||
{{^isCollectionFormatMulti}}
|
||||
{{#uniqueItems}}
|
||||
localVarQueryParameter['{{baseName}}'] = Array.from({{paramName}}).join(COLLECTION_FORMATS.{{collectionFormat}});
|
||||
{{/uniqueItems}}
|
||||
{{^uniqueItems}}
|
||||
localVarQueryParameter['{{baseName}}'] = {{paramName}}.join(COLLECTION_FORMATS.{{collectionFormat}});
|
||||
{{/uniqueItems}}
|
||||
{{/isCollectionFormatMulti}}
|
||||
}
|
||||
{{/isArray}}
|
||||
{{^isArray}}
|
||||
if ({{paramName}} !== undefined) {
|
||||
{{#isDateTime}}
|
||||
localVarQueryParameter['{{baseName}}'] = ({{paramName}} as any instanceof Date) ?
|
||||
({{paramName}} as any).toISOString() :
|
||||
{{paramName}};
|
||||
{{/isDateTime}}
|
||||
{{^isDateTime}}
|
||||
{{#isDate}}
|
||||
localVarQueryParameter['{{baseName}}'] = ({{paramName}} as any instanceof Date) ?
|
||||
({{paramName}} as any).toISOString().substr(0,10) :
|
||||
{{paramName}};
|
||||
{{/isDate}}
|
||||
{{^isDate}}
|
||||
localVarQueryParameter['{{baseName}}'] = {{paramName}};
|
||||
{{/isDate}}
|
||||
{{/isDateTime}}
|
||||
}
|
||||
{{/isArray}}
|
||||
|
||||
{{/queryParams}}
|
||||
{{#headerParams}}
|
||||
{{#isArray}}
|
||||
if ({{paramName}}) {
|
||||
{{#uniqueItems}}
|
||||
let mapped = Array.from({{paramName}}).map(value => (<any>"{{{dataType}}}" !== "Set<string>") ? JSON.stringify(value) : (value || ""));
|
||||
{{/uniqueItems}}
|
||||
{{^uniqueItems}}
|
||||
let mapped = {{paramName}}.map(value => (<any>"{{{dataType}}}" !== "Array<string>") ? JSON.stringify(value) : (value || ""));
|
||||
{{/uniqueItems}}
|
||||
localVarHeaderParameter['{{baseName}}'] = mapped.join(COLLECTION_FORMATS["{{collectionFormat}}"]);
|
||||
}
|
||||
{{/isArray}}
|
||||
{{^isArray}}
|
||||
{{! `val == null` covers for both `null` and `undefined`}}
|
||||
if ({{paramName}} != null) {
|
||||
{{#isString}}
|
||||
localVarHeaderParameter['{{baseName}}'] = String({{paramName}});
|
||||
{{/isString}}
|
||||
{{^isString}}
|
||||
{{! isString is falsy also for $ref that defines a string or enum type}}
|
||||
localVarHeaderParameter['{{baseName}}'] = typeof {{paramName}} === 'string'
|
||||
? {{paramName}}
|
||||
: JSON.stringify({{paramName}});
|
||||
{{/isString}}
|
||||
}
|
||||
{{/isArray}}
|
||||
|
||||
{{/headerParams}}
|
||||
{{#vendorExtensions}}
|
||||
{{#formParams}}
|
||||
{{#isArray}}
|
||||
if ({{paramName}}) {
|
||||
{{#isCollectionFormatMulti}}
|
||||
{{paramName}}.forEach((element) => {
|
||||
localVarFormParams.{{#multipartFormData}}append{{/multipartFormData}}{{^multipartFormData}}set{{/multipartFormData}}('{{baseName}}', element as any);
|
||||
})
|
||||
{{/isCollectionFormatMulti}}
|
||||
{{^isCollectionFormatMulti}}
|
||||
localVarFormParams.{{#multipartFormData}}append{{/multipartFormData}}{{^multipartFormData}}set{{/multipartFormData}}('{{baseName}}', {{paramName}}.join(COLLECTION_FORMATS.{{collectionFormat}}));
|
||||
{{/isCollectionFormatMulti}}
|
||||
}{{/isArray}}
|
||||
{{^isArray}}
|
||||
if ({{paramName}} !== undefined) { {{^multipartFormData}}
|
||||
localVarFormParams.set('{{baseName}}', {{paramName}} as any);{{/multipartFormData}}{{#multipartFormData}}{{#isPrimitiveType}}
|
||||
localVarFormParams.append('{{baseName}}', {{paramName}} as any);{{/isPrimitiveType}}{{^isPrimitiveType}}
|
||||
localVarFormParams.append('{{baseName}}', new Blob([JSON.stringify({{paramName}})], { type: "application/json", }));{{/isPrimitiveType}}{{/multipartFormData}}
|
||||
}{{/isArray}}
|
||||
{{/formParams}}{{/vendorExtensions}}
|
||||
{{#vendorExtensions}}{{#hasFormParams}}{{^multipartFormData}}
|
||||
localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';{{/multipartFormData}}{{#multipartFormData}}
|
||||
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';{{/multipartFormData}}
|
||||
{{/hasFormParams}}{{/vendorExtensions}}
|
||||
{{#bodyParam}}
|
||||
{{^consumes}}
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
{{/consumes}}
|
||||
{{#consumes.0}}
|
||||
localVarHeaderParameter['Content-Type'] = '{{{mediaType}}}';
|
||||
{{/consumes.0}}
|
||||
|
||||
{{/bodyParam}}
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions,{{#hasFormParams}}{{#multipartFormData}} ...(localVarFormParams as any).getHeaders?.(),{{/multipartFormData}}{{/hasFormParams}} ...options.headers};
|
||||
{{#hasFormParams}}
|
||||
localVarRequestOptions.data = localVarFormParams{{#vendorExtensions}}{{^multipartFormData}}.toString(){{/multipartFormData}}{{/vendorExtensions}};
|
||||
{{/hasFormParams}}
|
||||
{{#bodyParam}}
|
||||
localVarRequestOptions.data = serializeDataIfNeeded({{paramName}}, localVarRequestOptions, configuration)
|
||||
{{/bodyParam}}
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
{{/operation}}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* {{classname}} - functional programming interface{{#description}}
|
||||
* {{{.}}}{{/description}}
|
||||
* @export
|
||||
*/
|
||||
export const {{classname}}Fp = function(configuration?: Configuration) {
|
||||
const localVarAxiosParamCreator = {{classname}}AxiosParamCreator(configuration)
|
||||
return {
|
||||
{{#operation}}
|
||||
/**
|
||||
* {{¬es}}
|
||||
{{#summary}}
|
||||
* @summary {{&summary}}
|
||||
{{/summary}}
|
||||
{{#allParams}}
|
||||
* @param {{=<% %>=}}{<%&dataType%>}<%={{ }}=%> {{^required}}[{{/required}}{{paramName}}{{^required}}]{{/required}} {{description}}
|
||||
{{/allParams}}
|
||||
* @param {*} [options] Override http request option.{{#isDeprecated}}
|
||||
* @deprecated{{/isDeprecated}}
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
{{/operation}}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* {{classname}} - factory interface{{#description}}
|
||||
* {{&description}}{{/description}}
|
||||
* @export
|
||||
*/
|
||||
export const {{classname}}Factory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
const localVarFp = {{classname}}Fp(configuration)
|
||||
return {
|
||||
{{#operation}}
|
||||
/**
|
||||
* {{¬es}}
|
||||
{{#summary}}
|
||||
* @summary {{&summary}}
|
||||
{{/summary}}
|
||||
{{#useSingleRequestParameter}}
|
||||
{{#allParams.0}}
|
||||
* @param {{=<% %>=}}{<%& classname %><%& operationIdCamelCase %>Request}<%={{ }}=%> requestParameters Request parameters.
|
||||
{{/allParams.0}}
|
||||
{{/useSingleRequestParameter}}
|
||||
{{^useSingleRequestParameter}}
|
||||
{{#allParams}}
|
||||
* @param {{=<% %>=}}{<%&dataType%>}<%={{ }}=%> {{^required}}[{{/required}}{{paramName}}{{^required}}]{{/required}} {{description}}
|
||||
{{/allParams}}
|
||||
{{/useSingleRequestParameter}}
|
||||
* @param {*} [options] Override http request option.{{#isDeprecated}}
|
||||
* @deprecated{{/isDeprecated}}
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
{{#useSingleRequestParameter}}
|
||||
{{nickname}}({{#allParams.0}}requestParameters: {{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, {{/allParams.0}}options?: AxiosRequestConfig): AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}> {
|
||||
return localVarFp.{{nickname}}({{#allParams.0}}{{#allParams}}requestParameters.{{paramName}}, {{/allParams}}{{/allParams.0}}options).then((request) => request(axios, basePath));
|
||||
},
|
||||
{{/useSingleRequestParameter}}
|
||||
{{^useSingleRequestParameter}}
|
||||
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}> {
|
||||
return localVarFp.{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options).then((request) => request(axios, basePath));
|
||||
},
|
||||
{{/useSingleRequestParameter}}
|
||||
{{/operation}}
|
||||
};
|
||||
};
|
||||
|
||||
{{#withInterfaces}}
|
||||
/**
|
||||
* {{classname}} - interface{{#description}}
|
||||
* {{&description}}{{/description}}
|
||||
* @export
|
||||
* @interface {{classname}}
|
||||
*/
|
||||
export interface {{classname}}Interface {
|
||||
{{#operation}}
|
||||
/**
|
||||
* {{¬es}}
|
||||
{{#summary}}
|
||||
* @summary {{&summary}}
|
||||
{{/summary}}
|
||||
{{#allParams}}
|
||||
* @param {{=<% %>=}}{<%&dataType%>}<%={{ }}=%> {{^required}}[{{/required}}{{paramName}}{{^required}}]{{/required}} {{description}}
|
||||
{{/allParams}}
|
||||
* @param {*} [options] Override http request option.{{#isDeprecated}}
|
||||
* @deprecated{{/isDeprecated}}
|
||||
* @throws {RequiredError}
|
||||
* @memberof {{classname}}Interface
|
||||
*/
|
||||
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: AxiosRequestConfig): AxiosPromise<{{{returnType}}}{{^returnType}}void{{/returnType}}>;
|
||||
|
||||
{{/operation}}
|
||||
}
|
||||
|
||||
{{/withInterfaces}}
|
||||
{{#useSingleRequestParameter}}
|
||||
{{#operation}}
|
||||
{{#allParams.0}}
|
||||
/**
|
||||
* Request parameters for {{nickname}} operation in {{classname}}.
|
||||
* @export
|
||||
* @interface {{classname}}{{operationIdCamelCase}}Request
|
||||
*/
|
||||
export interface {{classname}}{{operationIdCamelCase}}Request {
|
||||
{{#allParams}}
|
||||
/**
|
||||
* {{description}}
|
||||
* @type {{=<% %>=}}{<%&dataType%>}<%={{ }}=%>
|
||||
* @memberof {{classname}}{{operationIdCamelCase}}
|
||||
*/
|
||||
readonly {{paramName}}{{^required}}?{{/required}}: {{{dataType}}}
|
||||
{{^-last}}
|
||||
|
||||
{{/-last}}
|
||||
{{/allParams}}
|
||||
}
|
||||
|
||||
{{/allParams.0}}
|
||||
{{/operation}}
|
||||
{{/useSingleRequestParameter}}
|
||||
/**
|
||||
* {{classname}} - object-oriented interface{{#description}}
|
||||
* {{{.}}}{{/description}}
|
||||
* @export
|
||||
* @class {{classname}}
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
{{#withInterfaces}}
|
||||
export class {{classname}} extends BaseAPI implements {{classname}}Interface {
|
||||
{{/withInterfaces}}
|
||||
{{^withInterfaces}}
|
||||
export class {{classname}} extends BaseAPI {
|
||||
{{/withInterfaces}}
|
||||
{{#operation}}
|
||||
/**
|
||||
* {{¬es}}
|
||||
{{#summary}}
|
||||
* @summary {{&summary}}
|
||||
{{/summary}}
|
||||
{{#useSingleRequestParameter}}
|
||||
{{#allParams.0}}
|
||||
* @param {{=<% %>=}}{<%& classname %><%& operationIdCamelCase %>Request}<%={{ }}=%> requestParameters Request parameters.
|
||||
{{/allParams.0}}
|
||||
{{/useSingleRequestParameter}}
|
||||
{{^useSingleRequestParameter}}
|
||||
{{#allParams}}
|
||||
* @param {{=<% %>=}}{<%&dataType%>}<%={{ }}=%> {{^required}}[{{/required}}{{paramName}}{{^required}}]{{/required}} {{description}}
|
||||
{{/allParams}}
|
||||
{{/useSingleRequestParameter}}
|
||||
* @param {*} [options] Override http request option.{{#isDeprecated}}
|
||||
* @deprecated{{/isDeprecated}}
|
||||
* @throws {RequiredError}
|
||||
* @memberof {{classname}}
|
||||
*/
|
||||
{{#useSingleRequestParameter}}
|
||||
public {{nickname}}({{#allParams.0}}requestParameters: {{classname}}{{operationIdCamelCase}}Request{{^hasRequiredParams}} = {}{{/hasRequiredParams}}, {{/allParams.0}}options?: AxiosRequestConfig) {
|
||||
return {{classname}}Fp(this.configuration).{{nickname}}({{#allParams.0}}{{#allParams}}requestParameters.{{paramName}}, {{/allParams}}{{/allParams.0}}options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
{{/useSingleRequestParameter}}
|
||||
{{^useSingleRequestParameter}}
|
||||
public {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: AxiosRequestConfig) {
|
||||
return {{classname}}Fp(this.configuration).{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
{{/useSingleRequestParameter}}
|
||||
{{^-last}}
|
||||
|
||||
{{/-last}}
|
||||
{{/operation}}
|
||||
}
|
||||
{{/operations}}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user