Migrate tests to JUnit 5, as part of this migration it was realized many tests weren't running due to them using JUnit 4 configurations but the vintage JUnit engine wasn't included so they weren't being ran. As part of migrating to JUnit 5 they began running again and a few errors in code generation were found.
stream-style serialization wasn't removing escape \. in JSON flattening scenarios.
stream-style serialization had an incorrect interpretation of lists in XML where serialization would generate in an XML wrapped format even if wrapped: true wasn't present. Now if there is a list in XML without wrapped: true it will consume the values using the XML element name as OpenAPI 2.0 specifies.
stream-style serialization wasn't try-catch'ing URL creation in XML serialization. XmlSerializable only checks XMLStreamException and not IOException which URL creation throws.
And some cases of code generation disabled stream-style serialization as they were testing Jackson annotation cases with JSON flattening.
Some tests were disabled due to either incorrect behavior with Java object types and disallowed null values (this won't throw as boxed typed are allowed to be null and there is no logic generated to prevent this) and direct usage of enum types in serialization as stream-style falls back to Jackson for non-JsonSerializable and non-XmlSerializable scenarios and enums are handled as their name and not toString value by default.
Fixes #1253
Migrate tests to JUnit 5, as part of this migration it was realized many tests weren't running due to them using JUnit 4 configurations but the vintage JUnit engine wasn't included so they weren't being ran. As part of migrating to JUnit 5 they began running again and a few errors in code generation were found.
\.
in JSON flattening scenarios.wrapped: true
wasn't present. Now if there is a list in XML withoutwrapped: true
it will consume the values using the XML element name as OpenAPI 2.0 specifies.And some cases of code generation disabled stream-style serialization as they were testing Jackson annotation cases with JSON flattening.
Some tests were disabled due to either incorrect behavior with Java object types and disallowed null values (this won't throw as boxed typed are allowed to be null and there is no logic generated to prevent this) and direct usage of enum types in serialization as stream-style falls back to Jackson for non-JsonSerializable and non-XmlSerializable scenarios and enums are handled as their name and not toString value by default.