-
-
Notifications
You must be signed in to change notification settings - Fork 201
Expand file tree
/
Copy pathPATCH.java
More file actions
70 lines (64 loc) · 1.52 KB
/
Copy pathPATCH.java
File metadata and controls
70 lines (64 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
* Jooby https://jooby.io
* Apache License Version 2.0 https://jooby.io/LICENSE.txt
* Copyright 2014 Edgar Espina
*/
package io.jooby.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* HTTP PATCH verb for mvc routes.
*
* <pre>
* class Resources {
*
* @PATCH
* public void method() {
* }
* }
* </pre>
*
* @author edgar
* @since 0.1.0
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface PATCH {
/**
* Path pattern. This is a shortcut for {@link #path()}.
*
* @return Path pattern.
*/
String[] value() default {};
/**
* Path pattern.
*
* @return Path pattern.
*/
String[] path() default {};
/**
* Produce types. Check the <code>Accept</code> header against this value or send a "406 Not
* Acceptable" response.
*
* @return Produce types.
*/
String[] produces() default {};
/**
* Consume types. Check the <code>Content-Type</code> header against this value or send a "415
* Unsupported Media Type" response.
*
* @return Consume types.
*/
String[] consumes() default {};
/**
* Field paths to include. Supports dot-notation and avaje-notation. It is a shortcut for {@link
* Project}.
*
* <p>Example: <code>id, name, address(city, zip)</code>
*
* @return Field paths to include. Supports dot-notation and avaje-notation.
*/
String projection() default "";
}