Created
October 27, 2014 19:20
-
-
Save 0x6e6562/3aad3895dab4242a67ae to your computer and use it in GitHub Desktop.
Multiline Swagger annotations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, | |
* totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae | |
* dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, | |
* sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, | |
* qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi | |
* tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, | |
* quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? | |
* Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, | |
* vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?" | |
*/ | |
@Multiline public static final String LOREM_IPSUM = ""; | |
@RequestMapping(value = "/foo", method = RequestMethod.POST, produces = MediaType.TEXT_PLAIN) | |
@ApiOperation(value = "Create something new", notes=LOREM_IPSUM, response = Long.class) | |
@ApiResponses( | |
@ApiResponse(code = 201, message = "The id of the new thing", response = Long.class) | |
) | |
public long createFoo(@Valid @RequestBody @ApiParam FooForm foo) { | |
// ..... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm lovin it!