View Javadoc
1   package org.imageconverter.util.openapi;
2   
3   import java.lang.annotation.ElementType;
4   import java.lang.annotation.Inherited;
5   import java.lang.annotation.Retention;
6   import java.lang.annotation.RetentionPolicy;
7   import java.lang.annotation.Target;
8   
9   import io.swagger.v3.oas.annotations.media.Content;
10  import io.swagger.v3.oas.annotations.media.ExampleObject;
11  import io.swagger.v3.oas.annotations.responses.ApiResponse;
12  
13  @Target({ElementType.METHOD, ElementType.TYPE})
14  @Retention(RetentionPolicy.RUNTIME)
15  @Inherited
16  //
17  @ApiResponse( //
18  		responseCode = "500", //
19  		description = "Unexpected error", //
20  		content = @Content( //
21  				mediaType = "application/json", //
22  				examples = @ExampleObject(//
23  						description = "Without flag trace or with value igual false at end of request", //
24  						value = """
25  								{
26  								   "timestamp":"2021-07-19T15:25:32.389836763",
27  								   "status":500,
28  								   "error":"Internal Server Error",
29  								   "message":"Unexpected error. Please, check the log with traceId and spanId for more detail",
30  								   "traceId":"3d4144eeb01e3682",
31  								   "spanId":"3d4144eeb01e3682"
32  								}
33  								""")))
34  public @interface OpenApiResponseError500 {
35  
36  }