fix: properly mark 'deprecated' routes in typescript-axios template #9502 (#9505)

Co-authored-by: Michał Wilski <michal.wilski.ext@eloomi.com>
This commit is contained in:
Michał Wilski
2021-05-18 08:10:44 +02:00
committed by GitHub
parent fb3aed6dc4
commit 93166dd6b5
9 changed files with 43 additions and 5 deletions

View File

@@ -34,7 +34,8 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur
{{#allParams}}
* @param {{=<% %>=}}{<%&dataType%>}<%={{ }}=%> {{^required}}[{{/required}}{{paramName}}{{^required}}]{{/required}} {{description}}
{{/allParams}}
* @param {*} [options] Override http request option.
* @param {*} [options] Override http request option.{{#isDeprecated}}
* @deprecated{{/isDeprecated}}
* @throws {RequiredError}
*/
{{nickname}}: async ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options: any = {}): Promise<RequestArgs> => {
@@ -217,7 +218,8 @@ export const {{classname}}Fp = function(configuration?: Configuration) {
{{#allParams}}
* @param {{=<% %>=}}{<%&dataType%>}<%={{ }}=%> {{^required}}[{{/required}}{{paramName}}{{^required}}]{{/required}} {{description}}
{{/allParams}}
* @param {*} [options] Override http request option.
* @param {*} [options] Override http request option.{{#isDeprecated}}
* @deprecated{{/isDeprecated}}
* @throws {RequiredError}
*/
async {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>> {
@@ -245,7 +247,8 @@ export const {{classname}}Factory = function (configuration?: Configuration, bas
{{#allParams}}
* @param {{=<% %>=}}{<%&dataType%>}<%={{ }}=%> {{^required}}[{{/required}}{{paramName}}{{^required}}]{{/required}} {{description}}
{{/allParams}}
* @param {*} [options] Override http request option.
* @param {*} [options] Override http request option.{{#isDeprecated}}
* @deprecated{{/isDeprecated}}
* @throws {RequiredError}
*/
{{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): AxiosPromise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}> {
@@ -272,7 +275,8 @@ export interface {{classname}}Interface {
{{#allParams}}
* @param {{=<% %>=}}{<%&dataType%>}<%={{ }}=%> {{^required}}[{{/required}}{{paramName}}{{^required}}]{{/required}} {{description}}
{{/allParams}}
* @param {*} [options] Override http request option.
* @param {*} [options] Override http request option.{{#isDeprecated}}
* @deprecated{{/isDeprecated}}
* @throws {RequiredError}
* @memberof {{classname}}Interface
*/
@@ -336,7 +340,8 @@ export class {{classname}} extends BaseAPI {
* @param {{=<% %>=}}{<%&dataType%>}<%={{ }}=%> {{^required}}[{{/required}}{{paramName}}{{^required}}]{{/required}} {{description}}
{{/allParams}}
{{/useSingleRequestParameter}}
* @param {*} [options] Override http request option.
* @param {*} [options] Override http request option.{{#isDeprecated}}
* @deprecated{{/isDeprecated}}
* @throws {RequiredError}
* @memberof {{classname}}
*/

View File

@@ -383,6 +383,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
findPetsByTags: async (tags: Array<string>, options: any = {}): Promise<RequestArgs> => {
@@ -649,6 +650,7 @@ export const PetApiFp = function(configuration?: Configuration) {
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
async findPetsByTags(tags: Array<string>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
@@ -749,6 +751,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
findPetsByTags(tags: Array<string>, options?: any): AxiosPromise<Array<Pet>> {
@@ -850,6 +853,7 @@ export class PetApi extends BaseAPI {
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
* @memberof PetApi
*/

View File

@@ -383,6 +383,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
findPetsByTags: async (tags: Array<string>, options: any = {}): Promise<RequestArgs> => {
@@ -649,6 +650,7 @@ export const PetApiFp = function(configuration?: Configuration) {
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
async findPetsByTags(tags: Array<string>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
@@ -749,6 +751,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
findPetsByTags(tags: Array<string>, options?: any): AxiosPromise<Array<Pet>> {
@@ -850,6 +853,7 @@ export class PetApi extends BaseAPI {
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
* @memberof PetApi
*/

View File

@@ -394,6 +394,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
findPetsByTags: async (tags: Array<string>, options: any = {}): Promise<RequestArgs> => {
@@ -662,6 +663,7 @@ export const PetApiFp = function(configuration?: Configuration) {
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
async findPetsByTags(tags: Array<string>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
@@ -764,6 +766,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
findPetsByTags(tags: Array<string>, options?: any): AxiosPromise<Array<Pet>> {
@@ -867,6 +870,7 @@ export class PetApi extends BaseAPI {
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
* @memberof PetApi
*/

View File

@@ -3089,6 +3089,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
findPetsByTags: async (tags: Array<string>, options: any = {}): Promise<RequestArgs> => {
@@ -3413,6 +3414,7 @@ export const PetApiFp = function(configuration?: Configuration) {
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
async findPetsByTags(tags: Array<string>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
@@ -3526,6 +3528,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
findPetsByTags(tags: Array<string>, options?: any): AxiosPromise<Array<Pet>> {
@@ -3639,6 +3642,7 @@ export class PetApi extends BaseAPI {
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
* @memberof PetApi
*/

View File

@@ -383,6 +383,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
findPetsByTags: async (tags: Array<string>, options: any = {}): Promise<RequestArgs> => {
@@ -649,6 +650,7 @@ export const PetApiFp = function(configuration?: Configuration) {
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
async findPetsByTags(tags: Array<string>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
@@ -749,6 +751,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
findPetsByTags(tags: Array<string>, options?: any): AxiosPromise<Array<Pet>> {
@@ -843,6 +846,7 @@ export interface PetApiInterface {
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
* @memberof PetApiInterface
*/
@@ -943,6 +947,7 @@ export class PetApi extends BaseAPI implements PetApiInterface {
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
* @memberof PetApi
*/

View File

@@ -159,6 +159,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
findPetsByTags: async (tags: Array<string>, options: any = {}): Promise<RequestArgs> => {
@@ -425,6 +426,7 @@ export const PetApiFp = function(configuration?: Configuration) {
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
async findPetsByTags(tags: Array<string>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
@@ -525,6 +527,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
findPetsByTags(tags: Array<string>, options?: any): AxiosPromise<Array<Pet>> {
@@ -626,6 +629,7 @@ export class PetApi extends BaseAPI {
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
* @memberof PetApi
*/

View File

@@ -383,6 +383,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
findPetsByTags: async (tags: Array<string>, options: any = {}): Promise<RequestArgs> => {
@@ -649,6 +650,7 @@ export const PetApiFp = function(configuration?: Configuration) {
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
async findPetsByTags(tags: Array<string>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
@@ -749,6 +751,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
findPetsByTags(tags: Array<string>, options?: any): AxiosPromise<Array<Pet>> {
@@ -850,6 +853,7 @@ export class PetApi extends BaseAPI {
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
* @memberof PetApi
*/

View File

@@ -383,6 +383,7 @@ export const PetApiAxiosParamCreator = function (configuration?: Configuration)
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
findPetsByTags: async (tags: Array<string>, options: any = {}): Promise<RequestArgs> => {
@@ -649,6 +650,7 @@ export const PetApiFp = function(configuration?: Configuration) {
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
async findPetsByTags(tags: Array<string>, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Pet>>> {
@@ -749,6 +751,7 @@ export const PetApiFactory = function (configuration?: Configuration, basePath?:
* @summary Finds Pets by tags
* @param {Array<string>} tags Tags to filter by
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
findPetsByTags(tags: Array<string>, options?: any): AxiosPromise<Array<Pet>> {
@@ -996,6 +999,7 @@ export class PetApi extends BaseAPI {
* @summary Finds Pets by tags
* @param {PetApiFindPetsByTagsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
* @memberof PetApi
*/