forked from loafle/openapi-generator-original
[typescript-fetch] Generate @deprecated comments for all deprecated APIs (#16696)
* add deprecated to typescript-fetch * update samples --------- Co-authored-by: Родин Кирилл Владимирович <kvrodin@mts.ru>
This commit is contained in:
parent
5c5ec36500
commit
832947c895
@ -65,6 +65,9 @@ export interface {{classname}}Interface {
|
||||
{{#summary}}
|
||||
* {{&summary}}
|
||||
{{/summary}}
|
||||
{{#isDeprecated}}
|
||||
* @deprecated
|
||||
{{/isDeprecated}}
|
||||
*/
|
||||
{{^useSingleRequestParameter}}
|
||||
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{{{returnType}}}{{^returnType}}void{{/returnType}}>;
|
||||
@ -97,6 +100,9 @@ export class {{classname}} extends runtime.BaseAPI {
|
||||
{{#summary}}
|
||||
* {{&summary}}
|
||||
{{/summary}}
|
||||
{{#isDeprecated}}
|
||||
* @deprecated
|
||||
{{/isDeprecated}}
|
||||
*/
|
||||
async {{nickname}}Raw({{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}Request, {{/allParams.0}}initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{{{returnType}}}{{^returnType}}void{{/returnType}}>> {
|
||||
{{#allParams}}
|
||||
@ -340,6 +346,9 @@ export class {{classname}} extends runtime.BaseAPI {
|
||||
{{#summary}}
|
||||
* {{&summary}}
|
||||
{{/summary}}
|
||||
{{#isDeprecated}}
|
||||
* @deprecated
|
||||
{{/isDeprecated}}
|
||||
*/
|
||||
{{^useSingleRequestParameter}}
|
||||
async {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}, {{/allParams}}initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{{{returnType}}}{{^returnType}}void{{/returnType}}> {
|
||||
|
@ -196,6 +196,7 @@ export class PetApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Set<Pet>>> {
|
||||
if (requestParameters.tags === null || requestParameters.tags === undefined) {
|
||||
@ -228,6 +229,7 @@ export class PetApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTags(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Set<Pet>> {
|
||||
const response = await this.findPetsByTagsRaw(requestParameters, initOverrides);
|
||||
|
@ -186,6 +186,7 @@ export class PetApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters.tags === null || requestParameters.tags === undefined) {
|
||||
@ -218,6 +219,7 @@ export class PetApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTags(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Pet>> {
|
||||
const response = await this.findPetsByTagsRaw(requestParameters, initOverrides);
|
||||
|
@ -186,6 +186,7 @@ export class PetApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters.tags === null || requestParameters.tags === undefined) {
|
||||
@ -218,6 +219,7 @@ export class PetApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTags(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Pet>> {
|
||||
const response = await this.findPetsByTagsRaw(requestParameters, initOverrides);
|
||||
|
@ -186,6 +186,7 @@ export class PetApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters.tags === null || requestParameters.tags === undefined) {
|
||||
@ -218,6 +219,7 @@ export class PetApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTags(tags: Array<string>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Pet>> {
|
||||
const response = await this.findPetsByTagsRaw({ tags: tags }, initOverrides);
|
||||
|
@ -186,6 +186,7 @@ export class PetApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRaw(requestParameters: PetApiFindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters.tags === null || requestParameters.tags === undefined) {
|
||||
@ -218,6 +219,7 @@ export class PetApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTags(requestParameters: PetApiFindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Pet>> {
|
||||
const response = await this.findPetsByTagsRaw(requestParameters, initOverrides);
|
||||
|
@ -174,6 +174,7 @@ export class PetApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Multiple ids can be provided with comma separated strings.
|
||||
* Finds Pets by ids
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByIdsRaw(requestParameters: FindPetsByIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters.ids === null || requestParameters.ids === undefined) {
|
||||
@ -206,6 +207,7 @@ export class PetApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Multiple ids can be provided with comma separated strings.
|
||||
* Finds Pets by ids
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByIds(ids: Array<number>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Pet>> {
|
||||
const response = await this.findPetsByIdsRaw({ ids: ids }, initOverrides);
|
||||
@ -256,6 +258,7 @@ export class PetApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters.tags === null || requestParameters.tags === undefined) {
|
||||
@ -288,6 +291,7 @@ export class PetApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTags(tags: Array<string>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Pet>> {
|
||||
const response = await this.findPetsByTagsRaw({ tags: tags }, initOverrides);
|
||||
@ -297,6 +301,7 @@ export class PetApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Multiple ids can be provided with comma separated strings.
|
||||
* Finds Pets by user ids
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByUserIdsRaw(requestParameters: FindPetsByUserIdsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FindPetsByUserResponse>> {
|
||||
if (requestParameters.ids === null || requestParameters.ids === undefined) {
|
||||
@ -329,6 +334,7 @@ export class PetApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Multiple ids can be provided with comma separated strings.
|
||||
* Finds Pets by user ids
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByUserIds(ids: Array<number>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FindPetsByUserResponse> {
|
||||
const response = await this.findPetsByUserIdsRaw({ ids: ids }, initOverrides);
|
||||
|
@ -196,6 +196,7 @@ export class PetApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Set<Pet>>> {
|
||||
if (requestParameters.tags === null || requestParameters.tags === undefined) {
|
||||
@ -228,6 +229,7 @@ export class PetApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTags(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Set<Pet>> {
|
||||
const response = await this.findPetsByTagsRaw(requestParameters, initOverrides);
|
||||
|
@ -130,6 +130,7 @@ export interface PetApiInterface {
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
findPetsByTags(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Pet>>;
|
||||
|
||||
@ -324,6 +325,7 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface {
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters.tags === null || requestParameters.tags === undefined) {
|
||||
@ -356,6 +358,7 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface {
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTags(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Pet>> {
|
||||
const response = await this.findPetsByTagsRaw(requestParameters, initOverrides);
|
||||
|
@ -186,6 +186,7 @@ export class PetApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters.tags === null || requestParameters.tags === undefined) {
|
||||
@ -218,6 +219,7 @@ export class PetApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTags(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Pet>> {
|
||||
const response = await this.findPetsByTagsRaw(requestParameters, initOverrides);
|
||||
|
@ -180,6 +180,7 @@ export class PetApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters.tags === null || requestParameters.tags === undefined) {
|
||||
@ -212,6 +213,7 @@ export class PetApi extends runtime.BaseAPI {
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
* @deprecated
|
||||
*/
|
||||
async findPetsByTags(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Pet>> {
|
||||
const response = await this.findPetsByTagsRaw(requestParameters, initOverrides);
|
||||
|
Loading…
x
Reference in New Issue
Block a user