Uh oh!
There was an error while loading. Please reload this page.
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
| var dtoForRequestPayload = false | ||
| @Experimental | ||
| @Cfg("Enable JSON Patch (RFC 6902) gene support when the request Content-Type is 'application/json-patch+json'." + |
There was a problem hiding this comment.
I think this is no longer @experimental since it is enabled by default
There was a problem hiding this comment.
no, should be marked @Experimental, and be false by default. only when we run experiments (eg on WFD), and we are happy with those, then we promote them to default-on
| var enableJsonPatchSupport = true | ||
| @Experimental | ||
| @Cfg("Enable XML-aware field naming for body genes when the request Content-Type is XML." + |
jgaleotti
commented
Aug 17, 2026
the branch seems to be needing updating from master |
| @Cfg("Enable XML-aware field naming for body genes when the request Content-Type is XML." + | ||
| " When false, body gene names fall back to the pre-feature behavior (schema ref name or 'body').") | ||
| var enableXmlSupport = true |
There was a problem hiding this comment.
rename configuration key "enableXmlSupport" to "enableXmlWithAttributesSupport"
| var dtoForRequestPayload = false | ||
| @Experimental | ||
| @Cfg("Enable JSON Patch (RFC 6902) gene support when the request Content-Type is 'application/json-patch+json'." + |
There was a problem hiding this comment.
no, should be marked @Experimental, and be false by default. only when we run experiments (eg on WFD), and we are happy with those, then we promote them to default-on
| @Cfg("Enable XML-aware field naming, including support for XML attributes, for body genes when the request" + | ||
| " Content-Type is XML. When false, XML attributes are treated as regular child elements, and body gene" + | ||
| " names fall back to the pre-feature behavior (schema ref name or 'body').") | ||
| var enableXmlWithAttributesSupport = true |
There was a problem hiding this comment.
same as above, should be still marked as experimental, being off by default, where E2E tests that need it should explicitely put it as true, there.
i ll update the for_developers.md notes to clarify this
| @@ -5,8 +5,11 @@ import org.evomaster.core.EMConfig | |||
| import org.evomaster.core.output.OutputFormat | |||
There was a problem hiding this comment.
we have convention that all E2E tests end with EMTest and not just Test
| @@ -5,9 +5,12 @@ import org.evomaster.core.EMConfig | |||
| import org.evomaster.core.output.OutputFormat | |||
There was a problem hiding this comment.
we have convention that all E2E tests end with EMTest and not just Test
We create this pr to introduce 2 keys to compare coverage of endpoints with and without json patch and xml support.