[KYUUBI #4691] [REST] Configure FAIL_ON_UNKNOWN_PROPERTIES to false for KyuubiScalaObjectMapper
### _Why are the changes needed?_ Do not failed on unknown properties in server side. ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request Closes #4691 from turboFei/ignore. Closes #4691 a03cb5be0 [fwang12] Ignore c406878e7 [fwang12] Fast return batch info when post batches Authored-by: fwang12 <fwang12@ebay.com> Signed-off-by: fwang12 <fwang12@ebay.com>
This commit is contained in:
parent
f0615a9aab
commit
fa60e4c70b
@ -19,11 +19,13 @@ package org.apache.kyuubi.server.api
|
||||
|
||||
import javax.ws.rs.ext.ContextResolver
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper
|
||||
import com.fasterxml.jackson.databind.{DeserializationFeature, ObjectMapper}
|
||||
import com.fasterxml.jackson.module.scala.DefaultScalaModule
|
||||
|
||||
class KyuubiScalaObjectMapper extends ContextResolver[ObjectMapper] {
|
||||
private val mapper = new ObjectMapper().registerModule(DefaultScalaModule)
|
||||
private val mapper = new ObjectMapper()
|
||||
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
|
||||
.registerModule(DefaultScalaModule)
|
||||
|
||||
override def getContext(aClass: Class[_]): ObjectMapper = mapper
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user