Skip to content

Instantly share code, notes, and snippets.

@antukhov
Created March 26, 2021 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antukhov/7dece86c6d16cc81bb6f83f47ffc0c8d to your computer and use it in GitHub Desktop.
Save antukhov/7dece86c6d16cc81bb6f83f47ffc0c8d to your computer and use it in GitHub Desktop.
Sagger example data
@Operation(summary = "Send JSON push directly to the FCM API v1")
@ApiResponses(value = {
@ApiResponse(
responseCode = "200",
description = "Success: our action has been completed",
content = @Content(mediaType = "application/json",
schema = @Schema(
type = "SampleHttpResponseDto",
example = "{\"status\":\"OK\",\"message\":\"sample OK answer\"}")))})
@PostMapping(value = "/resource", consumes = MediaType.APPLICATION_JSON_VALUE)
public SampleHttpResponseDto postRequest(
@Parameter(
name ="json",
schema = @Schema(
description = "additional description of the model",
type = "string",
example = "{\"status\":\"OK\",\"message\":\"message body\"}"))
@RequestBody Map<String, Object> request
) {
return new SampleHttpResponseDto(request.propert1, request.propert2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment