You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FIXED unsupported jaxrs-2.1 annotations should not break entire interface (OpenFeign#672)
* FIXED unsupported jaxrs-2.1 annotations should not break entire interface, resolving OpenFeign#669
* UPDATED jaxrs: more defensive jaxrs2 support
* ADDED jsr311-api dependency to httpclient (as jsr311 is `provided` in feign-jaxrs now)
* UPDATED httpclient `jsr311-api` scope to test
UPDATED jaxrs readme
This module overrides annotation processing to instead use standard ones supplied by the JAX-RS specification. This is currently targeted at the 1.1 spec.
3
+
4
+
## Limitations
5
+
While it may appear possible to reuse the same interface across client and server, bear in mind that JAX-RS resource
6
+
annotations were not designed to be processed by clients. Moreover, JAX-RS 2.0 has a different package hierarchy for
7
+
client invocation. Finally, JAX-RS is a large spec and attempts to implement it completely would be a project larger
8
+
than feign itself. In other words, this implementation is *best efforts* and concedes far from 100% compatibility with
9
+
server interface behavior.
10
+
11
+
## Currently Supported Annotation Processing
12
+
Feign only supports processing java interfaces (not abstract or concrete classes).
13
+
14
+
ISE is raised when any annotation's value is empty or null. Ex. `Path("")` raises an ISE.
15
+
16
+
Here are a list of behaviors currently supported.
17
+
### Type Annotations
18
+
#### `@Path`
19
+
Appends the value to `Target.url()`. Can have tokens corresponding to `@PathParam` annotations.
20
+
### Method Annotations
21
+
#### `@HttpMethod` meta-annotation (present on `@GET`, `@POST`, etc.)
22
+
Sets the request method.
23
+
#### `@Path`
24
+
Appends the value to `Target.url()`. Can have tokens corresponding to `@PathParam` annotations.
25
+
#### `@Produces`
26
+
Adds the first value as the `Accept` header.
27
+
#### `@Consumes`
28
+
Adds the first value as the `Content-Type` header.
29
+
### Parameter Annotations
30
+
#### `@PathParam`
31
+
Links the value of the corresponding parameter to a template variable declared in the path.
32
+
#### `@QueryParam`
33
+
Links the value of the corresponding parameter to a query parameter. When invoked, null will skip the query param.
34
+
#### `@HeaderParam`
35
+
Links the value of the corresponding parameter to a header.
36
+
#### `@FormParam`
37
+
Links the value of the corresponding parameter to a key passed to `Encoder.Text<Map<String, Object>>.encode()`.
0 commit comments