-
Notifications
You must be signed in to change notification settings - Fork 280
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
Whether to support using @JsonProperty
configuration name first when generating document properties
#937
Comments
@JsonProperty
configuration name first when generating document properties
@yangyf520 smart-doc has supported generating corresponding properties using the Jackson annotation @yangyf520 |
需要配置么,我现在用的是3.0.1版本 |
Next time, if you need to write in Chinese, please use Qwen or other tools to translate it into English. The smart-doc community is currently a global open-source community, and we have invested a lot of effort into promoting it overseas. Community developers have also put in a great deal of work to do translations. Therefore, we appreciate understanding and respect for their efforts. No configuration is needed; smart-doc will automatically parse. If you use the version is not the latest version, please upgrade to the latest version and try again! |
But postman now displays expirationFrom not exp_from built with mvn -X smart-doc:postman -Dfile.encoding=UTF-8 -pl :web-app -am |
@yangyf520 upgrade to the latest version and try again,If the latest version still has issues, you can use |
Just 5 interface methods |
@yangyf520 Please provide a minimal sample application that reproduces the issue to help us resolve it more efficiently. I have tested locally and was unable to reproduce your problem. |
Vo file like this: @Data
public class SublicenseVo implements Serializable {
/**
* 描述
*/
private String description;
/**
* 开始日期,exp_from
*
* @mock 2024-10-18
*/
@NotNull
@JsonProperty("exp_from")
@DateTimeFormat(pattern = Constants.FORMAT_DATE)
private LocalDate expirationFrom;
} controller file like this: @PostMapping(value = "/sublicenses")
public LicenseDto sublicenses(@ModelAttribute SublicenseVo vo, HttpServletRequest request) {
} |
@yangyf520 Smart-doc currently does not support interface input parameters annotated with |
thank u |
@yangyf520 In my demo project, the |
test
TestControllertestUserType: POST Content-Type: application/x-www-form-urlencoded Description: testUser Body-parameters:
Request-example: curl -X POST -i 'http://127.0.0.1:8080/' --data 'username=""&expirationFrom="yyyy-MM-dd"&password=""' Response-fields:
Response-example: {
"username": "",
"password": "",
"exp_from": "yyyy-MM-dd"
} |
Is your feature request related to a problem? Please describe.(关于这个PR的描述,社区已开启国际化推广,请文心一言、讯飞星火等辅助翻译成英文,减少社区开发者的工作)
老项目接口参数采用非驼峰式命名,生成文档属性时是否支持优先使用@JsonProperty配置名称
Basic example (PR的用例,社区已开启国际化推广,请文心一言、讯飞星火等辅助翻译成英文,减少社区开发者的工作)
@JsonProperty("exp_from")
private LocalDate expirationFrom;
Describe the solution you'd like (描述您想要的解决方案,社区已开启国际化推广,请文心一言、讯飞星火等辅助翻译成英文,减少社区开发者的工作)
生产的postman和doc里对应参数名是exp_from
Describe alternatives you've considered (描述你考虑过的替代方案,社区已开启国际化推广,请文心一言、讯飞星火等辅助翻译成英文,减少社区开发者的工作)
No response
Additional context (其他背景信息,社区已开启国际化推广,请文心一言、讯飞星火等辅助翻译成英文,减少社区开发者的工作)
No response
Validations
The text was updated successfully, but these errors were encountered: