Skip to content

Instantly share code, notes, and snippets.

@chenchun
Last active October 1, 2019 02:47
Show Gist options
  • Save chenchun/05b65b23f9c941acc233b1d7db587cb9 to your computer and use it in GitHub Desktop.
Save chenchun/05b65b23f9c941acc233b1d7db587cb9 to your computer and use it in GitHub Desktop.
idea quickly add swagger annotations based on comment

With powerful named capture groups replace, we can quickly add swagger annotations based on comment

find: (?<title1>\/\*\*\n     \* (?<title>.*)\n     \*/$)
replace: ${title1}\n    @ApiModelProperty(notes = "${title}")

Before

image

After

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment