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

嵌套同一个循环引用这个要json-schema怎么写? #4179

Closed
leslie-fei opened this issue Jul 9, 2024 Discussed in #4178 · 1 comment
Closed

嵌套同一个循环引用这个要json-schema怎么写? #4179

leslie-fei opened this issue Jul 9, 2024 Discussed in #4178 · 1 comment
Labels
invalid This doesn't seem right

Comments

@leslie-fei
Copy link

Discussed in #4178

Originally posted by leslie-fei July 9, 2024
比如一个Player类,

class Player {
  username: string;
  password: string;
  Parent: Player;
}

这个变成json-schema要写成伪代码

{
  type: 'object',
  properties: {
    username: {
      type: 'string',
      FormItem,
      Input
    },
    password: {
      type: 'string',
      FormItem,
      Input
    },
   parent: {
     type: 'object',
     properties: {
          username: {
           type: 'string',
           FormItem,
           Input
      },
      password: {
        type: 'string',
        FormItem,
        Input
       },
      parent: {
       // 这里会无限循环引用下去, 有没有办法实现类似null语义的解决办法
      }
     }
   }
  }
}
```</div>
Copy link
Contributor

github-actions bot commented Jul 9, 2024

Hello @leslie-fei, your issue has been closed because it does not conform to our issue requirements. Please use the Issue Helper to create an issue, thank you!
你好 @leslie-fei,为了能够进行高效沟通,我们对 issue 有一定的格式要求,你的 issue 因为不符合要求而被自动关闭。你可以通过 issue 助手 来创建 issue 以方便我们定位错误。谢谢配合!

@github-actions github-actions bot added the invalid This doesn't seem right label Jul 9, 2024
@github-actions github-actions bot closed this as completed Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant