Skip to content

struct嵌套导致goctl生成TS时丢失层级信息 #5402

@liuqiandev

Description

@liuqiandev

Describe the bug
在api中定义type时使用了多级嵌套,在生成ts文件时,导致层级丢失了层级信息

To Reproduce

  1. api中的定义

    type (
     IdStruct {
         Id int64 `json:"id"`
     }
     NameStrcut {
         IdStruct
         Name string `json:"name"`
     }
     AgeStruct {
         NameStrcut
         Age int `json:"age"`
     })
    
    
  2. 生成的前端代码,丢失了第一层的IdStruct信息

    export interface AgeStruct {
     name: string
     age: number}

Environments (please complete the following information):

  • goctl version 1.9.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions