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

[Feature] 如何忽略接口上的某一个参数对象 #1088

Open
bjhx2003 opened this issue Dec 4, 2023 · 1 comment
Open

[Feature] 如何忽略接口上的某一个参数对象 #1088

bjhx2003 opened this issue Dec 4, 2023 · 1 comment
Labels
status: feedback required feedback required type: question&discussion Further information is requested

Comments

@bjhx2003
Copy link

bjhx2003 commented Dec 4, 2023

举例来说,我可能是通过调用方在Header中传递token,后端在拦截器中统一转换为一个User对象。
效果如下:
XXController{

public ResutVO getXXX(@requestbody Object o1, User user){

}
}
其中User其实并不需要调用方传递,此时生成的接口文档,会默认把User按照query param生成。如果我想统一处理这个参数的忽略该怎么处理

@bjhx2003 bjhx2003 added the type: feature request Feature Enhancement Request label Dec 4, 2023
@tangcent
Copy link
Owner

tangcent commented Dec 4, 2023

param.ignore, 类似这样:

param.ignore=groovy:it.type().name()=="com.itangcent.common.model.UserInfo"

@tangcent tangcent added type: question&discussion Further information is requested status: feedback required feedback required and removed type: feature request Feature Enhancement Request labels Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: feedback required feedback required type: question&discussion Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants