Skip to content
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

fix typescript-axios model type error & lost import #950

Merged
merged 4 commits into from
Mar 8, 2022

Conversation

joshuafc
Copy link
Contributor

@joshuafc joshuafc commented Sep 2, 2021

fix 4 problems:

  1. lost of import { xxx } from './xxx_model';
  2. all field has any type
  3. @type error with Array<xxx>, <&> encoded
  4. Map object type error [key: string]:xxx vs [key, string]:xxx

swagger-api/swagger-editor#2726
swagger-api/swagger-codegen#11043
swagger-api/swagger-codegen#10595

old generated:

/* tslint:disable */
/* eslint-disable */
/**
 * Api Documentation
 * Api Documentation
 *
 * OpenAPI spec version: 1.0
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */
/**
 * 
 * @export
 * @interface DataSliceQueryDTO
 */
export interface DataSliceQueryDTO {
    /**
     * 
     * @type {Array&lt;number&gt;}
     * @memberof DataSliceQueryDTO
     */
    dataSliceIdList?: any;
    /**
     * 
     * @type {ExtensionJsonDTO}
     * @memberof DataSliceQueryDTO
     */
    extensionJsonDTO?: any;
    /**
     * 
     * @type {{ [key, string]: string;}}
     * @memberof DataSliceQueryDTO
     */
    xvVersionMap?: any;
}

after fix generated:

/* tslint:disable */
/* eslint-disable */
/**
 * Api Documentation
 * Api Documentation
 *
 * OpenAPI spec version: 1.0
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */
import { ExtensionJsonDTO } from './extension-json-dto';
/**
 * 
 * @export
 * @interface DataSliceQueryDTO
 */
export interface DataSliceQueryDTO {
    /**
     * 
     * @type {Array<number>}
     * @memberof DataSliceQueryDTO
     */
    dataSliceIdList?: Array<number>;
    /**
     * 
     * @type {ExtensionJsonDTO}
     * @memberof DataSliceQueryDTO
     */
    extensionJsonDTO?: ExtensionJsonDTO;
    /**
     * 
     * @type {{ [key: string]: string; }}
     * @memberof DataSliceQueryDTO
     */
    xvVersionMap?: { [key: string]: string; };
}

@HugoMario HugoMario merged commit 700eeb0 into swagger-api:master Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants