|
33 | 33 | @Retention(RetentionPolicy.RUNTIME) |
34 | 34 | @Inherited |
35 | 35 | public @interface Api { |
36 | | - /** |
37 | | - * The 'path' that is going to be used to host the API Declaration of the |
38 | | - * resource. |
39 | | - * <p/> |
40 | | - * For JAX-RS resources, this would normally have the same value as the {@code @Path} |
41 | | - * on the resource, but can be any other value as well. It will serve as the path |
42 | | - * where the documentation is hosted. |
43 | | - * <p/> |
44 | | - * For Servlets, this path has to be the path serving the Servlet. |
45 | | - * <p/> |
46 | | - * If the value isn't preceded with a slash, one would be added to it. |
47 | | - */ |
48 | | - String value(); |
| 36 | + /** |
| 37 | + * The 'path' that is going to be used to host the API Declaration of the |
| 38 | + * resource. |
| 39 | + * <p/> |
| 40 | + * For JAX-RS resources, this would normally have the same value as the {@code @Path} |
| 41 | + * on the resource, but can be any other value as well. It will serve as the path |
| 42 | + * where the documentation is hosted. |
| 43 | + * <p/> |
| 44 | + * For Servlets, this path has to be the path serving the Servlet. |
| 45 | + * <p/> |
| 46 | + * If the value isn't preceded with a slash, one would be added to it. |
| 47 | + */ |
| 48 | + String value(); |
49 | 49 |
|
50 | | - /** |
51 | | - * A list of tags for API documentation control. |
52 | | - * Tags can be used for logical grouping of operations by resources or any other qualifier. |
53 | | - * |
54 | | - * @since 1.5.2 |
55 | | - */ |
56 | | - Tag[] tags() default @Tag(value = "", description = ""); |
| 50 | + /** |
| 51 | + * A list of tags for API documentation control. |
| 52 | + * Tags can be used for logical grouping of operations by resources or any other qualifier. |
| 53 | + * |
| 54 | + * @since 1.5.2 |
| 55 | + */ |
| 56 | + Tag[] tags() default @Tag(value = "", description = ""); |
57 | 57 |
|
58 | | - /** |
59 | | - * Corresponds to the `description` field of the Resource Listing API operation. |
60 | | - * <p/> |
61 | | - * This should be a short description of the resource. |
62 | | - */ |
63 | | - String description() default ""; |
| 58 | + /** |
| 59 | + * Corresponds to the `description` field of the Resource Listing API operation. |
| 60 | + * <p/> |
| 61 | + * This should be a short description of the resource. |
| 62 | + */ |
| 63 | + String description() default ""; |
64 | 64 |
|
65 | | - /** |
66 | | - * Corresponds to the `basePath` field of the API Declaration. |
67 | | - * <p/> |
68 | | - * The `basePath` is derived automatically by Swagger. This property allows |
69 | | - * overriding the default value if needed. |
70 | | - * |
71 | | - * @since 1.3.7 |
72 | | - */ |
73 | | - String basePath() default ""; |
| 65 | + /** |
| 66 | + * Corresponds to the `basePath` field of the API Declaration. |
| 67 | + * <p/> |
| 68 | + * The `basePath` is derived automatically by Swagger. This property allows |
| 69 | + * overriding the default value if needed. |
| 70 | + * |
| 71 | + * @since 1.3.7 |
| 72 | + */ |
| 73 | + String basePath() default ""; |
74 | 74 |
|
75 | | - /** |
76 | | - * Optional explicit ordering of this API resource in the Resource Listing. |
77 | | - */ |
78 | | - int position() default 0; |
| 75 | + /** |
| 76 | + * Optional explicit ordering of this API resource in the Resource Listing. |
| 77 | + */ |
| 78 | + int position() default 0; |
79 | 79 |
|
80 | | - /** |
81 | | - * Corresponds to the `produces` field of the API Declaration. |
82 | | - * <p/> |
83 | | - * Takes in comma-separated values of content types. |
84 | | - * For example, "application/json, application/xml" would suggest this API Resource |
85 | | - * generates JSON and XML output. |
86 | | - * <p/> |
87 | | - * For JAX-RS resources, this would automatically take the value of the {@code @Produces} |
88 | | - * annotation if such exists. It can also be used to override the {@code @Produces} values |
89 | | - * for the Swagger documentation. |
90 | | - */ |
91 | | - String produces() default ""; |
| 80 | + /** |
| 81 | + * Corresponds to the `produces` field of the API Declaration. |
| 82 | + * <p/> |
| 83 | + * Takes in comma-separated values of content types. |
| 84 | + * For example, "application/json, application/xml" would suggest this API Resource |
| 85 | + * generates JSON and XML output. |
| 86 | + * <p/> |
| 87 | + * For JAX-RS resources, this would automatically take the value of the {@code @Produces} |
| 88 | + * annotation if such exists. It can also be used to override the {@code @Produces} values |
| 89 | + * for the Swagger documentation. |
| 90 | + */ |
| 91 | + String produces() default ""; |
92 | 92 |
|
93 | | - /** |
94 | | - * Corresponds to the `consumes` field of the API Declaration. |
95 | | - * <p/> |
96 | | - * Takes in comma-separated values of content types. |
97 | | - * For example, "application/json, application/xml" would suggest this API Resource |
98 | | - * accepts JSON and XML input. |
99 | | - * <p/> |
100 | | - * For JAX-RS resources, this would automatically take the value of the {@code @Consumes} |
101 | | - * annotation if such exists. It can also be used to override the {@code @Consumes} values |
102 | | - * for the Swagger documentation. |
103 | | - */ |
104 | | - String consumes() default ""; |
| 93 | + /** |
| 94 | + * Corresponds to the `consumes` field of the API Declaration. |
| 95 | + * <p/> |
| 96 | + * Takes in comma-separated values of content types. |
| 97 | + * For example, "application/json, application/xml" would suggest this API Resource |
| 98 | + * accepts JSON and XML input. |
| 99 | + * <p/> |
| 100 | + * For JAX-RS resources, this would automatically take the value of the {@code @Consumes} |
| 101 | + * annotation if such exists. It can also be used to override the {@code @Consumes} values |
| 102 | + * for the Swagger documentation. |
| 103 | + */ |
| 104 | + String consumes() default ""; |
105 | 105 |
|
106 | | - /** |
107 | | - * This property is currently not in use. |
108 | | - */ |
109 | | - String protocols() default ""; |
| 106 | + /** |
| 107 | + * This property is currently not in use. |
| 108 | + */ |
| 109 | + String protocols() default ""; |
110 | 110 |
|
111 | | - /** |
112 | | - * Corresponds to the `authorizations` field of the API Declaration. |
113 | | - * <p/> |
114 | | - * Takes in a list of the required authorizations for this API Resource. |
115 | | - * This may be overridden by specific operations. |
116 | | - * |
117 | | - * @see Authorization |
118 | | - */ |
119 | | - Authorization[] authorizations() default @Authorization(value = "", type = ""); |
| 111 | + /** |
| 112 | + * Corresponds to the `authorizations` field of the API Declaration. |
| 113 | + * <p/> |
| 114 | + * Takes in a list of the required authorizations for this API Resource. |
| 115 | + * This may be overridden by specific operations. |
| 116 | + * |
| 117 | + * @see Authorization |
| 118 | + */ |
| 119 | + Authorization[] authorizations() default @Authorization(value = "", type = ""); |
120 | 120 |
|
121 | | - /** |
122 | | - * Hides the api. |
123 | | - * |
124 | | - * @since 1.3.8 |
125 | | - */ |
126 | | - boolean hidden() default false; |
| 121 | + /** |
| 122 | + * Hides the api. |
| 123 | + * |
| 124 | + * @since 1.3.8 |
| 125 | + */ |
| 126 | + boolean hidden() default false; |
127 | 127 | } |
0 commit comments