Skip to content

[typescript-rxjs][client] Unnecessary imports occurs when using allOf #4632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

tanmen
Copy link
Contributor

@tanmen tanmen commented Nov 28, 2019

fixes #4629

Hello.
When using rxjs, a warning occurred in unused import.
I tried to fix it, so please take a look if you like.

Before

// tslint:disable
/**
 * My application
 * My application
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

 import {
     Box,
     Response,
 } from './';

 /**
  * @export
  * @interface BoxResponse
  */
 export interface BoxResponse extends Box, Response{
     /**
      * @type {string}
      * @memberof BoxResponse
      */
     status?: BoxResponseStatusEnum;
     /**
      * @type {number}
      * @memberof BoxResponse
      */
     id?: number;
     /**
      * @type {string}
      * @memberof BoxResponse
      */
     name?: string;
 }

 /**
  * @export
  * @enum {string}
  */
 export enum BoxResponseStatusEnum {
     Success = 'success',
     Error = 'error'
 }

After

// tslint:disable
/**
 * Myroad api
 * Myroad user api document
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

import {
    Box,
    Response,
} from './';

/**
 * @type BoxesResponse
 * @export
 */
export type BoxesResponse = Box & Response;

PR checklist

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project before.
  • Run the shell script(s) under ./bin/ (or Windows batch scripts under.\bin\windows) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the code or mustache templates for a language ({LANG}) (e.g. php, ruby, python, etc).
  • File the PR against the correct branch: master, 4.3.x, 5.0.x. Default: master.
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

@TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @nicokoenig (2018/09) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11)

@auto-labeler
Copy link

auto-labeler bot commented Nov 28, 2019

👍 Thanks for opening this issue!
🏷 I have applied any labels matching special text in your issue.

The team will review the labels and make any necessary changes.

@macjohnny
Copy link
Member

cc @denyo

@macjohnny macjohnny added this to the 4.2.2 milestone Nov 28, 2019
@denyo
Copy link
Contributor

denyo commented Nov 28, 2019

Thanks, looks good.
When I was trying something around inheritance a couple of months ago I added supportsMultipleInheritance = true; to the Java code which also had some effect but I can't recall which.

@macjohnny macjohnny merged commit df7b9b5 into OpenAPITools:master Nov 28, 2019
@tanmen
Copy link
Contributor Author

tanmen commented Nov 30, 2019

@denyo
sorry my response to late.
i so happy for your review!

@macjohnny
so thank you management this pr!!

@wing328
Copy link
Member

wing328 commented Dec 2, 2019

@tanmen thanks for the PR, which has been included in the v4.2.2 release: https://twitter.com/oas_generator/status/1201432648544972800

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG][typescript-rxjs] Unnecessary imports occurs when using allOf
4 participants