Skip to content

Commit 1231324

Browse files
committed
Update OpenAPIResponse.java
1 parent dd232d8 commit 1231324

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

http-api/src/main/java/io/avaje/http/api/OpenAPIResponse.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
* Specify endpoint response status code/description/type.
1313
*
1414
* <p>When not specified the default 2xx openAPI generation is based on the javadoc of the method.
15-
* <p> Will not override the default 2xx generated openapi unless status code is 2xx
15+
*
16+
* <p>Will not override the default 2xx generated openapi unless status code is 2xx
17+
*
1618
* <pre>{@code
1719
* @Post("/post")
1820
* @OpenAPIReturns(responseCode = "200", description = "from annotaion")
@@ -21,6 +23,18 @@
2123
* ResponseModel endpoint() {}
2224
*
2325
* }</pre>
26+
*
27+
* <p>Can also be placed on a class to add to every method in the controller.
28+
*
29+
* <pre>{@code
30+
* @OpenAPIResponse(
31+
* responseCode = "403",
32+
* description = "Insufficient rights to this resource."
33+
* )
34+
* public class MyController {
35+
* ...
36+
* }
37+
* }</pre>
2438
*/
2539
@Target({TYPE, METHOD})
2640
@Retention(RUNTIME)

0 commit comments

Comments
 (0)