Skip to content

Fix xml empty examples except first#520

Merged
rholshausen merged 3 commits intopact-foundation:masterfrom
tienvx:fix-xml-empty-second-example
Mar 22, 2026
Merged

Fix xml empty examples except first#520
rholshausen merged 3 commits intopact-foundation:masterfrom
tienvx:fix-xml-empty-second-example

Conversation

@tienvx
Copy link
Contributor

@tienvx tienvx commented Mar 22, 2026

Issue: When using examples=3 for xml element, all xml elements (except the first element) doesn't have content.

Expected:

<?xml version='1.0'?>
<items>
	<item>
		<name>Item 1</name>
		<price>10</price>
	</item>
	<item>
		<name>Item 1</name>
		<price>10</price>
	</item>
	<item>
		<name>Item 1</name>
		<price>10</price>
	</item>Item list
</items>

Actual:

<?xml version='1.0'?>
<items>
	<item>
		<name>Item 1</name>
		<price>10</price>
	</item>
	<item>
		<name/>
		<price/>
	</item>
	<item>
		<name/>
		<price/>
	</item>Item list
</items>

This pull request:

  • Add a missing test for defining xml element's content
  • Fix this issue

@tienvx tienvx changed the title Fix xml empty second example Fix xml empty examples except first Mar 22, 2026
@rholshausen rholshausen merged commit 7a5444d into pact-foundation:master Mar 22, 2026
35 of 36 checks passed
@tienvx tienvx deleted the fix-xml-empty-second-example branch March 23, 2026 14:42
Sign up for free to 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.

2 participants