Skip to content

Feature Flags for Json Patch and XML - #1645

Open
suarezrominajulieta wants to merge 24 commits into
masterfrom
feature/jsonPatch_xml_featureFlags_new
Open

Feature Flags for Json Patch and XML#1645
suarezrominajulieta wants to merge 24 commits into
masterfrom
feature/jsonPatch_xml_featureFlags_new

Conversation

@suarezrominajulieta

Copy link
Copy Markdown
Collaborator

We create this pr to introduce 2 keys to compare coverage of endpoints with and without json patch and xml support.

@suarezrominajulieta
suarezrominajulieta marked this pull request as ready for review July 26, 2026 23:41
@jgaleotti
jgaleotti requested a review from arcuri82July 28, 2026 13:50

val inferFormatFromNames: Boolean = true,

val disableJsonPatchSupport: Boolean = false,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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") }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'." +

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is no longer @experimental since it is enabled by default

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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." +

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as before

@jgaleotti

Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename configuration key "enableXmlSupport" to "enableXmlWithAttributesSupport"

@jgaleotti
jgaleotti removed the request for review from arcuri82August 19, 2026 19:13
var dtoForRequestPayload = false

@Experimental
@Cfg("Enable JSON Patch (RFC 6902) gene support when the request Content-Type is 'application/json-patch+json'." +

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have convention that all E2E tests end with EMTest and not just Test

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@suarezrominajulieta@jgaleotti@arcuri82