-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
bugUnexpected or incorrect behaviorUnexpected or incorrect behaviorregressionBugs and issues related to unintended breaking changesBugs and issues related to unintended breaking changes
Description
I am facing the API of JAX-RS 2.0 contract with this definition:
@GET
@Path("/orders/{externalOrderId}")
@Produces({ "application/vnd.mycompany.application.order.v1+json", "application/vnd.mycompany.application.order+json", "application/vnd.mycompany.application.order.v2+json" })
@ApiOperation(value = "Orders_GetOrderDetail", tags={ })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = Order.class),
@ApiResponse(code = 400, message = "Bad request", response = BadRequestResponseModel.class),
@ApiResponse(code = 404, message = "Not Found", response = NotFoundResponseModel.class),
@ApiResponse(code = 412, message = "Precondition Failed", response = PreconditionFailedModel.class),
@ApiResponse(code = 500, message = "Internal Server Error", response = InternalErrorResponseModel.class) })
public Order ordersGetOrderDetail(@PathParam("externalOrderId") String externalOrderId, @HeaderParam("Accept") String accept, @HeaderParam("Authorization") String authorization);
This is a design for supporting multiple data model and choose reply data model by the Accept header. But when I using OpenFeign 10.0.1, it put all the Produces and Accept into accept parameter into header.
We suppose to send only the header value in the parameter in this scenario.
And another issue is the @Conumes, when there are multiple values, it send all in Content-Type header. I think that may not make sense to have a body with multiple types.
I am not sure whether this is a mismatching of JAX-RS 2.0 definition or whatever.
Metadata
Metadata
Assignees
Labels
bugUnexpected or incorrect behaviorUnexpected or incorrect behaviorregressionBugs and issues related to unintended breaking changesBugs and issues related to unintended breaking changes