typescript-angular: single request parameter documentation (#5308)

* Feature: Add JSDoc to request parameter interface members

* Add petstore after generation changes
This commit is contained in:
Alexander Rashed 2020-02-14 09:34:45 +01:00 committed by GitHub
parent edd7cab22a
commit 3f490ea7ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 1 deletions

View File

@ -44,7 +44,8 @@ import {
{{#allParams.0}}
export interface {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}RequestParams {
{{#allParams}}
{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}{{#isNullable}} | null{{/isNullable}};
{{#description}}/** {{description}} */
{{/description}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}{{#isNullable}} | null{{/isNullable}};
{{/allParams}}
}

View File

@ -25,39 +25,51 @@ import { Configuration } from '../configurat
export interface AddPetRequestParams {
/** Pet object that needs to be added to the store */
body: Pet;
}
export interface DeletePetRequestParams {
/** Pet id to delete */
petId: number;
apiKey?: string;
}
export interface FindPetsByStatusRequestParams {
/** Status values that need to be considered for filter */
status: Array<'available' | 'pending' | 'sold'>;
}
export interface FindPetsByTagsRequestParams {
/** Tags to filter by */
tags: Array<string>;
}
export interface GetPetByIdRequestParams {
/** ID of pet to return */
petId: number;
}
export interface UpdatePetRequestParams {
/** Pet object that needs to be added to the store */
body: Pet;
}
export interface UpdatePetWithFormRequestParams {
/** ID of pet that needs to be updated */
petId: number;
/** Updated name of the pet */
name?: string;
/** Updated status of the pet */
status?: string;
}
export interface UploadFileRequestParams {
/** ID of pet to update */
petId: number;
/** Additional data to pass to server */
additionalMetadata?: string;
/** file to upload */
file?: Blob;
}

View File

@ -24,14 +24,17 @@ import { Configuration } from '../configurat
export interface DeleteOrderRequestParams {
/** ID of the order that needs to be deleted */
orderId: string;
}
export interface GetOrderByIdRequestParams {
/** ID of pet that needs to be fetched */
orderId: number;
}
export interface PlaceOrderRequestParams {
/** order placed for purchasing the pet */
body: Order;
}

View File

@ -24,32 +24,41 @@ import { Configuration } from '../configurat
export interface CreateUserRequestParams {
/** Created user object */
body: User;
}
export interface CreateUsersWithArrayInputRequestParams {
/** List of user object */
body: Array<User>;
}
export interface CreateUsersWithListInputRequestParams {
/** List of user object */
body: Array<User>;
}
export interface DeleteUserRequestParams {
/** The name that needs to be deleted */
username: string;
}
export interface GetUserByNameRequestParams {
/** The name that needs to be fetched. Use user1 for testing. */
username: string;
}
export interface LoginUserRequestParams {
/** The user name for login */
username: string;
/** The password for login in clear text */
password: string;
}
export interface UpdateUserRequestParams {
/** name that need to be deleted */
username: string;
/** Updated user object */
body: User;
}