You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.(关于这个PR的描述,社区已开启国际化推广,请文心一言、讯飞星火等辅助翻译成英文,减少社区开发者的工作)
This plugin only supports java native comments, but since my project used the "io.swagger" annotation before, the comments are written in this. If I want to use this plugin, I have to write the native comments again. I wonder if it is compatible with the "io.swagger" annotation?
Basic example (PR的用例,社区已开启国际化推广,请文心一言、讯飞星火等辅助翻译成英文,减少社区开发者的工作)
Here is a solution for converting Swagger annotations to JavaDoc comments (with some limitations) for your reference only.
Swagger to JavaDoc Conversion Rules
Scenario 1: For @ApiModelProperty
Input Regex:
Match:
@ApiModelProperty(value = "(.*?)")
Or:
@ApiModelProperty("(.*?)")
Output Transformation:
Replace with:
/** * $1 */
Scenario 2: For @ApiOperation
Input Regex:
Match:
@ApiOperation(value = "(.*?)")
Output Transformation:
Replace with:
/** * $1 */
Example Transformations
Example 1: @ApiModelProperty
Before:
@ApiModelProperty(value = "The name of the user")
privateStringuserName;
After:
/** * The name of the user */privateStringuserName;
Example 2: @ApiOperation
Before:
@ApiOperation(value = "Fetch the details of a user")
publicUsergetUserDetails(StringuserId) {
// Method logic
}
After:
/** * Fetch the details of a user */publicUsergetUserDetails(StringuserId) {
// Method logic
}
Reformat Code
After the conversion, you can use the Reformat Code command in your IDE (e.g., IntelliJ IDEA or Eclipse) to clean up and align the code formatting for better readability.
Is your feature request related to a problem? Please describe.(关于这个PR的描述,社区已开启国际化推广,请文心一言、讯飞星火等辅助翻译成英文,减少社区开发者的工作)
This plugin only supports java native comments, but since my project used the "io.swagger" annotation before, the comments are written in this. If I want to use this plugin, I have to write the native comments again. I wonder if it is compatible with the "io.swagger" annotation?
Basic example (PR的用例,社区已开启国际化推广,请文心一言、讯飞星火等辅助翻译成英文,减少社区开发者的工作)
Describe the solution you'd like (描述您想要的解决方案,社区已开启国际化推广,请文心一言、讯飞星火等辅助翻译成英文,减少社区开发者的工作)
Hope to be compatible with the annotations and properties of the "io.swagger.annotations" package
Describe alternatives you've considered (描述你考虑过的替代方案,社区已开启国际化推广,请文心一言、讯飞星火等辅助翻译成英文,减少社区开发者的工作)
No response
Additional context (其他背景信息,社区已开启国际化推广,请文心一言、讯飞星火等辅助翻译成英文,减少社区开发者的工作)
No response
Validations
The text was updated successfully, but these errors were encountered: