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

Does Smart Doc support the function of setting tags for a specific interface? #671

Open
miaoweibiao opened this issue Nov 27, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@miaoweibiao
Copy link

miaoweibiao commented Nov 27, 2023

Summary(关于这个pr的描述)

Tag the interfaces, and then you can filter the interfaces based on the tags.
给接口打标签,然后可以根据标签筛选接口

Basic example(pr的用例)

If the proposal involves a new or changed API, include a basic code example. Omit this section if it's not applicable.

Motivation(提出这个pr目的)

Different iterations involve different interfaces, and currently, the server side verbally informs the front-end or client which interfaces are involved in this version, and then they have to search for them one by one.
If there were a tagging feature, the front-end could quickly find the interfaces involved in this iteration.

不同的迭代会涉及到不同的接口,现在都是服务端在口头告诉前端或者客户端,这个版本涉及到哪些接口,然后再一个个找
要是有个标签功能,前端就可以快速找到本次迭代涉及到的接口了

@miaoweibiao miaoweibiao added the enhancement New feature or request label Nov 27, 2023
@shalousun
Copy link
Collaborator

shalousun commented Nov 28, 2023

Could you describe your usage scenario, such as whatCould you describe your usage scenario, such as what with Smart-Doc and how such as what tools are used in conjunction with Smart-Doc and how to search?
可以描述下你使用场景,比如smart-doc是和什么工具结合使用的,怎么搜索的

@miaoweibiao
Copy link
Author

可以描述下你使用场景,比如smart-doc是和什么工具结合使用的,怎么搜索的

1.目前是没有结合任何工具,只是单纯的smart-doc,因为比较轻量
2.场景的话举个例子:
(1)某一次需求,服务端和客户端涉及到的接口新增和改动,有以下几个
xxxController1.xxx1, xxxController1.xxx2, xxxController2.xxx1
(2)目前的情况下,是需要服务端把这些涉及到的uri,一个个以其他文档的形式,告诉客户端有哪些接口的变动
(3)假设服务端在写配置文件的时候,可以给某些接口打标签,把这些接口都设置为某个标签,就只需要告诉客户端,本次需求涉及接口的标签为xxx,客户端只需要通过标签xxx来搜索,就可以知道有哪些接口了
3.目前我能想到的一个比较好的实现方式,可能是配置文件增加一个选项,结合packageFilters这个东西,不同的标签生成不同的接口文档页面。举个例子:
a.增加选项为tag,配置内容 "tag":{"tag1":{packageFilters:“xxxController.xxx,.....”}}
b.根据tag的key的个数n,生成n+1份文档(有一份是全量的文档)
c.在页面中,有一个可以根据tag的key来选择不同的页面
但是这种做法的就没办法针对多个标签一起筛选了,拙见仅供参考

@shalousun
Copy link
Collaborator

@miaoweibiao 这个要不后面还是走版本化迭代,类似和代码的tag对象,方法上是支持@Version tag的,只是当前未展示,其他的方式都有点脱离了比较规范的方式。做为开源过多的配置也会有点偏离和smart-doc的理念

@miaoweibiao
Copy link
Author

@miaoweibiao 这个要不后面还是走版本化迭代,类似和代码的tag对象,方法上是支持@Version tag的,只是当前未展示,其他的方式都有点脱离了比较规范的方式。做为开源过多的配置也会有点偏离和smart-doc的理念

如果是方法上加标签的话,做完一个需求就得逐个去删除,稍显麻烦。如果是配置文件的话,就可以直接在配置文件里删除就行了。不过这个东西还是结合你们自己的实际情况来整吧

@shalousun shalousun changed the title smart doc支持给某个接口设置标签的功能吗 Does Smart Doc support the function of setting tags for a specific interface? Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants