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

After api is declared as an array structure, it cannot be generated through goctl swagger #3758

Closed
aarchies opened this issue Dec 5, 2023 · 4 comments

Comments

@aarchies
Copy link

aarchies commented Dec 5, 2023

我定义了一个api文件,并依此成功生成api相关代码
如下

微信截图_20231205161128
微信截图_20231205161138

但是在通过官方 goctl api plugin -plugin goctl-swagger="swagger进行swagger文档生成时,发生报错,
如下:
Error: panic: error: line 52:8 field Nodes has no tag

个人测试,进行匿名声明或注释该数组结构体后可以成功生成,在官方文档没有找到相关可声明数组文档描述

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I defined an api file and successfully generated api related code accordingly
as follows

WeChat screenshot_20231205161128
WeChat screenshot_20231205161138

However, when generating swagger documents through the official goctl api plugin -plugin goctl-swagger="swagger, an error occurs.
as follows:
Error: panic: error: line 52:8 field Nodes has no tag

For personal testing, the array structure can be generated successfully after anonymously declaring or annotating it. However, no relevant declarable array document description was found in the official documentation.

@aarchies
Copy link
Author

aarchies commented Dec 5, 2023

已解决

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


solved

@kesonan
Copy link
Collaborator

kesonan commented Dec 5, 2023

Thanks for feedback again.

@kesonan kesonan closed this as completed Dec 5, 2023
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

No branches or pull requests

3 participants