[REQ] Java MicroPofile Rest client with Jackson serialization?
See original GitHub issueIs your feature request related to a problem? Please describe.
Quarkus, an up-and-coming Java Microprofile implementation will soon allow users to use JAX-RS with Jackson, instead of the standard JSONB as discussed here
Currently this generator cannot generate Microprofile rest client code based on JAX-RS+jackson code. I tried this (in my Gradle):
...
openApiGenerate {
generatorName = "java"
configOptions = [
dateLibrary: "java8",
java8: "true",
library:"microprofile",
serializationLibrary:"jackson"
]
}
but the generated code is still JAX-RS/JSONB, not JAX-RS/Jackson
Describe the solution you’d like
This should do the trick:
openApiGenerate {
generatorName = "java"
configOptions = [
...
library:"microprofile",
serializationLibrary:"jackson"
]
Issue Analytics
- State:
- Created 3 years ago
- Reactions:10
- Comments:7 (1 by maintainers)
Top Results From Across the Web
How to set representation for specific format on Json Serializer ...
1. First, you need to enable Jackson, as RESTEasy defaults to JSONB. For this you need to add this system property: resteasy.
Read more >Using the REST Client - Quarkus
The MicroProfile REST client allows amending request headers by registering a ClientHeadersFactory with the @RegisterClientHeaders annotation. Let's see it in ...
Read more >MicroProfile Rest Client and JSON-B make working ... - Medium
JSON-B, one of the many flavors of working with JSON, allows very quick and very simple serialization and deserialization of Java objects. For ......
Read more >Configuring the MicroProfile Rest Client - IBM
The MicroProfile Rest Client builds on the JAX-RS 2.0 Client APIs to provide a type-safe approach to invoke RESTful services over HTTP. You...
Read more >RESTEasy JAX-RS - JBoss.org
MicroProfile Rest Client ... org.jboss.resteasy.resteasy-jackson-provider ... with WildFly and completely integrated as per the requirements of Java EE.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It would be nice to address this 6 month old issue. is there any way to use jackson with microprofile rest client ?
The API classes (interfaces) are generated for “microprofile” client, so they are annotated with microprofile (RegisterProvider, RegisterRestClient) and JAX-RS (Path, GET, POST, …) annotations. Generated classes also specify a wildcard include for
org.apache.cxf.jaxrs.ext.multipart.*
, but I’ve never seen any annotation used from that package, so I specify the dependency as “optional”. These are the dependencies I use in such maven API module:The model classes get a mix of Jackson, Swagger and Findbugs (jsr305) annotations. In runtime, only Jackson annotations are needed so other dependencies can be specified as “optional” in pom.xml If you can do without them at runtime (you are not using Swagger GUI for example), and they won’t be included in the app. I use the following in pom.xml for such maven model module:
Are there any other annotations you would like to be present? Where? In the API or model classes?
I agree that it would be nice to have proper support for microprofile/Jackson combo so these workarounds would not be necessary.