openapi-tools / jackson-dataformat-hal-provider Goto Github PK
View Code? Open in Web Editor NEWProvider to load the Jackson Dataformat HAL module
License: MIT License
Provider to load the Jackson Dataformat HAL module
License: MIT License
Continuing from our discussion in openapi-tools/jackson-dataformat-hal#32, I looked at the initial implementation of the JAX-RS provider. I was wondering why you didn't just use the one I initially provided in the pull request.
The reason I didn't use the HALMapper
there, is that it means you always create a new ObjectMapper
. But the provider already creates the ObjectMapper
so you're overriding that one with the HALMapper
. This means that any custom configuration that might've been applied is lost.
I also provided alternative implementations for all constructors since you otherwise end up with a regular ObjectMapper
even when you use this HAL-specific provider. I'm not sure when each of these constructors is used though. But it seems good to avoid such flaky behavior.
As for the _locateMapperViaProvider
method, I had to override this to ensure that this HAL-specific provider doesn't change an existing ObjectMapper
instance. This allows a normal ObjectMapper
to exist side-by-side with this HAL-specific ObjectMapper
.
Honestly though, I'm not exactly sure how JacksonJsonProvider
works. I just tried to ensure that I never override the ObjectMapper
that it uses.
Just starting to look at this. But I noticed that the name of the project doesn't correspond to the convention used by Jackson. I think it should be jackson-jaxrs-hal-provider
. I think this will also make it easier to find this dependency and understand what it does. I hope it's still okay to rename it since it would affect the repo URL and artifact name as well. But that's why it seems better to do this as early as possible.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.