Feature Flags for Json Patch and XML - #1645
Conversation
|
|
||
| val inferFormatFromNames: Boolean = true, | ||
|
|
||
| val disableJsonPatchSupport: Boolean = false, |
There was a problem hiding this comment.
property should be in "positive" sense, not negative. ie, this should be renamed into jsonPatchSupport, and its semantics flipped, ie, i guess default true here
|
|
||
| val disableJsonPatchSupport: Boolean = false, | ||
|
|
||
| val disableXMLSupport: Boolean = false, |
There was a problem hiding this comment.
see previous comment. this should be renamed xmlSupport, with semantics flipped
|
|
||
| val isJsonPatch = verb == HttpVerb.PATCH && bodies.keys.any { it.contains("json-patch") } | ||
| val isJsonPatch = !options.disableJsonPatchSupport && | ||
| verb == HttpVerb.PATCH && bodies.keys.any { it.contains("json-patch") } |
There was a problem hiding this comment.
should check for ignoring case of "json-patch"
| @Experimental | ||
| @Cfg("Disable JSON Patch (RFC 6902) gene support when the request Content-Type is 'application/json-patch+json'." + | ||
| " When true, such endpoints are treated as regular JSON bodies, reproducing the behavior before this feature was introduced.") | ||
| var disableJsonPatchSupport = false |
There was a problem hiding this comment.
should be renamed enableJsonPatchSupport.
also, experimental options should not be on by default.
once we run experiments, and we are happy with them, we put them on by default, and remove the tag Experimental
| @Experimental | ||
| @Cfg("Disable XML-aware field naming for body genes when the request Content-Type is XML." + | ||
| " When true, body gene names fall back to the pre-feature behavior (schema ref name or 'body').") | ||
| var disableXMLSupport = false |
There was a problem hiding this comment.
rename enableXmlSupport, and of course update documentation due to flipped semantics
We create this pr to introduce 2 keys to compare coverage of endpoints with and without json patch and xml support.