001// ***************************************************************************************************************************
002// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file *
003// * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file        *
004// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance            *
005// * with the License.  You may obtain a copy of the License at                                                              *
006// *                                                                                                                         *
007// *  http://www.apache.org/licenses/LICENSE-2.0                                                                             *
008// *                                                                                                                         *
009// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an  *
010// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the        *
011// * specific language governing permissions and limitations under the License.                                              *
012// ***************************************************************************************************************************
013package org.apache.juneau.rest.annotation;
014
015import static java.lang.annotation.ElementType.*;
016import static java.lang.annotation.RetentionPolicy.*;
017
018import java.lang.annotation.*;
019import java.nio.charset.*;
020
021import org.apache.juneau.annotation.*;
022import org.apache.juneau.rest.*;
023import org.apache.juneau.rest.guard.*;
024import org.apache.juneau.rest.httppart.*;
025import org.apache.juneau.rest.matcher.*;
026import org.apache.juneau.rest.servlet.*;
027import org.apache.juneau.rest.swagger.*;
028import org.apache.juneau.dto.swagger.*;
029import org.apache.juneau.encoders.*;
030
031/**
032 * Identifies a REST DELETE operation Java method on a {@link RestServlet} implementation class.
033 *
034 * <p>
035 * This is a specialized subtype of <c><ja>{@link RestOp @RestOp}(method=<jsf>DELETE</jsf>)</c>.
036 *
037 * <h5 class='section'>See Also:</h5><ul>
038 *    <li class='link'><a class="doclink" href="../../../../../index.html#jrs.RestOpAnnotatedMethods">@RestOp-Annotated Methods</a>
039
040 * </ul>
041 */
042@Target(METHOD)
043@Retention(RUNTIME)
044@Inherited
045@ContextApply(RestDeleteAnnotation.RestOpContextApply.class)
046@AnnotationGroup(RestOp.class)
047public @interface RestDelete {
048
049   /**
050    * Specifies whether this method can be called based on the client version.
051    *
052    * <p>
053    * The client version is identified via the HTTP request header identified by
054    * {@link Rest#clientVersionHeader() @Rest(clientVersionHeader)} which by default is <js>"Client-Version"</js>.
055    *
056    * <p>
057    * This is a specialized kind of {@link RestMatcher} that allows you to invoke different Java methods for the same
058    * method/path based on the client version.
059    *
060    * <p>
061    * The format of the client version range is similar to that of OSGi versions.
062    *
063    * <p>
064    * In the following example, the Java methods are mapped to the same HTTP method and URL <js>"/foobar"</js>.
065    * <p class='bjava'>
066    *    <jc>// Call this method if Client-Version is at least 2.0.
067    *    // Note that this also matches 2.0.1.</jc>
068    *    <ja>@RestDelete</ja>(path=<js>"/foobar"</js>, clientVersion=<js>"2.0"</js>)
069    *    <jk>public</jk> Object method1()  {...}
070    *
071    *    <jc>// Call this method if Client-Version is at least 1.1, but less than 2.0.</jc>
072    *    <ja>@RestDelete</ja>(path=<js>"/foobar"</js>, clientVersion=<js>"[1.1,2.0)"</js>)
073    *    <jk>public</jk> Object method2()  {...}
074    *
075    *    <jc>// Call this method if Client-Version is less than 1.1.</jc>
076    *    <ja>@RestDelete</ja>(path=<js>"/foobar"</js>, clientVersion=<js>"[0,1.1)"</js>)
077    *    <jk>public</jk> Object method3()  {...}
078    * </p>
079    *
080    * <p>
081    * It's common to combine the client version with transforms that will convert new POJOs into older POJOs for
082    * backwards compatibility.
083    * <p class='bjava'>
084    *    <jc>// Call this method if Client-Version is at least 2.0.</jc>
085    *    <ja>@RestDelete</ja>(path=<js>"/foobar"</js>, clientVersion=<js>"2.0"</js>)
086    *    <jk>public void</jk> newMethod()  {...}
087    *
088    *    <jc>// Call this method if Client-Version is at least 1.1, but less than 2.0.</jc>
089    *    <ja>@RestDelete</ja>(path=<js>"/foobar"</js>, clientVersion=<js>"[1.1,2.0)"</js>})
090    *    <jk>public void</jk> oldMethod() {...}
091    * </p>
092    *
093    * <p>
094    * Note that in the previous example, we're returning the exact same POJO, but using a transform to convert it into
095    * an older form.
096    * The old method could also just return back a completely different object.
097    * The range can be any of the following:
098    * <ul>
099    *    <li><js>"[0,1.0)"</js> = Less than 1.0.  1.0 and 1.0.0 does not match.
100    *    <li><js>"[0,1.0]"</js> = Less than or equal to 1.0.  Note that 1.0.1 will match.
101    *    <li><js>"1.0"</js> = At least 1.0.  1.0 and 2.0 will match.
102    * </ul>
103    *
104    * <h5 class='section'>See Also:</h5><ul>
105    *    <li class='jm'>{@link org.apache.juneau.rest.RestContext.Builder#clientVersionHeader(String)}
106    * </ul>
107    *
108    * @return The annotation value.
109    */
110   String clientVersion() default "";
111
112   /**
113    * Enable debug mode.
114    *
115    * <p>
116    * Enables the following:
117    * <ul class='spaced-list'>
118    *    <li>
119    *       HTTP request/response bodies are cached in memory for logging purposes.
120    *    <li>
121    *       Request/response messages are automatically logged.
122    * </ul>
123    *
124    * <ul class='values'>
125    *    <li><js>"true"</js> - Debug is enabled for all requests.
126    *    <li><js>"false"</js> - Debug is disabled for all requests.
127    *    <li><js>"conditional"</js> - Debug is enabled only for requests that have a <c class='snippet'>Debug: true</c> header.
128    *    <li><js>""</js> (or anything else) - Debug mode is inherited from class.
129    * </ul>
130    *
131    * <h5 class='section'>Notes:</h5><ul>
132    *    <li class='note'>
133    *       Supports <a class="doclink" href="../../../../../index.html#jrs.SvlVariables">SVL Variables</a>
134    *       (e.g. <js>"$L{my.localized.variable}"</js>).
135    * </ul>
136    *
137    * <h5 class='section'>See Also:</h5><ul>
138    *    <li class='jm'>{@link org.apache.juneau.rest.RestContext.Builder#debugEnablement()}
139    * </ul>
140    *
141    * @return The annotation value.
142    */
143   String debug() default "";
144
145   /**
146    * Default <c>Accept</c> header.
147    *
148    * <p>
149    * The default value for the <c>Accept</c> header if not specified on a request.
150    *
151    * <p>
152    * This is a shortcut for using {@link #defaultRequestHeaders()} for just this specific header.
153    *
154    * @return The annotation value.
155    */
156   String defaultAccept() default "";
157
158   /**
159    * Default character encoding.
160    *
161    * <p>
162    * The default character encoding for the request and response if not specified on the request.
163    *
164    * <h5 class='section'>Notes:</h5><ul>
165    *    <li class='note'>
166    *       Supports <a class="doclink" href="../../../../../index.html#jrs.SvlVariables">SVL Variables</a>
167    *       (e.g. <js>"$S{mySystemProperty}"</js>).
168    * </ul>
169    *
170    * <h5 class='section'>See Also:</h5><ul>
171    *    <li class='jm'>{@link org.apache.juneau.rest.RestContext.Builder#defaultCharset(Charset)}
172    *    <li class='jm'>{@link org.apache.juneau.rest.RestOpContext.Builder#defaultCharset(Charset)}
173    *    <li class='ja'>{@link Rest#defaultCharset}
174    * </ul>
175    *
176    * @return The annotation value.
177    */
178   String defaultCharset() default "";
179
180   /**
181    * Specifies default values for query parameters.
182    *
183    * <p>
184    * Strings are of the format <js>"name=value"</js>.
185    *
186    * <p>
187    * Affects values returned by {@link RestRequest#getQueryParam(String)} when the parameter is not present on the request.
188    *
189    * <h5 class='section'>Example:</h5>
190    * <p class='bjava'>
191    *    <ja>@RestDelete</ja>(path=<js>"/*"</js>, defaultRequestQueryData={<js>"foo=bar"</js>})
192    *    <jk>public</jk> String doDelete(<ja>@Query</ja>(<js>"foo"</js>) String <jv>foo</jv>)  {...}
193    * </p>
194    *
195    * <h5 class='section'>Notes:</h5><ul>
196    *    <li class='note'>
197    *       You can use either <js>':'</js> or <js>'='</js> as the key/value delimiter.
198    *    <li class='note'>
199    *       Key and value is trimmed of whitespace.
200    *    <li class='note'>
201    *       Supports <a class="doclink" href="../../../../../index.html#jrs.SvlVariables">SVL Variables</a>
202    *       (e.g. <js>"$S{mySystemProperty}"</js>).
203    * </ul>
204    *
205    * @return The annotation value.
206    */
207   String[] defaultRequestQueryData() default {};
208
209   /**
210    * Default request attributes.
211    *
212    * <p>
213    * Specifies default values for request attributes if they're not already set on the request.
214    *
215    * <p>
216    * Affects values returned by the following methods:
217    *    <ul>
218    *       <li class='jm'>{@link RestRequest#getAttribute(String)}.
219    *       <li class='jm'>{@link RestRequest#getAttributes()}.
220    *    </ul>
221    *
222    * <h5 class='section'>Example:</h5>
223    * <p class='bjava'>
224    *    <jc>// Defined via annotation resolving to a config file setting with default value.</jc>
225    *    <ja>@Rest</ja>(defaultRequestAttributes={<js>"Foo=bar"</js>, <js>"Baz: $C{REST/myAttributeValue}"</js>})
226    *    <jk>public class</jk> MyResource {
227    *
228    *       <jc>// Override at the method level.</jc>
229    *       <ja>@RestGet</ja>(defaultRequestAttributes={<js>"Foo: bar"</js>})
230    *       <jk>public</jk> Object myMethod() {...}
231    *    }
232    * </p>
233    *
234    * </ul>
235    * <h5 class='section'>Notes:</h5><ul>
236    *    <li class='note'>
237    *       Supports <a class="doclink" href="../../../../../index.html#jrs.SvlVariables">SVL Variables</a>
238    *       (e.g. <js>"$L{my.localized.variable}"</js>).
239    * </ul>
240    *
241    * <h5 class='section'>See Also:</h5><ul>
242    *    <li class='jm'>{@link org.apache.juneau.rest.RestContext.Builder#defaultRequestAttributes(NamedAttribute...)}
243    *    <li class='ja'>{@link Rest#defaultRequestAttributes()}
244    * </ul>
245    *
246    * @return The annotation value.
247    */
248   String[] defaultRequestAttributes() default {};
249
250   /**
251    * Default request headers.
252    *
253    * <p>
254    * Specifies default values for request headers if they're not passed in through the request.
255    *
256    * <h5 class='section'>Example:</h5>
257    * <p class='bjava'>
258    *    <jc>// Assume "text/json" Accept value when Accept not specified</jc>
259    *    <ja>@RestDelete</ja>(path=<js>"/*"</js>, defaultRequestHeaders={<js>"Accept: text/json"</js>})
260    *    <jk>public</jk> String doDelete()  {...}
261    * </p>
262    *
263    * <h5 class='section'>Notes:</h5><ul>
264    *    <li class='note'>
265    *       Supports <a class="doclink" href="../../../../../index.html#jrs.SvlVariables">SVL Variables</a>
266    *       (e.g. <js>"$S{mySystemProperty}"</js>).
267    * </ul>
268    *
269    * <h5 class='section'>See Also:</h5><ul>
270    *    <li class='jm'>{@link org.apache.juneau.rest.RestContext.Builder#defaultRequestHeaders(org.apache.http.Header...)}
271    * </ul>
272    *
273    * @return The annotation value.
274    */
275   String[] defaultRequestHeaders() default {};
276
277   /**
278    * Default response headers.
279    *
280    * <p>
281    * Specifies default values for response headers if they're not overwritten during the request.
282    *
283    * <h5 class='section'>Example:</h5>
284    * <p class='bjava'>
285    *    <jc>// Assume "text/json" Accept value when Accept not specified</jc>
286    *    <ja>@RestDelete</ja>(path=<js>"/*"</js>, defaultResponseHeaders={<js>"Content-Type: text/json"</js>})
287    *    <jk>public</jk> String doDelete()  {...}
288    * </p>
289    *
290    * <h5 class='section'>Notes:</h5><ul>
291    *    <li class='note'>
292    *       Supports <a class="doclink" href="../../../../../index.html#jrs.SvlVariables">SVL Variables</a>
293    *       (e.g. <js>"$S{mySystemProperty}"</js>).
294    * </ul>
295    *
296    * <h5 class='section'>See Also:</h5><ul>
297    *    <li class='jm'>{@link org.apache.juneau.rest.RestContext.Builder#defaultResponseHeaders(org.apache.http.Header...)}
298    * </ul>
299    *
300    * @return The annotation value.
301    */
302   String[] defaultResponseHeaders() default {};
303
304   /**
305    * Optional description for the exposed API.
306    *
307    * <p>
308    * This description is used in the following locations:
309    * <ul class='spaced-list'>
310    *    <li>
311    *       The value returned by {@link Operation#getDescription()} in the auto-generated swagger.
312    *    <li>
313    *       The <js>"$RS{operationDescription}"</js> variable.
314    *    <li>
315    *       The description of the method in the Swagger page.
316    * </ul>
317    *
318    * <h5 class='section'>Notes:</h5><ul>
319    *    <li class='note'>
320    *       Corresponds to the swagger field <c>/paths/{path}/{method}/description</c>.
321    *    <li class='note'>
322    *       Supports <a class="doclink" href="../../../../../index.html#jrs.SvlVariables">SVL Variables</a>
323    *       (e.g. <js>"$L{my.localized.variable}"</js>).
324    * </ul>
325    *
326    * @return The annotation value.
327    */
328   String[] description() default {};
329
330   /**
331    * Specifies the compression encoders for this method.
332    *
333    * <p>
334    * Encoders are used to enable various kinds of compression (e.g. <js>"gzip"</js>) on requests and responses.
335    *
336    * <p>
337    * This value overrides encoders specified at the class level using {@link Rest#encoders()}.
338    * The {@link org.apache.juneau.encoders.EncoderSet.Inherit} class can be used to include values from the parent class.
339    *
340    * <h5 class='section'>Example:</h5>
341    * <p class='bjava'>
342    *    <jc>// Define a REST resource that handles GZIP compression.</jc>
343    *    <ja>@Rest</ja>(
344    *       encoders={
345    *          GzipEncoder.<jk>class</jk>
346    *       }
347    *    )
348    *    <jk>public class</jk> MyResource {
349    *
350    *       <jc>// Define a REST method that can also use a custom encoder.</jc>
351    *       <ja>@RestDelete</ja>(
352    *          encoders={
353    *             EncoderSet.Inherit.<jk>class</jk>, MyEncoder.<jk>class</jk>
354    *          }
355    *       )
356    *       <jk>public</jk> String doDelete() {
357    *          ...
358    *       }
359    *    }
360    * </p>
361    *
362    * <p>
363    * The programmatic equivalent to this annotation is:
364    * <p class='bjava'>
365    *    RestOpContext.Builder <jv>builder</jv> = RestOpContext.<jsm>create</jsm>(<jv>method</jv>,<jv>restContext</jv>);
366    *    <jv>builder</jv>.getEncoders().set(<jv>classes</jv>);
367    * </p>
368    *
369    * <h5 class='section'>See Also:</h5><ul>
370    *    <li class='link'><a class="doclink" href="../../../../../index.html#jrs.Encoders">Encoders</a>
371    * </ul>
372    *
373    * @return The annotation value.
374    */
375   Class<? extends Encoder>[] encoders() default {};
376
377   /**
378    * Method-level guards.
379    *
380    * <p>
381    * Associates one or more {@link RestGuard RestGuards} with this method.
382    *
383    * <h5 class='section'>See Also:</h5><ul>
384    *    <li class='jm'>{@link org.apache.juneau.rest.RestOpContext.Builder#guards()}
385    * </ul>
386    *
387    * @return The annotation value.
388    */
389   Class<? extends RestGuard>[] guards() default {};
390
391   /**
392    * Method matchers.
393    *
394    * <p>
395    * Associates one more more {@link RestMatcher RestMatchers} with this method.
396    *
397    * <p>
398    * Matchers are used to allow multiple Java methods to handle requests assigned to the same URL path pattern, but
399    * differing based on some request attribute, such as a specific header value.
400    *
401    * <h5 class='section'>See Also:</h5><ul>
402    *    <li class='jac'>{@link RestMatcher}
403    * </ul>
404    *
405    * @return The annotation value.
406    */
407   Class<? extends RestMatcher>[] matchers() default {};
408
409   /**
410    * Dynamically apply this annotation to the specified methods.
411    *
412    * <h5 class='section'>See Also:</h5><ul>
413    *    <li class='link'><a class="doclink" href="../../../../../index.html#jm.DynamicallyAppliedAnnotations">Dynamically Applied Annotations</a>
414    * </ul>
415    *
416    * @return The annotation value.
417    */
418   String[] on() default {};
419
420   /**
421    * Optional path pattern for the specified method.
422    *
423    * <p>
424    * Appending <js>"/*"</js> to the end of the path pattern will make it match any remainder too.
425    * <br>Not appending <js>"/*"</js> to the end of the pattern will cause a 404 (Not found) error to occur if the exact
426    * pattern is not found.
427    *
428    * <p>
429    * The path can contain variables that get resolved to {@link org.apache.juneau.http.annotation.Path @Path} parameters.
430    *
431    * <h5 class='figure'>Examples:</h5>
432    * <p class='bjava'>
433    *    <ja>@RestDelete</ja>(path=<js>"/myurl/{foo}/{bar}/{baz}/*"</js>)
434    * </p>
435    * <p class='bjava'>
436    *    <ja>@RestDelete</ja>(path=<js>"/myurl/{0}/{1}/{2}/*"</js>)
437    * </p>
438    *
439    * <p>
440    * Note that you can also use {@link #value()} to specify the path.
441    *
442    * <h5 class='section'>See Also:</h5><ul>
443    *    <li class='ja'>{@link org.apache.juneau.http.annotation.Path}
444    * </ul>
445    *
446    * @return The annotation value.
447    */
448   String[] path() default {};
449
450   /**
451    * Role guard.
452    *
453    * <p>
454    * An expression defining if a user with the specified roles are allowed to access this method.
455    *
456    * <h5 class='section'>Example:</h5>
457    * <p class='bjava'>
458    *    <jk>public class</jk> MyResource <jk>extends</jk> BasicRestServlet {
459    *
460    *       <ja>@RestDelete</ja>(
461    *          path=<js>"/foo"</js>,
462    *          roleGuard=<js>"ROLE_ADMIN || (ROLE_READ_WRITE &amp;&amp; ROLE_SPECIAL)"</js>
463    *       )
464    *       <jk>public</jk> Object doDelete() {
465    *       }
466    *    }
467    * </p>
468    *
469    * <h5 class='section'>Notes:</h5><ul>
470    *    <li class='note'>
471    *       Supports any of the following expression constructs:
472    *       <ul>
473    *          <li><js>"foo"</js> - Single arguments.
474    *          <li><js>"foo,bar,baz"</js> - Multiple OR'ed arguments.
475    *          <li><js>"foo | bar | baz"</js> - Multiple OR'ed arguments, pipe syntax.
476    *          <li><js>"foo || bar || baz"</js> - Multiple OR'ed arguments, Java-OR syntax.
477    *          <li><js>"fo*"</js> - Patterns including <js>'*'</js> and <js>'?'</js>.
478    *          <li><js>"fo* &amp; *oo"</js> - Multiple AND'ed arguments, ampersand syntax.
479    *          <li><js>"fo* &amp;&amp; *oo"</js> - Multiple AND'ed arguments, Java-AND syntax.
480    *          <li><js>"fo* || (*oo || bar)"</js> - Parenthesis.
481    *       </ul>
482    *    <li class='note'>
483    *       AND operations take precedence over OR operations (as expected).
484    *    <li class='note'>
485    *       Whitespace is ignored.
486    *    <li class='note'>
487    *       <jk>null</jk> or empty expressions always match as <jk>false</jk>.
488    *    <li class='note'>
489    *       If patterns are used, you must specify the list of declared roles using {@link #rolesDeclared()} or {@link org.apache.juneau.rest.RestOpContext.Builder#rolesDeclared(String...)}.
490    *    <li class='note'>
491    *       Supports <a class="doclink" href="../../../../../index.html#jrs.SvlVariables">SVL Variables</a>
492    *       (e.g. <js>"$L{my.localized.variable}"</js>).
493    *    <li class='note'>
494    *       When defined on parent/child classes and methods, ALL guards within the hierarchy must pass.
495    * </ul>
496    *
497    * <h5 class='section'>See Also:</h5><ul>
498    *    <li class='jm'>{@link org.apache.juneau.rest.RestOpContext.Builder#roleGuard(String)}
499    * </ul>
500    *
501    * @return The annotation value.
502    */
503   String roleGuard() default "";
504
505   /**
506    * Declared roles.
507    *
508    * <p>
509    * A comma-delimited list of all possible user roles.
510    *
511    * <p>
512    * Used in conjunction with {@link #roleGuard()} is used with patterns.
513    *
514    * <h5 class='section'>Example:</h5>
515    * <p class='bjava'>
516    *    <jk>public class</jk> MyResource <jk>extends</jk> BasicRestServlet {
517    *
518    *       <ja>@RestDelete</ja>(
519    *          path=<js>"/foo"</js>,
520    *          rolesDeclared=<js>"ROLE_ADMIN,ROLE_READ_WRITE,ROLE_READ_ONLY,ROLE_SPECIAL"</js>,
521    *          roleGuard=<js>"ROLE_ADMIN || (ROLE_READ_WRITE &amp;&amp; ROLE_SPECIAL)"</js>
522    *       )
523    *       <jk>public</jk> Object doDelete() {
524    *       }
525    *    }
526    * </p>
527    *
528    * <h5 class='section'>See Also:</h5><ul>
529    *    <li class='jm'>{@link org.apache.juneau.rest.RestOpContext.Builder#rolesDeclared(String...)}
530    * </ul>
531    *
532    * @return The annotation value.
533    */
534   String rolesDeclared() default "";
535
536   /**
537    * Optional summary for the exposed API.
538    *
539    * <p>
540    * This summary is used in the following locations:
541    * <ul class='spaced-list'>
542    *    <li>
543    *       The value returned by {@link Operation#getSummary()} in the auto-generated swagger.
544    *    <li>
545    *       The <js>"$RS{operationSummary}"</js> variable.
546    *    <li>
547    *       The summary of the method in the Swagger page.
548    * </ul>
549    *
550    * <h5 class='section'>Notes:</h5><ul>
551    *    <li class='note'>
552    *       Corresponds to the swagger field <c>/paths/{path}/{method}/summary</c>.
553    *    <li class='note'>
554    *       Supports <a class="doclink" href="../../../../../index.html#jrs.SvlVariables">SVL Variables</a>
555    *       (e.g. <js>"$L{my.localized.variable}"</js>).
556    * </ul>
557    *
558    * @return The annotation value.
559    */
560   String summary() default "";
561
562   /**
563    * Provides swagger-specific metadata on this method.
564    *
565    * <p>
566    * Used to populate the auto-generated OPTIONS swagger documentation.
567    *
568    * <p>
569    * The format of this annotation is JSON when all individual parts are concatenated.
570    * <br>The starting and ending <js>'{'</js>/<js>'}'</js> characters around the entire value are optional.
571    *
572    * <h5 class='section'>Example:</h5>
573    * <p class='bjava'>
574    *    <ja>@RestDelete</ja>(
575    *       path=<js>"/{propertyName}"</js>,
576    *
577    *       <jc>// Swagger info.</jc>
578    *       swagger={
579    *          <js>"parameters:["</js>,
580    *             <js>"{name:'propertyName',in:'path',description:'The system property name.'},"</js>,
581    *             <js>"{in:'body',description:'The new system property value.'}"</js>,
582    *          <js>"],"</js>,
583    *          <js>"responses:{"</js>,
584    *             <js>"302: {headers:{Location:{description:'The root URL of this resource.'}}},"</js>,
585    *             <js>"403: {description:'User is not an admin.'}"</js>,
586    *          <js>"}"</js>
587    *       }
588    *    )
589    * </p>
590    *
591    * <h5 class='section'>Notes:</h5><ul>
592    *    <li class='note'>
593    *       The format is <a class="doclink" href="../../../../../index.html#jd.Swagger">Swagger</a>.
594    *       <br>Multiple lines are concatenated with newlines.
595    *    <li class='note'>
596    *       The starting and ending <js>'{'</js>/<js>'}'</js> characters around the entire value are optional.
597    *    <li class='note'>
598    *       These values are superimposed on top of any Swagger JSON file present for the resource in the classpath.
599    *    <li class='note'>
600    *       Supports <a class="doclink" href="../../../../../index.html#jrs.SvlVariables">SVL Variables</a>
601    *       (e.g. <js>"$L{my.localized.variable}"</js>).
602    * </ul>
603    *
604    * <h5 class='section'>See Also:</h5><ul>
605    *    <li class='ja'>{@link OpSwagger}
606    *    <li class='jc'>{@link SwaggerProvider}
607    * </ul>
608    *
609    * @return The annotation value.
610    */
611   OpSwagger swagger() default @OpSwagger;
612
613   /**
614    * REST method path.
615    *
616    * <p>
617    * Can be used to provide a shortened form for the {@link #path()} value.
618    *
619    * <p>
620    * The following examples are considered equivalent.
621    * <p class='bjava'>
622    *    <jc>// Normal form</jc>
623    *    <ja>@RestDelete</ja>(path=<js>"/{propertyName}"</js>)
624    *
625    *    <jc>// Shortened form</jc>
626    *    <ja>@RestDelete</ja>(<js>"/{propertyName}"</js>)
627    * </p>
628    *
629    * @return The annotation value.
630    */
631   String value() default "";
632}